fork download
  1. <?php
  2.  
  3. class ComParametro
  4. {
  5. public function __construct($parametro)
  6. {}
  7. }
  8.  
  9.  
  10. class SemParametro
  11. {
  12. public function __construct(){}
  13. }
  14.  
  15. new ComParametro($a = 'a');
  16.  
  17.  
  18. print_r($a);
  19.  
  20.  
  21. new SemParametro($b = 'b');
  22.  
  23.  
  24. print_r($b);
  25.  
  26.  
  27. new stdClass($c = 'c');
  28.  
  29.  
  30. print_r($c);
Success #stdin #stdout #stderr 0.03s 52480KB
stdin
Standard input is empty
stdout
ab
stderr
PHP Notice:  Undefined variable: c in /home/2jyp9c/prog.php on line 30