Advertisement
Guest User

Untitled

a guest
Aug 28th, 2015
129
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. <?php
  2.  
  3. class CaseMadness {
  4. public function __call($m, $a) {
  5. if ($m === 'callMe') {
  6. return $this->callBob($a);
  7. }
  8. }
  9.  
  10. function callBob($a) {
  11. var_dump($a);
  12. }
  13. }
  14.  
  15. $x = new CaseMadness;
  16. $x->callBob('abc');
  17. // string(3) "abc"
  18. $x->callbob('abc');
  19. // string(3) "abc"
  20. $x->callme('abc');
  21. // (nothing)
  22. $x->callMe('abc');
  23. // array(1) {
  24. // [0]=>
  25. // string(3) "abc"
  26. //}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement