Created
June 13, 2012 21:16
-
-
Save vstarck/2926553 to your computer and use it in GitHub Desktop.
broken.lambdas.php
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 | |
// Constants may only evaluate to scalar values | |
define('MY_CONSTANT', function() {}); | |
class Foo { | |
// Parse error: syntax error, unexpected T_FUNCTION | |
const IS_GET = function() {}; | |
// Parse error: syntax error, unexpected T_FUNCTION | |
private $foo = function() {}; | |
// Parse error: syntax error, unexpected T_FUNCTION | |
private $fns = array( | |
'foo' => function() {}; | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment