3v4l.org

run code in 300+ PHP versions simultaneously
<?php $input = '5'; $result = match($input) { 0 => "hello", '1', '2', '3', '0' => "world", default => 'not found' }; 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.0130.00918.30
8.3.50.0100.01016.35
8.3.40.0120.00321.93
8.3.30.0120.00318.46
8.3.20.0050.00224.18
8.3.10.0060.00324.66
8.3.00.0000.00826.16
8.2.180.0080.00625.92
8.2.170.0180.00319.09
8.2.160.0110.00322.96
8.2.150.0000.00725.66
8.2.140.0050.00224.66
8.2.130.0040.00426.16
8.2.120.0050.00226.35
8.2.110.0070.00420.43
8.2.100.0110.00018.96
8.1.280.0200.00325.92
8.1.270.0000.00823.99
8.1.260.0090.00928.09
8.1.250.0040.00428.09
8.1.240.0000.01020.71
8.1.230.0030.00918.88
7.4.120.0080.00816.34
7.4.110.0120.00616.20
7.4.100.0070.01016.27
7.4.90.0070.01016.12
7.4.80.0130.00316.55
7.4.70.0110.00616.22
7.4.60.0040.01516.47
7.4.50.0120.00316.13
7.4.40.0070.01016.32
7.4.30.0120.00416.35
7.4.20.0040.01716.48
7.4.10.0060.01116.19
7.4.00.0130.00316.59
7.3.240.0000.01616.29
7.3.230.0060.01216.46
7.3.220.0140.00616.18
7.3.210.0070.01016.22
7.3.200.0100.00716.08
7.3.190.0130.00316.20
7.3.180.0040.01116.21
7.3.170.0080.00816.37
7.3.160.0070.01316.15
7.3.150.0060.00916.37
7.3.140.0070.01016.32
7.3.130.0070.01116.45
7.3.120.0090.00616.25
7.3.110.0130.00316.15
7.3.100.0140.00316.08
7.3.90.0030.01416.39
7.3.80.0100.00616.53
7.3.70.0040.01316.24
7.3.60.0030.01516.19
7.3.50.0080.00816.24
7.3.40.0070.01016.23
7.3.30.0140.00316.23
7.3.20.0110.00716.23
7.3.10.0070.01116.27
7.3.00.0090.00916.11
7.2.340.0060.01316.18
7.2.330.0090.01216.17
7.2.320.0130.00616.54
7.2.310.0060.01116.30
7.2.300.0130.00316.46
7.2.290.0120.00316.21
7.2.280.0100.01016.38
7.2.270.0140.00716.22
7.2.260.0120.00616.31
7.2.250.0080.00916.48
7.2.240.0150.00416.25
7.2.230.0100.00716.46
7.2.220.0120.00816.36
7.2.210.0100.00716.32
7.2.200.0070.01116.44
7.2.190.0150.00316.37
7.2.180.0110.00616.35
7.2.170.0090.00816.25
7.2.160.0030.01316.38
7.2.150.0130.00716.40
7.2.140.0070.01116.49
7.2.130.0130.00316.27
7.2.120.0100.00716.40
7.2.110.0100.00716.33
7.2.100.0170.00016.33
7.2.90.0110.00716.26
7.2.80.0190.00916.21
7.2.70.0070.01016.43
7.2.60.0090.00916.39
7.2.50.0030.01416.43
7.2.40.0090.00916.16
7.2.30.0060.01216.23
7.2.20.0070.01016.32
7.2.10.0090.00916.53
7.2.00.0080.00816.43

preferences:
33.59 ms | 400 KiB | 5 Q