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 »

Advertisements




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 »





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

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 »








%d bloggers like this: