3v4l.org

run code in 300+ PHP versions simultaneously
<?php class C { private $name; public function __construct(string $name) { $this->name = $name; } public function __toString() { return $this->name; } } function f(string $a, C $b, int $c) : void { var_dump($a, $b, $c); } $a = new C('a'); $b = new C('b'); $c = new C('c'); f($a, $b, $c);

preferences:
36.67 ms | 402 KiB | 5 Q