fork download
  1. <?php
  2.  
  3. class TestModel
  4. {
  5. function __construct(...$args)
  6. {
  7. var_dump($args);die;
  8. }
  9. }
  10.  
  11. $test = new TestModel(1,2, 'Maks', new \stdClass());
Success #stdin #stdout 0.02s 24384KB
stdin
Standard input is empty
stdout
array(4) {
  [0]=>
  int(1)
  [1]=>
  int(2)
  [2]=>
  string(4) "Maks"
  [3]=>
  object(stdClass)#2 (0) {
  }
}