Signs I need to go to bed: I just pushed to a branch named "yeet-me-to-the-moonmoon".

Current status: doing fun things with ReactHttpServer in Sculpin ...

There we go, moved all of my social media tabs to Firefox. Hopefully it can handle all of them without falling over. (FB/Insta aren't in the mix, so it should be fine)

Er, I think I actually mean when used in conjunction with uasort().

If I'm reading things correctly, strnatcmp and strnatcasecmp have "undefined" behaviour for sorting things that are equal. Is there any way to do the same sort of sorting, but ... preserve the existing order of equal items?

kboyd boosted

We did what Valve couldn't do, and counted to 3!

We're happy to announce Sculpin 3 has been released! Thank you
for all the hard work!

I should probably post this here - after all, if anything is going to go "toot", it'd be a tugboat.

"Adding New Content Types to Sculpin"

In this post, I use Sculpin 3.0-RC1's new "content:create" command to add a dedicated section for Short Stories to my blog. I'm calling the new feature "Tales from the Whateverthing".

PHP question: Why can't traits have constants?

I wrote a service class that accepts an integer ID and returns an entity (basically an entity repository). But I'm torn on how it should behave if the provided ID is invalid - e.g., a string. Should it throw an exception? Should it return null? Should it use type hinting to enforce the contract & force the controller to sort it out? Yeah, probably that one. Erph.

Ah, solved (but still worrying): the website mistakenly tried to load a resource from localhost. That makes sense, since I had a server running on port 80.

Had. 😰

... I swear I just visited a website and it triggered xdebug in phpstorm. That's ... uh ... not good. For several reasons.

Although now I'm seeing some coverage gaps - like I'm not sure how to handle the ->error() stuff. Perhaps with middleware.

Wrote this Silex to Slim quick port guide almost a year ago and, sure enough, it's coming in handy again. :)

Heh. There's a PR on the mastodon project for supporting code blocks in the Formatter:

// you know, like this
$myVariable = 'why is it still in PR?';

... and it seems to be languishing. Tempted to poke it, but I find working with Ruby a bit quarrelsome.

Show more
PHP Community on Mastodon

Open source. Open community. We are dedicated to building and enriching the PHP community. Join us!

Welcome to the PHP Community on Mastodon! We're a friendly little Mastodon instance providing a place for PHP developers to discuss topics related to PHP, as well as topics unrelated to PHP. First and foremost, we're about building community, and that doesn't always involve technical discussion, so feel free to go off-topic and have fun.

Before you get started, make sure you check out our code of conduct.

Thank you to Jakob Westhoff for allowing the use of the photograph "elePHPants walking through the light."