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 »

The Erroneous Basis of base_convert()

29 01 2016


July (Photo credit: kurafire)

Some bugs linger from one version of PHP to the next, such as the one associated with base_convert() and other base conversion functions. It has existed at least since the long, gone days of PHP 4. It even managed to escape the notice of Eevee in his encyclopedic rant railing against PHP a few years ago. An understandable oversight, given that nowadays developers usually apply themselves to other endeavors than converting values from one base to another. Read the rest of this entry »

PHP: Classy Dynamics

16 01 2016

flickr: by JusDaFax

Devotees of PHP may worry with the debut of PHP 7 that users have lost the beloved language we’ve known over the past twenty years. In truth, the newest version generally conforms to previous ones. In fact, the advent of PHP 7 heralds a technology distinguished by greater flexibility and consistency.

Read the rest of this entry »

Modulating the Modulo

28 11 2015

Flickr: by by Toño Garces


A recent article contrasting PHP with Ruby, denigrates making comparisons of one language with others, dismissing such efforts as worthless save for being a clickbait strategy. Yet, sometimes the best way to understand the familiar requires venturing out and exploring something new. If one only knows PHP, a developer may still write quality code. But, learning about C, JavaScript and Python, all of which have influenced PHP, may enhance one’s appreciation for its nuances.And, let’s not forget the other “P” in the pod, Perl, which had a pivotal bearing on PHP’s early development. Speaking of Perl, its creator Larry Wall drew inspiration from UNIX. Of particular interest, that operating system’s (OS) Bourne Shell has an open-sourced cousin bash (the “Bourne Again Shell”), knowledge of which may also enhance one’s appreciation for PHP. Read the rest of this entry »

The Power behind the Throne

21 09 2015

flickr: from British library


While looking forward to the upcoming official release of the latest incarnation of PHP, namely PHP7 (slated for November 12th), spending a moment or two reviewing such basics as the expression statement should enhance one’s appreciation for PHP and how this powerful feature contributes to its feasibility, permitting it to reign more than two decades. Read the rest of this entry »

The Real Error

22 07 2015

flickr: by Poulepondeuse

Sometimes a PHP script may produce an inconsistent type of error, i.e. in one version of PHP a less serious parse error displays while in another version a fatal error message appears.  Read the rest of this entry »


21 02 2015

Food for Thought: Read the rest of this entry »

Links for Best in Show

20 02 2015

flickr: by by Bryn Pinzgauer

The following links represent some of the resources I consulted for my talk “Best in Show” Read the rest of this entry »


9 02 2015

speaker-webbadge-large Read the rest of this entry »

Sleight of Date

3 01 2015

Flickr: by Paolo Margari

Someone posted an interesting JavaScript question recently at StackOverflow, concerning how one may  convert a date string into Unix time without the timezone effecting the result. In reflecting on that question, I also discovered a “trick” by which one can fool a local date object to a degree.

Read the rest of this entry »

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 »

Let Me Count The Ways …

1 11 2014

Flickr: by Dom Dada

Elizabeth Barrett Browning pondered affairs of the heart when she penned her famous love poem, a fragment of which entitles this piece as an acknowledgment of PHP’s characteristic TIMTOWTDI (“there is more than one way to do it”) approach, particularly prevalent in displaying data.

One of the earliest ways to do output involved PHP utilizing an echo command written in C for the express purpose of Read the rest of this entry »

A Lasting List Fix?

22 10 2014

Flickr: by Burstyriffic

One of PHP’s most convenient constructs is Read the rest of this entry »

Flattening a Multidimensional Array

16 10 2014

A 3D projection of an 8-cell performing a doub...

Image via Wikipedia


To meet the challenge of flattening a multidimensional array, one should consider Read the rest of this entry »

Illuminating a Dark Alley

15 10 2014

Flickr: by I.Gouss


“PHP has its share of dark alleys that you really don’t want to find yourself inside.   Object properties with names that are numbers is one of them…”

Jon,  StackOverflow


Object properties with integers for names are illegal in PHP.  Yet, Read the rest of this entry »

One Way or Another!

27 09 2014

flickr: by Wiertz Sébastien


I recently dusted off an old tome among my PHP books, Read the rest of this entry »

Links 4 Surprise! It’s PHP :)

6 09 2014

Flickr: by Philerooski

A few notable links from my latest talk Read the rest of this entry »

Constant Consistency

31 08 2014

Flickr: by better_days.geo

For some time PHP has had the ability to create constant expressions with define(). Read the rest of this entry »

Exploring the Question of Embedded Java in PHP

5 04 2014

flickr: by Mangiwau

Today, I discovered a curious tweet by Volker Dusch that may cause one to consider the wild possibility of embedding Java in PHP. Read the rest of this entry »

Taking Stock of the Stack in PHP

29 03 2014

flickr: by cvfyne


You may have heard about ‘the stack’ or call stack, part of a computer’s random access memory (RAM), wherein a function, including its parameters and return value, reside temporarily. One retrieves them on the basis of FILO (First In, Last Out), synonymous with LIFO (Last In, First Out). Users of high-level languages like C and PHP are much less likely to directly handle this stack. Read the rest of this entry »

Post Script on POW

10 03 2014

Flickr: by Anders Sandberg (Arenamontanus)

The new pow operator ** has needed a little tweaking and at the same time we may need to rethink the usefulness of the pow().   Read the rest of this entry »

Networking Trivia

5 03 2014

flickr: by estebanvillano

In today’s post, I’d like to share some basic networking minutiae mostly from a Linux perspective as if it were a quiz. But, I’ll do one better, and share the results of all my Goog-ooling. Read the rest of this entry »

PHP Curiosities

22 02 2014

Curiosity is the wick in the candle of learning.
William Arthur Ward
Flickr: Photo by cirruspop 

This is the resource listing used for the talk entitled “PHP Curiosities” presented first at SCALE PHP BOF, February 22, 2014. Read the rest of this entry »

Taming the Wild West of PHP

11 01 2014

Flickr: by Moyan_Brenn

In a previous posting, I briefly mentioned something bizarre that happened this past December 2013.   Read the rest of this entry »

Inching Along Through PHP

24 12 2013

Geometer Moth, Geometridae

Geometer Moth, Geometridae (Photo credit: Andreas Kay)

It begins its life journey first as larva.  Later, a metamorphosis occurs, Read the rest of this entry »

PHP on the Cusp of a New Operator

20 12 2013

Flickr: by yh828

For nearly two decades, if you include precursor PHP/FI, PHP lacked a basic mathematical operator, the one for exponentiation. Read the rest of this entry »

Magic, Sugar & Lipstick – Resources

4 12 2013

by hohcdc

This is the resource listing used for the 2013 talk entitled “Magic, Sugar & Lipstick”. Read the rest of this entry »

%d bloggers like this: