PHP Hot

typo3, to php German
@typo3@typo3.social avatar

Now live: Discover "My First TYPO3 General Assembly" through the eyes of our new Communications Manager, Kendall Litton, as she shares impressions from her time in Zurich.🇨🇭

🌐 https://typo3.org/article/my-first-typo3-general-assembly

mobileatom, to Symfony
@mobileatom@flipboard.com avatar
dseguy, to php French
@dseguy@phpc.social avatar

question of the day : when you know that
2*2 = 4
2^2 = 4 (too)
2.5^2.5 = 9.8821176880262..

Where is this 6 coming from ?

derickr,
@derickr@phpc.social avatar

@dseguy which six?

cabbey,
@cabbey@phpc.social avatar

@dseguy I assume this https://3v4l.org/3E7BL snippet captures your complaint? (3v4l is the preferred way to share 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

doefom, to php
@doefom@mastodon.social avatar

After the last few things I've learned about 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.

What do you think?

zimzat,
@zimzat@mastodon.social avatar

@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.

doefom,
@doefom@mastodon.social avatar

@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!

mobileatom, to php
@mobileatom@flipboard.com avatar
mobileatom, to Symfony
@mobileatom@flipboard.com avatar
mobileatom, to Symfony
@mobileatom@flipboard.com avatar
jclermont, to php
@jclermont@phpc.social avatar

How do you discover interesting new packages for your Laravel apps? https://masteringlaravel.io/daily/2024-05-20-how-do-you-discover-interesting-new-packages

grmpyprogrammer,
@grmpyprogrammer@phpc.social avatar

@jclermont Three step process:

  1. ask a question about how to do something
  2. from an alt account give a wrong answer
  3. watch angry techbros and replyguys give you the correct answer
jclermont,
@jclermont@phpc.social avatar

@grmpyprogrammer this is some 4-d chess right here 😂

vm666, to php French

Charles Fol a présenté la faille (CVE-2024-2961) à 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 compromis via ce genre de chose récemment ? Ou pire ?

Girgias,
@Girgias@phpc.social avatar

@vm666 C'est surtout pas une faille dans PHP, et faut faire des choses vachement sous optimal pour que ça soit exploitable IMHO.

wyri, to php
@wyri@haxim.us avatar

Had fun this weekend working on a performance focussed proof of concept using Bunny in the interop contracts. The first metrics are in using the cluster on my home cluster. (Which isn't meant for high performance. Still pleased by these numbers.)

wyri,
@wyri@haxim.us avatar

Whoops kept it running for over an hour while running errands 😅 . Liking the ease of use of what I'm building to far

wyri, to php
@wyri@haxim.us avatar

Thanks to @jay Bunny 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 :

With connection name
Set of my own connections with descriptive connection names

dseguy, to php French
@dseguy@phpc.social avatar

More about the Override attribute :

where else can use this attribute?
when will it raise a Fatal error?
It is not always at compile time (it never is).

https://www.exakat.io/en/more-about-the-override-attribute/

symfony, to Symfony
@symfony@mastodon.social avatar

🚀 New in Symfony 7.1: Commands Improvements
➡️ https://symfony.com/blog/new-in-symfony-7-1-commands-improvements

PHP's Magic Methods | php[architect] (www.phparch.com)

As PHP developers, we need to know a lot of language features to make our code easy to write and maintain. Without explicitly being told about a part of the language, it’s hard to even know it exists, so today, we’re going to discuss the magic methods our classes have and how we should use […]

doefom, to php
@doefom@mastodon.social avatar

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 I often need to crawl some content from a website or an API. This feature will make my code a little less cluttered.

Here is the RFC if you want to learn more about it: https://wiki.php.net/rfc/new_without_parentheses

mobileatom, to php
@mobileatom@flipboard.com avatar

Value Objects in PHP can protect you from bad data.

https://medium.com/

Posted into SYMFONY FOR THE DEVIL @symfony

mobileatom, to Symfony
@mobileatom@flipboard.com avatar
mobileatom, to Symfony
@mobileatom@flipboard.com avatar

Ajouter un champ de texte statique dans un formulaire EasyAdmin. #symfony

https://jolicode.com/blog/ajouter-un-champ-de-texte-statique-dans-un-formulaire-easyadmin?utm_source=flipboard&utm_medium=activitypub

Posted into SYMFONY FOR THE DEVIL @symfony

mobileatom, to Symfony
@mobileatom@flipboard.com avatar

How to start a Symfony 7 application with Docker without having PHP locally installed on your machine. #symfony #docker

https://dev.to/gmurambadoro/how-to-start-a-symfony-7-application-with-docker-without-having-php-locally-installed-on-your-machine-28h2?utm_source=flipboard&utm_medium=activitypub

Posted into SYMFONY FOR THE DEVIL @symfony

leanpub, to php
@leanpub@mastodon.social avatar

Thinking Functionally in PHP by Larry Garfield is free with a Leanpub Reader membership! Or you can buy it for $25.00! http://leanpub.com/thinking-functionally-in-php

wuetug, to php German
@wuetug@wue.social avatar

TRUNCATE sys_template; 🥳

Unsere Website läuft jetzt mit Site Sets (und TYPO3 13.1), und ohne eine einzige Zeile TypoScript in der Datenbank.

https://docs.typo3.org/m/typo3/reference-coreapi/main/en-us/ApiOverview/SiteHandling/SiteSets.html

  • All
  • Subscribed
  • Moderated
  • Favorites
  • JUstTest
  • kavyap
  • DreamBathrooms
  • thenastyranch
  • magazineikmin
  • osvaldo12
  • khanakhh
  • Youngstown
  • mdbf
  • slotface
  • rosin
  • everett
  • ngwrru68w68
  • Durango
  • anitta
  • InstantRegret
  • GTA5RPClips
  • cubers
  • ethstaker
  • normalnudes
  • tacticalgear
  • cisconetworking
  • tester
  • Leos
  • modclub
  • megavids
  • provamag3
  • lostlight
  • All magazines