closures - first comment
| From: | Brian Walker | Date: | Mon, 12 Dec 2011 22:35:17 +0000 |
| Subject: | closures - first comment | ||
| Groups: | php.webmaster | ||
| Request: | Send a blank email to php-webmaster+get-12621@lists.php.net to get a copy of this message | ||
You may want to correct the comment made by jochenvandevelde at gmail dot com
regarding Closures (http://www.php.net/manual/en/functions.anonymous.php#106805).
Their observation is incorrect, syntax is wrong:
var_dump(($one == $two)); // -> (bool) false
var_dump(($one === $two)); // -> (bool) false
var_dump(($one == $three)); // -> (bool) false
var_dump(($one === $three)); // -> (bool) false
Should be:
var_dump(($one() == $two())); // -> (bool) false
var_dump(($one() === $two())); // -> (bool) false
var_dump(($one() == $three('foo'))); // -> (bool) false
var_dump(($one() === $three('foo'))); // -> (bool) false