Created
August 29, 2015 00:20
-
-
Save kojiromike/98f232a51e878238e9af to your computer and use it in GitHub Desktop.
yikes
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 | |
class CaseMadness { | |
public function __call($m, $a) { | |
if ($m === 'callMe') { | |
return $this->callBob($a); | |
} | |
} | |
function callBob($a) { | |
var_dump($a); | |
} | |
} | |
$x = new CaseMadness; | |
$x->callBob('abc'); | |
// string(3) "abc" | |
$x->callbob('abc'); | |
// string(3) "abc" | |
$x->callme('abc'); | |
// (nothing) | |
$x->callMe('abc'); | |
// array(1) { | |
// [0]=> | |
// string(3) "abc" | |
//} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment