fork(3) download
  1. <?php
  2.  
  3. abstract class Foo { static $bar = 5; }
  4. abstract class Bah { static $bar = 6; }
  5.  
  6. function echoBar($classname) {
  7. echo $classname::$bar, PHP_EOL;
  8. }
  9.  
  10. echoBar('Foo');
  11. echoBar('Bah');
Success #stdin #stdout 0.01s 20568KB
stdin
Standard input is empty
stdout
5
6