3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo {} class Bar {} class Transaction { public $f; public $b; public $intValue; function __construct(Foo $f, Bar $b, $intValue) { $this->f = $f; $this->b = $b; $this->intValue = $intValue; } } function test() { $foo = new Foo(); $bar = new Bar(); return new Transaction($foo, $bar, 42); } var_dump(test());

preferences:
82.99 ms | 2243 KiB | 5 Q