2025-11-17 13:55:02
Let's be controversial: In modern #PHP, you should never type-hint an array.
https://peakd.com/php/@crell/php-never-type-hint-on-arrays
Let's be controversial: In modern #PHP, you should never type-hint an array.
https://peakd.com/php/@crell/php-never-type-hint-on-arrays
stscoundrel/struct: Structs for PHP. Simple data transfer objects. Supports immutability.
#php
I'm not 100% sure this is the right way, but I sure didn't have “Contribute to the php.net web site" on my 2025 bingo card, and yet…
/cc @…
#PHP
Let's be controversial: In modern #PHP, you should never type-hint an array.
https://peakd.com/php/@crell/php-never-type-hint-on-arrays
Freshly built images, same issue. #PHP 8.4 image output should be the same as PHP 8.5 output:
Using #PSR-3 placeholders properly in #PHP (and other awesome alliterations).
https://peakd.com/hive-168588/@crell/u
RE: #PHP ist so weit abgerutscht?
Was ist denn heute bei Web
Using #PHP arrays as pseudo-objects is almost never the right answer. They're less self-documenting, slower, worse on memory, and more bug prone.
https://peakd.com/php/@crell/php-use-a
There's no such thing as $_PUT in #PHP . One must fake it
$_PUT = array();
parse_str(file_get_contents('php://input'), $_PUT);
Ran into this little quirk of (many) C-syntax languages, yesterday. Hadn't seen it before.
#PHP
```
<?php
function getApiData() {
https://example.org/api
return file_get_contents("
Null is problematic, but why? Let's see why, and let that guide us to new alternatives. #PHP
https://peakd.com/hive-168588/@crell/much-ado-about-null
I dare you to build a website with plain #php, json markdown and csv. No sql, no laravel, no twig
I've been dragging a `~/.ssh` directory around with me since at least 2008.
I can probably safely purge these, now, though—right? (-;
```
❯ cat ~/.ssh/known_hosts | grep php.net | awk {'print $1'}
y2.php.net,69.147.83.197
y1.php.net,69.147.83.196
```
#php
I currently have 4 in-flight RFCs for PHP, and one more I'm trying to launch soon. I'm not actually paid for any of this.
I think I may be the problem...
#PHP #OpenSource
In May, I'll be giving what will probably be the first ever PHP 8.6 talk: Piping Hot PHP.
8.5 isn't even cool yet, but 8.6 already has some hot new features. Combining 8.5's pipe operator with the new partial function application capabilities in 8.6 should give us a whole new way to think about structuring code!
Want to be the first to see the future? Get your tickets to #phptek
Queens of #PHP, from sometime in the '00s.
@… @…
(Not sure Laura is on here, and I haven't talked to Dhwani in… at least 15 years…
Advanced PHPUnit Data Provider shenanigans. #PHP
Part 1: https://peakd.com/hive-168588/@crell/fun-with-phpunit-data-providers
Part 2:
What in the #PHP?
I just updated 8 libraries I maintain to run on PHP 8.5.
None of them required any changes for 8.5. One had two deprecation nitpicks left over from 8.4 that I'd not previously caught, trivially fixed.
It took me a little over an hour to do all 8, including some other maintenance at the same time.
PHP upgrades rock if your code is good. 🙂 :elephpant:
#PHP
RE: #php
RE: #PHP d…
Null is problematic, but why? Let's see why, and let that guide us to new alternatives. #PHP
https://peakd.com/hive-168588/@crell/much-ado-about-null
On empty return values. #PHP
https://www.garfieldtech.com/blog/empty-return-values
At #longhornphp, @… is talking about the history of floss.
I didn't think I was at a dental conference, but here we are.
#php
RE: #php