Why it shouldn't work? Read this: http://php.net/manual/en/functions.variable-functions.php