Skip to content

Instantly share code, notes, and snippets.

@panvid
Created November 9, 2017 11:27
Show Gist options
  • Save panvid/590263dc4eb1e7a5f70c8148bcca866c to your computer and use it in GitHub Desktop.
Save panvid/590263dc4eb1e7a5f70c8148bcca866c to your computer and use it in GitHub Desktop.
<?php
class A {
function __toString() {
return 'bar';
}
}
$bar = 42;
$foo = new A();
var_dump($$foo);
${1} = 42;
var_dump(${1});
${pi()} = 42;
var_dump(${pi()});
// prints three times: 42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment