Your Ad Here

Posted By

Knarf on 11/17/11


Tagged


Versions (?)

$test


 / Published in: PHP
 

An example of dynamic scripting in php.

  1. $test = function($name = 'stdClass')
  2. {
  3. static $object;
  4.  
  5. if(!isset($object[$name]))
  6. $object[$name] = new $name;
  7.  
  8. return $object[$name];
  9. };

Report this snippet  

You need to login to post a comment.