Hello, Again!

31 12 2014

Flickr: by rdohms

I chanced upon some amusing JAVA code today and decided to translate it into PHP. Here’s the code:

Read the rest of this entry »

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 »

%d bloggers like this: