3v4l.org

run code in 300+ PHP versions simultaneously
<?php $input = '5'; $result = match($input) { 0 => "hello", '1', '2', '3', '0' => "world", }; echo $result.PHP_EOL; switch ($input) { case 0: $result = "hello"; break; case '1': case '2': case '3': $result = "world"; break; } echo $result.PHP_EOL;

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.3.60.0180.00418.41
8.3.50.0100.00716.36
8.3.40.0070.00721.94
8.3.30.0070.00718.79
8.3.20.0000.00824.18
8.3.10.0090.00024.66
8.3.00.0070.00426.16
8.2.180.0040.01125.92
8.2.170.0070.00719.09
8.2.160.0100.00722.96
8.2.150.0070.00025.66
8.2.140.0070.00024.66
8.2.130.0070.00026.16
8.2.120.0000.00826.35
8.2.110.0090.00320.35
8.2.100.0030.00719.14
8.1.280.0140.00425.92
8.1.270.0040.00423.99
8.1.260.0070.00728.09
8.1.250.0000.00828.09
8.1.240.0060.00318.96
8.1.230.0050.00518.95
7.4.120.0030.01316.25
7.4.110.0070.01116.36
7.4.100.0180.00516.34
7.4.90.0040.01316.25
7.4.80.0070.01016.39
7.4.70.0070.01016.33
7.4.60.0100.01316.09
7.4.50.0180.00416.36
7.4.40.0170.00616.42
7.4.30.0110.00616.32
7.4.20.0060.01016.30
7.4.10.0130.00316.26
7.4.00.0170.00016.45
7.3.240.0090.00916.22
7.3.230.0120.00616.46
7.3.220.0110.00516.55
7.3.210.0050.01116.14
7.3.200.0060.00916.31
7.3.190.0070.01016.39
7.3.180.0110.01116.38
7.3.170.0030.01316.33
7.3.160.0040.01316.14
7.3.150.0080.00816.10
7.3.140.0090.00616.41
7.3.130.0090.01416.18
7.3.120.0090.00616.17
7.3.110.0040.01316.17
7.3.100.0130.00416.12
7.3.90.0090.00616.09
7.3.80.0100.00616.15
7.3.70.0110.00516.21
7.3.60.0150.00316.20
7.3.50.0160.00016.18
7.3.40.0030.01316.23
7.3.30.0100.00716.19
7.3.20.0090.01516.23
7.3.10.0070.01016.15
7.3.00.0080.01116.27
7.2.340.0080.00816.29
7.2.330.0070.01016.12
7.2.320.0060.01116.54
7.2.310.0130.00916.30
7.2.300.0140.00316.54
7.2.290.0000.01716.25
7.2.280.0140.00316.18
7.2.270.0170.00716.45
7.2.260.0060.01016.55
7.2.250.0030.01516.36
7.2.240.0090.00816.40
7.2.230.0100.01316.25
7.2.220.0030.01316.16
7.2.210.0060.01116.16
7.2.200.0140.00416.28
7.2.190.0100.00716.43
7.2.180.0100.00716.46
7.2.170.0120.00616.49
7.2.160.0130.00316.09
7.2.150.0140.01016.40
7.2.140.0180.00016.41
7.2.130.0200.00416.38
7.2.120.0130.00916.32
7.2.110.0090.01316.45
7.2.100.0160.00616.40
7.2.90.0070.01516.30
7.2.80.0070.01016.52
7.2.70.0070.01016.53
7.2.60.0060.01516.41
7.2.50.0090.00916.32
7.2.40.0100.00916.56
7.2.30.0090.00916.26
7.2.20.0060.01216.36
7.2.10.0060.01216.14
7.2.00.0060.01216.37

preferences:
40.02 ms | 400 KiB | 5 Q