Quantcast
Browsing all 26 articles
Browse latest View live

James Fuller's Blog: Enforcing contracts in your PHP functions and methods

James Fuller has a new post to his blog today about a way you can enforce contracts in your PHP using a combination of type hinting and value checking. Design by contract is an important concept for...

View Article


PHP Tip-a-Day: PHP Tutorial: Convoluted Code - Combining Ternary Operators...

On the PHP Tip-a-Day site Greg Bulmash shares a bit of "convoluted code" that could potentially cause confusion in the future maintenance of your application - combining ternary with anonymous...

View Article


DZone.com: All the ways to perform HTTP requests in PHP

On DZone.com there's a recent post from Giorgio Sironi listing out some of the HTTP client utilities that can be used in your PHP applications. In the PHP world, HTTP is very important: not only for...

View Article

PHPEasy.co.uk: Sorting array data using SplMaxHeap

On PHPEasy.co.uk today there's a new tutorial posted showing you how to sort using the SplMaxHeap functionality provided by the Standard PHP Library. The SplMaxHeap class basically stores numbers in...

View Article

Nikita Popov: Are PHP developers functophobic?

In his most recent post Nikita Popov asks if PHP developers are functophobic - that, in some of his experience, they don't like to use functions. Now, that was overly general, so let me clarify: PHP...

View Article


Timothy Boronczyk: PHP Assertions

Timothy Boronczyk has written up a new post that looks at using assertions in PHP - the actual use of the assert function to evaluate values in your code. I stumbled upon assertions in PHP today,...

View Article

David Zentgraf: How Not To Kill Your Testability Using Statics

If you've been around PHP for any length of time, you know about the static functionality and keyword that the language offers. You might have used it in the past for a few things, but maybe you're...

View Article

Matt Frost: Mocking SoapClient

Matt Frost has shared some of his work he's done with the SoapClient in PHP and how he mocked it out for his unit tests (since it's an external resource). The concept of mocking web services for...

View Article


Reddit.com: Let's Make PHP's Function Names Consistent!

On Reddit.com there's a heated discussion going on in response to this bug filed asking about aliasing PHP function names to make them more consistent (specifically "htmlentities_decode" versus...

View Article


Andrew Podner: Closures, Lambdas, and Anonymous Functions

Andrew Podner has posted an introduction to a concept in PHP that may not be easy to immediately grasp for someone relatively new to the language - the idea of lambdas and closures. Beginning with PHP...

View Article

Brandon Savage: Always Return Something

In this post to his site Brandon Savage talks about "always returning something" from your methods and functions back to the calling script. He also suggests that null is not an option. A few weeks...

View Article

Ben Ramsey: Introducing Array_column() in PHP 5.5

Ben Ramsey has a new post talking about a feature that will become available in the PHP 5.5.x release series of the language - the array_column function. This function will extract all values from an...

View Article

Extending Twig Templates: Inheritance, Filters, and Functions

On PHPMaster.com today there's a new tutorial for the Twig templating users out there showing you how to extend your templates via inheritance, filters and functions - all abilities already built in...

View Article


Elijah Horton: Sandboxing Untrusted Code With PHPSandbox

Elijah Horton has a recent post to his site sharing a tool he's developed to sandbox and validate PHP code of user-contributed code. Few quotes related to the PHP language are as pithy and...

View Article

PHPMaster.com: An Introduction to Ctype Functions

On PHPMaster.com today David Shirey has a written up a new tutorial introducing the ctype functions in PHP. This set of functions provides a handy way to more correctly check values to ensure they're...

View Article


Phil Sturgeon: Potential Variadic Function Syntax for PHP 5.6

Phil Sturgeon has another post to his site about a recently proposed RFC for PHP. This time it's about implementing a variadic function syntax in the language. This kind of handling would allow for a...

View Article

Lorna Mitchell: PHP 5.6 and the Splat Operator

Lorna Mitchell has a new post to her site looking at a feature of the upcoming PHP 5.6 release, the splat operator (three ellipsis...). We have a couple of new features coming in to PHP 5.6 with names...

View Article


Joshua Thijssen: Internal PHP function usage

Curious about the usage of the various "internal" (built-in, not user defined) functions in use is a wide range of PHP applications, Joshua Thijssen did some research on GitHub and has shared the...

View Article

Joshua Thijssen: Internal PHP function usage: revisited

Joshua Thjissen has revisited some of his PHP internal function statistics, an update from this previous post with some results showing the most (and least) used internal PHP functions in several...

View Article

Anthony Ferrara: What's In A Type

In a new post to his site Anthony Ferrara takes on the topic of typing in PHP, discussing some of the main ideas around the current typing scheme and the discussions being have about potential...

View Article
Browsing all 26 articles
Browse latest View live