The Travails of Traversal

13 07 2016

Flickr: By JacobDavis

The venerated foreach-loop may seem to have formed a part of PHP from the outset, but it actually entered the language starting with PHP 4, apparently appropriated from Perl. While nowadays, this control structure provides a convenient way to iterate over an array or object without the complication of conditional looping inherent in for, while, and do-while loops, it was originally intended to provide a way to easily traverse arrays (see PHP Manual published 3-6-2003). Read the rest of this entry »





Reaching for the Stars

27 03 2016

Flickr: by OblongFlickr: by Oblong

In 2014, Davey Shafik, author of the Zend PHP 5 Certification Study Guide, presented a proposal to the PHP Internals List recommending the addition of yet another operator, the spaceship. While the operator’s name may connote PHP blasting off, its down-to-earth function scarcely relates to outer space. Read the rest of this entry »





The Erroneous Basis of base_convert()

29 01 2016

July

July (Photo credit: kurafire)

Some bugs linger from one version of PHP to the next, such as the one associated with base_convert() and other base conversion functions. It has existed at least since the long, gone days of PHP 4. It even managed to escape the notice of Eevee in his encyclopedic rant railing against PHP a few years ago. An understandable oversight, given that nowadays developers usually apply themselves to other endeavors than converting values from one base to another. Read the rest of this entry »





PHP: Classy Dynamics

16 01 2016

flickr: by JusDaFax

Devotees of PHP may worry with the debut of PHP 7 that users have lost the beloved language we’ve known over the past twenty years. In truth, the newest version generally conforms to previous ones. In fact, the advent of PHP 7 heralds a technology distinguished by greater flexibility and consistency.

Read the rest of this entry »





Modulating the Modulo

28 11 2015

Flickr: by by Toño Garces

 

A recent article contrasting PHP with Ruby, denigrates making comparisons of one language with others, dismissing such efforts as worthless save for being a clickbait strategy. Yet, sometimes the best way to understand the familiar requires venturing out and exploring something new. If one only knows PHP, a developer may still write quality code. But, learning about C, JavaScript and Python, all of which have influenced PHP, may enhance one’s appreciation for its nuances.And, let’s not forget the other “P” in the pod, Perl, which had a pivotal bearing on PHP’s early development. Speaking of Perl, its creator Larry Wall drew inspiration from UNIX. Of particular interest, that operating system’s (OS) Bourne Shell has an open-sourced cousin bash (the “Bourne Again Shell”), knowledge of which may also enhance one’s appreciation for PHP. Read the rest of this entry »





The Power behind the Throne

21 09 2015

flickr: from British library

 

While looking forward to the upcoming official release of the latest incarnation of PHP, namely PHP7 (slated for November 12th), spending a moment or two reviewing such basics as the expression statement should enhance one’s appreciation for PHP and how this powerful feature contributes to its feasibility, permitting it to reign more than two decades. Read the rest of this entry »





The Real Error

22 07 2015

flickr: by Poulepondeuse

Sometimes a PHP script may produce an inconsistent type of error, i.e. in one version of PHP a less serious parse error displays while in another version a fatal error message appears.  Read the rest of this entry »








%d bloggers like this: