Last active
August 29, 2015 14:20
-
-
Save cebe/844f3a7a4d3229637e73 to your computer and use it in GitHub Desktop.
Magic explained for: http://3v4l.org/jNb0R
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 | |
// assign the value foo to a variable named x | |
$x = "foo"; | |
// assign the value bar to a variable named "x", the name includes the " ;) | |
${'"x"'} = "bar"; | |
// assign the value of a variable, whos name you determine from the content | |
// of the HEREDOC, which is "x" (the name includes the "), to the variable named doc | |
$doc = "${<<<'HERE' | |
"x" | |
HERE | |
}"; | |
// print the value and type of variable doc | |
var_dump($doc); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment