note 30273 deleted from function.call-user-func-array by cmb

From: Date: Sun, 30 Aug 2015 17:59:28 +0000
Subject: note 30273 deleted from function.call-user-func-array by cmb
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-203508@lists.php.net to get a copy of this message
Note Submitter: nutbar at innocent dot com ---- This function, combined with some others, can allow you to make some really easy & generic function macros (since real macros don't exist in PHP yet). <?php function my_printf() { $args = func_get_args(); return call_user_func_array('printf', $args); } ?> This allows you to use my_printf() just as if it were printf() itself. Very useful since you don't have to worry about how many arguments any functions take.

« previous php.notes (#203508) next »