Triangular Phun

23 05 2019

Photo on Flickr by Larkspur Studio

Some academic questions are simply too fun, i.e. phun in old-style PHP lingo, to shun. Mixing prime numbers with triangles may seem like a wacky idea, but once you’ve tried it, you may find yourself completely captivated.
Read the rest of this entry »

PHP: Puzzling Over a Broken Line

10 02 2019

yellow and pink flowers view behind broken glass

Photo by Pixabay on

Did you ever encounter white space that just refused to budge?  I have and learned an important lesson.  Just as you ought not to judge a book by its cover, be careful when looking at code because sometimes you may mistakenly assume that what you see is what you get! Of course, to quote the Rollingstones:

You can’t always get what you want, 
But if you try sometime
You’ll find
You get what you need

Read the rest of this entry »

PHP: byebye

20 01 2019


If you think that this blogpost represents my swansong to PHP, know that I’ve been enamored of it since 1999, albeit nowadays a little less heady and more open-minded about competing technologies. The salutation entitling this blog post refers to an academic exercise, reminiscent of the fun  phun offered by fizbuzz.  In this case, the challenge involves  deriving the casual form “byebye” from “goodbye”. The impetus for this topic comes from an online discussion with respect to the C Programming Language (“C”), which caused me to ponder the merits of applying PHP for this purpose. 

Read the rest of this entry »

PHP: The Unexpected Elseif …

30 12 2018


Flickr: dominicspics

Recently,  a newbie posted a question online, inquiring about why  a white screen appeared instead of expected output when a PHP script executed.  Unfortunately, website “police” closed the question, and proffered a link suggesting  that the matter merely entailed setting up proper error reporting. If only such were the case! 

Read the rest of this entry »

PHP: Something Borrowed, Something Blue

8 04 2018

PHP first appeared more than two decades ago, becoming wildly popular as if it were some bright, new shiny toy to the delight of developers around the world. Enthusiasts proudly displayed the lovely soft blue logo on their sites. What may be less than apparent even after all these years pertains to the impact of Perl on PHP.  
Read the rest of this entry »

PHP and the Gem Within

23 11 2017

Flickr: by Hetx

Ubiquitous and lithe, little characters, popping up anywhere from user-defined functions to control structures and class definitions, PHP’s curly braces depending on circumstances may exhibit a distinctly Perlish quality. Perl exerts an influence since it figures as one among three languages from which PHP, indelicately-speaking, purloins much of its syntax. PHP’s connection to Perl also relates to its predecessor PHP/FI, originally a Perl hack that Rasmus Lerdorf later rewrote in the C Programming Language. To better appreciate PHP, certainly its Perlish facet merits inspection, and complex (curly) syntax, lends itself well to this endeavor.

Read the rest of this entry »

PHP: Converting Numbers into English

9 10 2017

Flickr: By Maureen Barlin

Here’s a fun interview question for which you may wish to prepare. Create a PHP script to express integers ranging from 1-9999 in English.
Read the rest of this entry »

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 »

%d bloggers like this: