Articles in the general-programming category

  1. PHP Puzzlers #1

    Sat 09 April 2016

    PHP has some idiosyncrasies that can cause odd or counter intuitive behavior. This will be a series of short posts covering some of these situations.

    Let’s have a look at the following simple piece of code:

    $arr = array('foo','bar','baz');
    
    
    foreach($arr as &$item){
       echo "First array: ".$item …
    Tagged as : PHP
  2. Generators In PHP

    Fri 11 March 2016

    PHP 5.5 added a really nice feature: Generators.

    Generators allow you to create a function that returns an list of items without having to create a (possibly very large) array first.

    Here’s a simple “classic” generator example. Suppose you wanted to create a range function (PHP provides this …

    Tagged as : PHP
  3. GitHub and BitBucket backups

    Fri 05 February 2016

    Being mildly paranoid about my data I sometimes worry what would happen to my repositories and gists on GitHub and BitBucket (mid way through drafting this post GitHub went down. Just because you’re paranoid doesn’t mean they’re not after you!). Luckily both these services provide an API …

Page 1 / 1