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.5.10.0090.00916.49
8.5.00.0120.00922.86
8.4.160.0090.01322.13
8.4.150.0080.00516.78
8.4.140.0120.00817.54
8.4.130.0130.00617.56
8.4.90.0100.01017.71
8.3.290.0140.00820.68
8.3.280.0130.00720.14
8.3.270.0110.00816.55
8.3.260.0110.00716.60
8.3.180.0090.01116.40
8.3.50.0090.00818.45
8.2.300.0140.00820.25
8.1.340.0180.00621.64

preferences:
34.39 ms | 403 KiB | 5 Q