PHP: Going to Zero

2 12 2014

Flickr: by djniks

Following in the tradition of its predecessor Perl, PHP has its own secret operators (see “Inchworm on a Stick“).Today let’s explore the heretofore unknown PHP operator, “->”, most remarkable for quickly reducing a numerical value to zero.  At first sight, one might mistake this symbol for PHP’s arrow operator designed to access an object’s properties and methods, until one realizes that two hyphens instead of one distinguish this arrow.  So, why have we yet to hear about this new operator? What is its name and why does the operator precedence table (see Manual) neglect to include it?

Read the rest of this entry »

Advertisements




Let Me Count The Ways …

1 11 2014

Flickr: by Dom Dada

Elizabeth Barrett Browning pondered affairs of the heart when she penned her famous love poem, a fragment of which entitles this piece as an acknowledgment of PHP’s characteristic TIMTOWTDI (“there is more than one way to do it”) approach, particularly prevalent in displaying data.

One of the earliest ways to do output involved PHP utilizing an echo command written in C for the express purpose of Read the rest of this entry »








%d bloggers like this: