Archive for the ‘Standards’ Category

Creating Strictly Typed Arrays and Collections in PHP

Posted on: No Comments
One of the language features announced back in PHP 5.6 was the addition of the ... token to denote that a function or method accepts a variable length of arguments. Something I rarely see mentioned is that it’s possible to combine this feature with t...

The State of PHP MVC Frameworks in 2017

Posted on: No Comments
A simple question prompted me to sit down and write this follow up to my article from about a year ago. Q: Any thoughts about where things are today? (2/24/2017) A: “I’d say it’s pretty much down to Laravel and Symfony at this point; when it come...

PHP Fractal – Make Your API’s JSON Pretty, Always!

Posted on: No Comments
If you've built an API before, I'll bet you're used to dumping data directly as a response. It may not be harmful if done right, but there are practical alternatives that can help solve this small problem. One of the available solutions is Fractal. It ...

Event Sourcing in a Pinch

Posted on: No Comments
Let's talk about Event Sourcing. Perhaps you've heard of it, but haven't found the time to attend a conference talk or read one of the older, larger books which describe it. It's one of those topics I wish I'd known about sooner, and today I'm going to...

What Would You Pay to Make 27% of the Web More Secure?

Posted on: No Comments
It’s Open Source Week at SitePoint! All week we’re publishing articles focused on everything Open Source, Free Software and Community, so keep checking the OSW tag for the latest updates. Scott Arciszewski, known on Twitter as CiPHPerCoder, is to s...

2FA in Laravel with Google Authenticator – Get Secure!

Posted on: No Comments
There are many ways an attacker can get a user's password. It could happen through social engineering, key logging, or by some other nefarious means. Passwords alone are not enough to protect users from their accounts being compromised, specially if a...

Testing PHP Code with Atoum – an Alternative to PHPUnit

Posted on: No Comments
If you’ve been around PHP for more than a little while, you’ve no doubt started to test your code. And if you ask anyone in the PHP space what to use for writing unit tests, likely the first answer that they’ll give you is PHPUnit. It’s the de ...

From HTTP Messages to PSR-7: What’s It All About?

Posted on: No Comments
The PHP Framework Interoperability Group (PHP-FIG) has relatively recently approved another proposal, the PSR-7: HTTP Messages Interface. The document crystallizes HTTP messages into 7 interfaces which a PHP library should implement if they subscribe t...

Quick Intro: PhpCompatibility for PHPCS – Are You PHP7 Ready?

Posted on: No Comments
Sooner or later, there will come a time when you will need to migrate your projects to different PHP versions. How will you check if you’re compatible with a PHP version different to the one you’ve been developing on? One possibility is alw...