3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php abstract class Vehicle { public function move (...$args) { var_dump($args); //echo "I'm moving from ", $this->pointA, " to ", $this->pointB; } } class Car extends Vehicle { public function move (...$args) { var_dump($args); return $this->drive($args); } private function drive (...$args) { var_dump($args); //echo "I'm driving from ", $this->pointA, " to ", $this->pointB; } } $bmw = new Car(); $bmw->move("home", "work");
based on 3qt0A
Output for 5.6.0 - 5.6.30, hhvm-3.18.5 - 3.22.0, 7.0.0 - 7.3.0rc3
array(2) { [0]=> string(4) "home" [1]=> string(4) "work" } array(1) { [0]=> array(2) { [0]=> string(4) "home" [1]=> string(4) "work" } }