3v4l.org

run code in 500+ PHP versions simultaneously
<?php class Foo { public function returnBool() { return random_int(0,1) > 0; } } function returnsBool(?Foo $foo): bool { return $foo?->returnBool(); } var_dump(returnsBool(null));

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.0.30.0080.00816.91
8.0.20.0060.00916.86
8.0.10.0060.00916.95
8.0.00.0070.00816.93
7.4.160.0140.00016.39
7.4.150.0080.00516.42
7.4.140.0000.01516.39
7.4.130.0070.00716.32
7.4.120.0030.01316.17
7.4.110.0000.01316.25
7.4.100.0000.01316.46
7.4.90.0050.00816.11
7.4.80.0060.00916.27
7.4.70.0030.01016.35
7.4.60.0030.01016.16
7.4.50.0070.00716.11
7.4.40.0040.01116.04
7.4.30.0100.01016.39
7.4.20.0030.01616.35
7.4.10.0060.01216.25
7.4.00.0000.01416.31
7.3.270.0060.01016.17
7.3.260.0140.00016.14
7.3.250.0140.00016.15
7.3.240.0000.01416.14
7.3.230.0050.00916.20
7.3.220.0030.01016.13
7.3.210.0090.00416.14
7.3.200.0000.01416.09
7.3.190.0080.00516.15
7.3.180.0060.00616.09
7.3.170.0130.00616.14
7.3.160.0030.01716.21
7.3.150.0120.00716.11
7.3.140.0090.00916.10
7.3.130.0100.00316.14
7.3.120.0070.00716.04
7.3.110.0090.00616.08
7.3.100.0080.00515.95
7.3.90.0070.00716.33
7.3.80.0100.00516.07
7.3.70.0030.01316.09
7.3.60.0060.01216.21
7.3.50.0140.00016.23
7.3.40.0070.00716.30
7.3.30.0100.00416.20
7.3.20.0070.00816.22
7.3.10.0090.00616.09
7.3.00.0000.01316.20

preferences:
48.16 ms | 686 KiB | 5 Q