3v4l.org

run code in 300+ PHP versions simultaneously
<?php function myTapFunction($value) { tempFn($value); return $value; } function tempFn($value) { return $value->increment(5); } class Test { public $val = 0; public function increment($val) { $this->val += $val; } } $a = new Test(); var_dump( myTapFunction($a) );

preferences:
34.48 ms | 404 KiB | 5 Q