After the last few things I've learned about #PHP 8.4 by accident I thought why not look into it and see what else there is. So, here's an example of the four new rounding modes PHP 8.4 will introduce to the 'round' function:
PHP_ROUND_CEILING
PHP_ROUND_FLOOR
PHP_ROUND_TOWARD_ZERO
PHP_ROUND_AWAY_FROM_ZERO
I rarely use anything else than 'ceil' and 'floor' in my daily work but this is still good to know.
@doefom Sounds useful at first glance but is more likely to encourage using floats inaccurately for decimal / monetary calculations. bcmath is also getting a new bcround and related methods which should be used instead, or one of the libraries specifically for decimal or money calculations.
@zimzat Didn't know there are better/worse solutions for rounding, I thought there's one right way to do it under the hood and that's it. Well, as you say there is more to rounding than I thought :D Thanks for your feedback!
@dseguy I assume this https://3v4l.org/3E7BL snippet captures your complaint? (3v4l is the preferred way to share #PHP code snippets over screen shots.) specifically that the fourth print should be 4 not 6
If I had to guess, it’s something about operator precedence between the cast and the exponent. But that’s downright weird given the multiplication gets it right. Probes out by adding more parentheses: https://3v4l.org/gXvRL
Charles Fol a présenté la faille #iconv (CVE-2024-2961) à #OffensiveCon le 10/05/2024. On n'a toujours pas de détails. On dirait bien qu'il n'y a pas d'attaques généralisées non plus.
Quelqu'un aurait vu des sites #PHP compromis via ce genre de chose récemment ? Ou pire ?
Thanks to @jay Bunny #PHP will support client properties in the upcoming 0.5.6 and 0.6 releases. Client properties can be used to set a human readable name to your connection with #RabbitMQ:
Had fun this weekend working on a performance focussed proof of concept using Bunny in the #PHP#queue interop contracts. The first metrics are in using the #RabbitMQ cluster on my #Raspberrypi#Kubernetes home cluster. (Which isn't meant for high performance. Still pleased by these numbers.)
🚀 Nur noch 5 Tage bis zum "Business Roundtable: Digital mit TYPO3"! Stell dir vor, nächste Woche um diese Zeit könntest du mit den neuesten TYPO3-Strategien ausgestattet sein, die dein Business voran bringen. Verpasse nicht deine Chance! https://wwagner.net/events/business-roundtable-digital-mit-typo3 #TYPO3#T3BRT
#PHP 8.4 is introducing newing up a class and accessing methods, properties, etc. on it without wrapping it in parentheses first. Another useful feature I will probably use on a daily basis. In my daily work with #Laravel I often need to crawl some content from a website or an API. This feature will make my code a little less cluttered.