fork(1) download
  1. <?php
  2.  
  3. class Foo {
  4. function __construct($value) {
  5. $this->value = $value;
  6. }
  7. }
  8.  
  9. $foo = new Foo('bar');
  10. var_dump($foo->value);
  11.  
  12. $bar = new $foo('baz');
  13. var_dump($bar->value);
  14.  
Success #stdin #stdout 0.01s 20520KB
stdin
Standard input is empty
stdout
string(3) "bar"
string(3) "baz"