3v4l.org

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

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.0090.01218.31
8.3.50.0100.00716.64
8.3.40.0110.00422.04
8.3.30.0140.00018.63
8.3.20.0070.00024.18
8.3.10.0040.00424.66
8.3.00.0050.00326.16
8.2.180.0070.00725.92
8.2.170.0160.00319.00
8.2.160.0140.00022.96
8.2.150.0040.00425.66
8.2.140.0030.00524.66
8.2.130.0070.00026.16
8.2.120.0040.00426.35
8.2.110.0110.00020.53
8.2.100.0070.00319.20
8.1.280.0040.01225.92
8.1.270.0000.00923.92
8.1.260.0040.01228.09
8.1.250.0000.00928.09
8.1.240.0090.00020.70
8.1.230.0110.00018.82
7.4.120.0130.00616.36
7.4.110.0100.01316.57
7.4.100.0130.00316.35
7.4.90.0090.00616.34
7.4.80.0100.00616.30
7.4.70.0030.01916.44
7.4.60.0100.00716.46
7.4.50.0150.00316.11
7.4.40.0070.01316.38
7.4.30.0150.00316.54
7.4.20.0120.00616.41
7.4.10.0110.00816.39
7.4.00.0100.00716.31
7.3.240.0070.01016.39
7.3.230.0100.00716.16
7.3.220.0140.00316.44
7.3.210.0090.00616.28
7.3.200.0060.01116.43
7.3.190.0120.00916.19
7.3.180.0110.00516.13
7.3.170.0110.00516.20
7.3.160.0130.00316.27
7.3.150.0090.00916.13
7.3.140.0030.01316.32
7.3.130.0100.00716.36
7.3.120.0120.00916.18
7.3.110.0000.01616.07
7.3.100.0110.00616.26
7.3.90.0140.00316.33
7.3.80.0070.01116.30
7.3.70.0060.00916.02
7.3.60.0090.00616.23
7.3.50.0070.01116.04
7.3.40.0080.00816.21
7.3.30.0090.00916.18
7.3.20.0140.00316.32
7.3.10.0110.00616.30
7.3.00.0120.01216.15
7.2.340.0100.00716.30
7.2.330.0080.00816.19
7.2.320.0040.01316.49
7.2.310.0090.01216.07
7.2.300.0090.01216.09
7.2.290.0100.00716.50
7.2.280.0060.01216.46
7.2.270.0150.00416.60
7.2.260.0080.00816.40
7.2.250.0070.01016.40
7.2.240.0140.00316.48
7.2.230.0140.00316.25
7.2.220.0150.00316.49
7.2.210.0090.00916.30
7.2.200.0080.00816.27
7.2.190.0090.00616.43
7.2.180.0070.01116.41
7.2.170.0070.01016.40
7.2.160.0040.01316.12
7.2.150.0070.01016.31
7.2.140.0120.00616.58
7.2.130.0140.00616.25
7.2.120.0060.01216.31
7.2.110.0070.01116.20
7.2.100.0070.01416.45
7.2.90.0120.00616.47
7.2.80.0210.00416.35
7.2.70.0160.03616.43
7.2.60.0140.01016.27
7.2.50.0090.00916.07
7.2.40.0090.01316.47
7.2.30.0100.00616.30
7.2.20.0120.00616.38
7.2.10.0070.01016.29
7.2.00.0120.00916.13

preferences:
45.52 ms | 400 KiB | 5 Q