3v4l.org

run code in 300+ PHP versions simultaneously
<?php $b = 'b_global'; function foo(bool $shadow) { $a = 'a_local'; $b = 'b_local'; var_dump($a, $b); if ( $shadow ) { static $a; global $b; } var_dump($a, $b); } foo(true); echo "----\n"; foo(false);

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.150.0020.00014.05
8.4.140.0120.00817.54
8.4.130.0130.00617.56
8.4.90.0100.01017.71
8.3.270.0110.00816.55
8.3.260.0110.00716.60
8.3.180.0090.01116.40
8.3.50.0090.00818.45

preferences:
31.39 ms | 403 KiB | 5 Q