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 »

Advertisements




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 »





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: (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 »








%d bloggers like this: