How to alias a function in PHP?

Until PHP 5.5

yup, function wait ($seconds) { sleep($seconds); } is the way to go. But if you are worried about having to change wait() should you change the number of parameters for sleep() then you might want to do the following instead:

function wait() { 
  return call_user_func_array("sleep", func_get_args());
}

PHP 5.6+ only

Starting with PHP 5.6 it is possible to alias a function by importing it:

use function sleep as wait;

There's also an example in the documentation (see "aliasing a function").