fork download
  1. <?php
  2.  
  3. class a
  4. {
  5. function b()
  6. {
  7. return "123";
  8. }
  9. }
  10.  
  11.  
  12. class b {
  13. // don't work (unexpected 'new')
  14. // static $array=array("key"=>new a());
  15.  
  16. // works fine
  17. static $array=array("key"=>"value");
  18. }
  19.  
  20.  
  21. ?>
Success #stdin #stdout 0.01s 20520KB
stdin
Standard input is empty
stdout
Standard output is empty