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; $result = ''; 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.00318.55
8.3.50.0100.00716.09
8.3.40.0110.00421.90
8.3.30.0090.00618.84
8.3.20.0050.00324.18
8.3.10.0040.00424.66
8.3.00.0030.00626.16
8.2.180.0090.00625.92
8.2.170.0060.00918.91
8.2.160.0030.01022.96
8.2.150.0030.00625.66
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0040.00426.35
8.2.110.0080.00320.53
8.2.100.0040.00718.95
8.1.280.0110.01425.92
8.1.270.0030.00523.99
8.1.260.0040.00428.09
8.1.250.0040.00428.09
8.1.240.0000.01018.96
8.1.230.0080.00418.95
7.4.120.0080.00816.44
7.4.110.0130.00916.21
7.4.100.0040.01316.21
7.4.90.0110.00616.27
7.4.80.0070.01016.34
7.4.70.0090.01216.46
7.4.60.0160.00016.24
7.4.50.0100.01016.47
7.4.40.0100.00616.36
7.4.30.0100.01016.40
7.4.20.0070.01416.44
7.4.10.0090.00916.42
7.4.00.0070.01116.50
7.3.240.0100.00716.23
7.3.230.0270.02616.21
7.3.220.0080.00816.39
7.3.210.0040.01216.30
7.3.200.0090.00616.35
7.3.190.0170.00316.16
7.3.180.0100.01016.08
7.3.170.0130.00616.22
7.3.160.0090.00616.30
7.3.150.0340.02616.30
7.3.140.0080.00816.28
7.3.130.0100.00716.24
7.3.120.0130.00316.11
7.3.110.0030.01316.20
7.3.100.0170.00016.34
7.3.90.0140.00316.42
7.3.80.0060.00916.21
7.3.70.0070.01016.21
7.3.60.0100.00716.21
7.3.50.0130.00316.13
7.3.40.0100.00616.09
7.3.30.0030.01316.17
7.3.20.0070.01016.24
7.3.10.0100.01016.10
7.3.00.0030.01316.24
7.2.340.0120.00416.29
7.2.330.0100.00716.51
7.2.320.0030.01416.50
7.2.310.0070.01416.05
7.2.300.0070.01016.46
7.2.290.0100.00716.20
7.2.280.0070.01016.39
7.2.270.0140.00716.32
7.2.260.0090.00916.19
7.2.250.0130.00316.34
7.2.240.0070.01116.23
7.2.230.0090.00916.47
7.2.220.0000.01716.33
7.2.210.0100.00616.43
7.2.200.0110.00716.25
7.2.190.0100.00616.25
7.2.180.0040.01216.28
7.2.170.0070.01016.33
7.2.160.0110.01016.43
7.2.150.0150.00316.39
7.2.140.0070.01416.48
7.2.130.0090.00916.41
7.2.120.0030.01516.46
7.2.110.0090.00916.45
7.2.100.0110.01116.25
7.2.90.0110.00716.34
7.2.80.0060.01216.21
7.2.70.0070.01016.18
7.2.60.0140.00316.50
7.2.50.0030.01516.26
7.2.40.0170.01416.27
7.2.30.0130.00916.41
7.2.20.0220.00316.36
7.2.10.0090.01316.30
7.2.00.0120.00916.25

preferences:
42.64 ms | 401 KiB | 5 Q