3v4l.org

run code in 300+ PHP versions simultaneously
<?php $input = '0'; $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.0070.01418.18
8.3.50.0100.01016.46
8.3.40.0110.00421.94
8.3.30.0070.00718.41
8.3.20.0050.00224.18
8.3.10.0080.00024.66
8.3.00.0080.00026.16
8.2.180.0110.00725.92
8.2.170.0090.00618.85
8.2.160.0080.00622.96
8.2.150.0060.00325.66
8.2.140.0080.00024.66
8.2.130.0040.00426.16
8.2.120.0080.00026.35
8.2.110.0070.00420.47
8.2.100.0070.00319.19
8.1.280.0120.00325.92
8.1.270.0030.00623.99
8.1.260.0000.01428.09
8.1.250.0080.00028.09
8.1.240.0070.00320.59
8.1.230.0000.01118.77
7.4.120.0110.00716.15
7.4.110.0070.01016.34
7.4.100.0140.00316.48
7.4.90.0030.01416.28
7.4.80.0130.00316.43
7.4.70.0090.00816.45
7.4.60.0070.01116.25
7.4.50.0100.00716.16
7.4.40.0060.01216.34
7.4.30.0120.00916.39
7.4.20.0060.01216.30
7.4.10.0130.00316.49
7.4.00.0030.01216.30
7.3.240.0160.00316.34
7.3.230.0140.00316.31
7.3.220.0070.01016.27
7.3.210.0040.01216.43
7.3.200.0100.00616.30
7.3.190.0100.00616.34
7.3.180.0060.00916.09
7.3.170.0080.00816.34
7.3.160.0070.01016.18
7.3.150.0120.00916.19
7.3.140.0160.00016.10
7.3.130.0030.01316.14
7.3.120.0030.01216.27
7.3.110.0060.00916.29
7.3.100.0100.00716.35
7.3.90.0120.00416.17
7.3.80.0140.00416.11
7.3.70.0030.01316.12
7.3.60.0130.00316.27
7.3.50.0130.00316.16
7.3.40.0120.00316.21
7.3.30.0140.00416.11
7.3.20.0110.01416.26
7.3.10.0210.00316.28
7.3.00.0140.00716.16
7.2.340.0060.01116.20
7.2.330.0100.00816.23
7.2.320.0140.00416.40
7.2.310.0110.00716.54
7.2.300.0030.01516.25
7.2.290.0070.01016.49
7.2.280.0080.01216.43
7.2.270.0090.00916.48
7.2.260.0180.00616.36
7.2.250.0100.00716.46
7.2.240.0060.01016.23
7.2.230.0080.00816.38
7.2.220.0140.00316.36
7.2.210.0040.01616.19
7.2.200.0080.00816.45
7.2.190.0140.00316.28
7.2.180.0100.00716.18
7.2.170.0160.00016.26
7.2.160.0150.00916.34
7.2.150.0160.00916.40
7.2.140.0030.01416.40
7.2.130.0100.00716.09
7.2.120.0030.01316.38
7.2.110.0230.00316.53
7.2.100.0090.00816.43
7.2.90.0070.01016.23
7.2.80.0060.01116.16
7.2.70.0130.00616.23
7.2.60.0040.01316.39
7.2.50.0100.00716.32
7.2.40.0110.00616.57
7.2.30.0060.01216.43
7.2.20.0030.01316.11
7.2.10.0140.00616.21
7.2.00.0160.00016.32

preferences:
29.88 ms | 400 KiB | 5 Q