New here?

Here are some of the most popular posts to get you started:

On call_user_func()

Little known change of PHP 5.4: you don’t have to use the call_user_func() function anymore to call generic callables!

Before 5.4 you could only use () to call variables when the type was a String or Closure, otherwise you would have to use call_user_func(). Since 5.4 however, you can simply do () on anything which satisfies the callable typehint, as illustrated below:

<?php

class Foo
{
	function bar()
    {
        echo "Hello World\n";
    }
}

$cb = array(new Foo, "bar");
$cb();

$cb = "strlen";
var_dump($cb("foo"));

(Try it)

Currently this doesn’t make much difference, but it’s a nice step to improve readability a bit.

Together with Argument Unpacking (currently slated for 5.6) this could make call_user_func_array() obsolete too.

Yay! We won’t have to use functions to call functions anymore!

Available for hire

I’m now officially available for hire. I’m interested in positions in full stack product development and I’m flexible what role to take in a project. I’m also very interested in DevOps positions.

Fulltime employment with 100% remote working is preferred.

Ping me if you have something interesting.