Posted By

gdonald on 09/27/06


Tagged

function create


Versions (?)

php create function


 / Published in: PHP
 

  1. class Obj
  2. {
  3. public $test;
  4.  
  5. function cf()
  6. {
  7. $this->test = create_function( '', 'echo "Testing";' );
  8. }
  9. }
  10.  
  11. $o = new Obj;
  12.  
  13. $o->cf();
  14.  
  15. $o->{$test};

Report this snippet  

You need to login to post a comment.