Today’s anonymous submitter is shocked to discover that FizzBuzz really works (and TDD isn’t as alive and well as he’d hoped).
A local company asked me for assistance recruiting a new PHP developer. I helped them come up with a job description, a few interview questions, and I threw in the FizzBuzz test for …
Guzzle 3.0 was released tonight, bringing with it an enormous number of improvements to an already feature-rich PHP HTTP client and web service framework.
Advanced service descriptions
Hands down, the biggest changes in Guzzle are found in Guzzle’s service descriptions . Guzzle’s new service description …
Look, I know this is going to be tough to read, and I usually try to post short, snappy code snippets, but this is just too good. Or sad. Whatever. Words truly escape me.
Take it away anonymous submitter:
“Look at all these standalone ternaries for validating form input. What a mess! They’re embedded in what …
**UPDATE**: The functionality described below is now baked in to Silex,
checkout the [ServiceControllerServiceProvider](http://silex.sensiolabs.org/doc/providers/service_controller.html).
**TL;DR** Use a custom controller resolver to load controllers
from the service container - [code][code]
I just returned from PHPCon Poland , a very nice conference taking place in the middle of beautiful scenery. Although there were only 5 talks in English (3 of which were given by Belgians – Thijs Feryn , Michelangelo Van Dam and myself), the conference was definitely interesting and fun.
I gave a relatively new …
It takes a big man to admit when he’s wrong, and @dilbert4life is one of those men. Here’s a snippet of horror that he wrote around a year-and-a-half ago.
Too many defines? Nay! I say let the site grow and see just how many we can stuff in there.
Starting with this post, we have a new category here at CSI: PHP. It’s called
‘ mea culpa ’, and it’s criminal
code written by yours truly.
and HTML. It’s the only function in a file called common.php, which makes
perfect sense because …
Seriously. Stop it. Or you’ll end up with garbage like this, in which a developer
writes two separate functions for converting JSON to
an array, only one of which is compatible with json_decode .
Yes, both are in production.
CSI: PHP investigator Duane Gran sent in this horrifying snippet. He explains:
I wondered why dumping the $_POST variables before this section didn’t help
in debugging. This occurs in a second step of a 3-step form on a GET request.
It applies a set of session fields to the $_POST variable for later use. …
Yesterday, Zend Framework 2.0 and Symfony 2.1 were released... almost at the
same time. First, I want to congratulate the Zend Framework team for this huge
milestone; I know that working on a new major version is no small task.
And of course, people started to ask questions about these new versions and
one of the …