3v4l.org

run code in 300+ PHP versions simultaneously
<?php function myfuncByVal(stdClass $o) { $o->myproperty = "testByVal"; $o = null; } function myfuncByRef(stdClass &$o) { $o->myproperty = "testByRef"; $o = null; } $willPassByVal = new stdClass(); $willPassByRef = new stdClass(); myFuncByVal($willPassByVal); myFuncBYRef($willPassByRef); var_dump(compact('willPassByVal', 'willPassByRef'));

Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).

VersionSystem time (s)User time (s)Memory (MiB)
8.4.10.0080.01317.62
8.3.140.0030.00618.26
8.3.130.0090.00418.32
8.3.50.0080.01118.12
8.2.260.0060.01318.31
8.2.250.0070.01118.24

preferences:
21.39 ms | 403 KiB | 5 Q