fork(13) download
  1. <?php
  2. class MyClass{
  3. private $array = array('one', 'two', 'three');
  4.  
  5. function __call($func, $params){
  6. if(in_array($func, $this->array)){
  7. return 'Test'.$func;
  8. }
  9. }
  10. }
  11.  
  12. $a = new MyClass;
  13. var_dump($a->one(), $a->four());
Success #stdin #stdout 0.02s 13064KB
stdin
Standard input is empty
stdout
string(7) "Testone"
NULL