Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?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"
- //}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement