Created
October 7, 2015 19:46
-
-
Save JoelMarcey/8aabf4ef32c8d34ce7b0 to your computer and use it in GitHub Desktop.
StdClass call
This file contains 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 | |
$foo = new StdClass; | |
$foo->bar = 3; | |
$foobar = function ($qux) { var_dump($this->bar + $qux); }; | |
$foobar->call($foo, 4); // prints int(7) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment