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 »

Advertisements




PHP: Puzzling Over a Broken Line

10 02 2019

yellow and pink flowers view behind broken glass

Photo by Pixabay on Pexels.com

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

See https://www.flickr.com/photos/dominicspics/5309495996/sizes/m/

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 »





JavaScript: And Then–Unexpectedly

29 12 2017

Flickr: by michaelleckman

Imagine an array that purportedly contains only string values. 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 »








%d bloggers like this: