Skip to content

Instantly share code, notes, and snippets.

@kojiromike
Created August 29, 2015 00:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kojiromike/98f232a51e878238e9af to your computer and use it in GitHub Desktop.
Save kojiromike/98f232a51e878238e9af to your computer and use it in GitHub Desktop.
yikes
<?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