Last active
April 6, 2019 19:50
-
-
Save vbarbarosh/c8b26e5a0b7bf0410c117a76d07727ff to your computer and use it in GitHub Desktop.
php_function_alias – Create an alias to a function https://codescreens.com
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| # Create an alias to a function | |
| function foobar($a) | |
| { | |
| echo 'hello ', $a, PHP_EOL; | |
| } | |
| function foobar_alias() | |
| { | |
| return call_user_func_array('foobar', func_get_args()); | |
| } | |
| foobar(555); | |
| foobar_alias(555); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment