note 83298 deleted from language.references.pass by googleguy

From: Date: Tue, 22 Oct 2013 11:00:09 +0000
Subject: note 83298 deleted from language.references.pass by googleguy
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-197000@lists.php.net to get a copy of this message
Note Submitter: mehea ---- New in PHP5: assign default value to pass-by-reference paramter. I didn't believe it even when I read http://devzone.zend.com/article/1714-Whats-New-in-PHP-5 Then I tried this: <?php function my_func(&$arg = 22) { if ($arg == 22) { print '$arg is '. $arg; } } my_func(); ?> Guess what? It works, even tho' not clear about what $arg is actually referencing!

« previous php.notes (#197000) next »