PHP: Turning Bad Code into Good

25 07 2017

You don’t have to write beautiful or elegant code in PHP. In fact, some would argue that PHP would never win a beauty contest. Yet, one might argue that beauty is a marker for health, so beautiful, elegant code may indicate something about how robust the code is.
Read the rest of this entry »


PHP: (Ab)using the For-Loop

22 07 2017

Flickr:  by mald

This blogpost draws inspiration from a similar one exploring ways to use or abuse loops in the C Programming Language Read the rest of this entry »

A Recursive Exercise in C

20 07 2017

By Photo: RK812, Doll carved by Zvezdochkin, painted by Malyutin

Recently someone asked an interesting question at StackOverflow about using recursion  in the C Programming Language to achieve the same result as code relying on a loop structure.  The question pertained to outputting a geometric pattern. Read the rest of this entry »

PHP: Dynamically Transforming a String

18 06 2017

Flickr: by Gnu200

Some people may be less than enamored of academic computer programming questions, preferring instead Read the rest of this entry »

Practical PHP vs Academic JavaScript

13 05 2017

Flickr: by redvers


The following represent two questions that I came across at another site Read the rest of this entry »

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 »

%d bloggers like this: