Created
September 28, 2016 15:04
-
-
Save thomaslorentsen/670ea408172b54348913924d7fb9a063 to your computer and use it in GitHub Desktop.
Replicates the cannot access variable error
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 | |
class Foo { | |
function __construct() { | |
$foo = "\0"; | |
$this->{$foo} = 'hello'; | |
} | |
} | |
$f = new Foo(); | |
echo var_dump($f); | |
echo "\n"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment