fork download
  1. <?php
  2. class Car{
  3. public static function a(){
  4. return 'hi';
  5. }
  6. }
  7.  
  8. class Constants{
  9. public static $use='Car';
  10. }
  11.  
  12. echo call_user_func( array( Constants::$use, 'a'));
  13. ?>
Success #stdin #stdout 0.01s 20520KB
stdin
Standard input is empty
stdout
hi