3v4l.org

run code in 300+ PHP versions simultaneously
<?php // This is identical to semicolons.php in this gist // except that it uses colons instead of semicolons // for the first two case statements. foreach ([3, 2, 1] as $rank) { $actions = []; switch($rank) { case 3; $actions[] = "Hit all the things"; case 2; $actions[] = "Hit two things"; case 1: $actions[] = "Hit a thing"; break; } var_dump($rank, $actions); }

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.0120.00618.52
8.3.50.0070.01122.80
8.3.40.0090.00618.66
8.3.30.0140.00019.22
8.3.20.0070.00020.16
8.3.10.0040.00421.90
8.3.00.0100.00017.50
8.2.180.0070.01116.75
8.2.170.0030.01222.96
8.2.160.0160.00320.21
8.2.150.0050.00324.18
8.2.140.0040.00424.66
8.2.130.0030.00526.16
8.2.120.0080.00020.98
8.2.110.0040.00422.30
8.2.100.0030.00719.33
8.2.90.0060.00319.22
8.2.80.0050.00317.97
8.2.70.0000.00817.50
8.2.60.0000.00817.80
8.2.50.0000.00818.07
8.2.40.0040.00418.13
8.2.30.0040.00418.12
8.2.20.0020.00517.75
8.2.10.0000.00717.88
8.2.00.0000.00717.72
8.1.280.0100.00725.92
8.1.270.0040.00423.96
8.1.260.0040.00426.35
8.1.250.0030.00628.09
8.1.240.0000.00923.91
8.1.230.0000.01218.97
8.1.220.0030.00517.74
8.1.210.0050.00318.77
8.1.200.0060.00317.25
8.1.190.0040.00417.10
8.1.180.0080.00018.10
8.1.170.0050.00318.50
8.1.160.0070.00022.00
8.1.150.0030.00518.94
8.1.140.0040.00417.55
8.1.130.0080.00017.38
8.1.120.0070.00017.51
8.1.110.0020.00517.42
8.1.100.0000.00817.53
8.1.90.0000.00717.51
8.1.80.0040.00417.41
8.1.70.0000.00717.43
8.1.60.0030.00617.66
8.1.50.0040.00417.57
8.1.40.0040.00417.37
8.1.30.0040.00417.51
8.1.20.0030.00517.63
8.1.10.0040.00417.49
8.1.00.0060.00317.49
8.0.300.0040.00418.77
8.0.290.0000.00816.75
8.0.280.0030.00318.42
8.0.270.0000.00717.21
8.0.260.0000.00616.68
8.0.250.0030.00316.88
8.0.240.0080.00016.93
8.0.230.0000.00816.80
8.0.220.0000.00716.82
8.0.210.0040.00416.79
8.0.200.0000.00716.75
8.0.190.0000.00716.74
8.0.180.0000.00716.94
8.0.170.0000.00716.86
8.0.160.0030.00616.86
8.0.150.0030.00516.82
8.0.140.0040.00416.78
8.0.130.0000.00613.25
8.0.120.0040.00416.86
8.0.110.0000.00816.80
8.0.100.0000.00716.65
8.0.90.0000.00716.81
8.0.80.0070.01116.81
8.0.70.0000.00716.88
8.0.60.0000.00716.85
8.0.50.0040.00416.87
8.0.30.0130.00517.05
8.0.20.0140.00617.40
8.0.10.0040.00417.04
8.0.00.0080.01316.80
7.4.330.0050.00015.09
7.4.320.0000.00616.62
7.4.300.0000.00616.61
7.4.290.0030.00316.49
7.4.280.0000.00716.48
7.4.270.0070.00016.60
7.4.260.0000.00716.47
7.4.250.0070.00016.48
7.4.240.0060.00116.55
7.4.230.0000.00816.51
7.4.220.0130.00616.66
7.4.210.0080.00516.63
7.4.200.0000.00716.66
7.4.160.0130.00316.36
7.4.150.0100.00717.40
7.4.140.0080.01317.86
7.4.130.0130.01316.34
7.4.120.0060.01116.47
7.4.110.0100.01016.59
7.4.100.0040.01316.55
7.4.90.0100.00616.30
7.4.80.0090.00919.39
7.4.70.0110.01216.36
7.4.60.0150.00316.56
7.4.50.0040.00416.59
7.4.40.0070.01116.47
7.4.30.0100.00716.36
7.4.00.0110.00414.73
7.3.330.0030.00313.07
7.3.320.0020.00213.05
7.3.310.0000.00716.06
7.3.300.0030.00316.25
7.3.290.0060.00916.23
7.3.280.0100.00616.20
7.3.270.0050.01117.40
7.3.260.0170.00716.29
7.3.240.0130.00916.32
7.3.230.0110.00516.39
7.3.210.0030.02016.39
7.3.200.0060.01319.39
7.3.190.0100.00716.28
7.3.180.0060.00916.18
7.3.170.0080.01016.28
7.3.160.0140.00316.43
7.3.10.0100.00616.62
7.3.00.0030.01116.53
7.2.330.0100.01316.68
7.2.320.0110.01516.65
7.2.310.0130.00316.73
7.2.300.0120.01216.54
7.2.290.0000.01616.66
7.2.130.0060.00416.84
7.2.120.0030.01016.72
7.2.110.0050.01116.77
7.2.100.0050.00816.83
7.2.90.0030.01016.82
7.2.80.0090.00616.90
7.2.70.0040.01317.00
7.2.60.0020.01116.82
7.2.50.0050.01016.80
7.2.40.0090.00516.86
7.2.30.0080.00616.96
7.2.20.0080.00816.85
7.2.10.0080.00516.93
7.2.00.0070.00716.85
7.1.250.0050.00715.88
7.1.240.0120.00315.77
7.1.230.0070.00315.80
7.1.220.0000.01015.90
7.1.210.0090.00315.58
7.1.200.0040.00815.78
7.1.190.0000.01115.90
7.1.180.0060.00615.86
7.1.170.0100.00315.50
7.1.160.0030.01015.75
7.1.150.0030.00715.90
7.1.140.0040.00815.74
7.1.130.0070.01015.79
7.1.120.0070.00315.93
7.1.110.0030.01215.60
7.1.100.0060.00615.89
7.1.90.0000.01115.66
7.1.80.0040.00715.80
7.1.70.0080.00516.48
7.1.60.0050.01317.67
7.1.50.0070.00916.36
7.1.40.0080.00015.94
7.1.30.0080.00415.79
7.1.20.0000.01315.77
7.1.10.0130.00715.73
7.1.00.0020.04219.04
7.0.330.0050.00515.18
7.0.320.0040.00715.40
7.0.310.0090.00315.30
7.0.300.0060.00315.17
7.0.290.0110.00315.58
7.0.280.0030.01015.35
7.0.270.0000.01415.10
7.0.260.0110.00415.55
7.0.250.0000.01215.63
7.0.240.0030.00615.60
7.0.230.0070.00715.38
7.0.220.0060.00615.47
7.0.210.0000.01315.52
7.0.200.0030.00716.11
7.0.190.0030.00615.46
7.0.180.0030.00715.42
7.0.170.0000.00815.34
7.0.160.0030.01215.57
7.0.150.0100.00715.36
7.0.140.0030.03718.76
7.0.130.0040.00715.39
7.0.120.0090.00015.36
7.0.110.0040.00715.22
7.0.100.0040.01115.43
7.0.90.0070.01015.29
7.0.80.0100.00015.52
7.0.70.0040.00415.41
7.0.60.0120.04017.80
7.0.50.0060.03716.68
7.0.40.0080.04016.86
7.0.30.0100.02616.81
7.0.20.0120.03216.84
7.0.10.0110.04116.81
7.0.00.0030.03516.78
5.6.380.0040.01114.71
5.6.370.0070.00314.62
5.6.360.0080.00614.29
5.6.350.0040.00814.59
5.6.340.0070.00714.89
5.6.330.0050.00514.18
5.6.320.0000.00814.10
5.6.310.0040.00814.34
5.6.300.0060.00614.18
5.6.290.0040.00714.41
5.6.280.0070.03517.74
5.6.270.0060.00614.34
5.6.260.0070.00714.22
5.6.250.0080.00414.41
5.6.240.0000.01414.52
5.6.230.0100.00714.43
5.6.220.0040.00414.40
5.6.210.0070.04317.54
5.6.200.0120.02716.33
5.6.190.0030.02717.30
5.6.180.0170.03617.42
5.6.170.0160.04117.51
5.6.160.0100.04717.58
5.6.150.0050.04416.29
5.6.140.0070.02716.32
5.6.130.0050.02416.21
5.6.120.0090.03417.83
5.6.110.0050.04717.76
5.6.100.0120.04117.75
5.6.90.0130.03817.66
5.6.80.0060.02317.47
5.6.70.0050.00514.41
5.6.60.0070.00714.23
5.6.50.0070.00314.11
5.6.40.0040.00414.46
5.6.30.0000.00914.54
5.6.20.0040.01114.21
5.6.10.0070.00314.27
5.6.00.0080.00014.36
5.5.380.0030.00711.05
5.5.370.0000.00611.07
5.5.360.0040.00411.18
5.5.350.0150.03315.78
5.5.340.0080.02814.63
5.5.330.0030.04615.69
5.5.320.0130.03015.80
5.5.310.0170.04215.70
5.5.300.0030.04514.54
5.5.290.0060.04314.71
5.5.280.0090.03516.01
5.5.270.0010.02416.04
5.5.260.0030.02515.94
5.5.250.0020.04415.93
5.5.240.0040.03315.56
5.5.230.0040.00811.14
5.5.220.0000.00711.20
5.5.210.0040.00411.14
5.5.200.0040.00411.23
5.5.190.0030.00710.96
5.5.180.0070.00311.20
5.5.170.0000.00611.19
5.5.160.0100.00010.99
5.5.150.0040.00711.03
5.5.140.0000.00710.89
5.5.130.0000.00911.34
5.5.120.0040.00411.16
5.5.110.0080.00010.73
5.5.100.0000.00811.09
5.5.90.0060.00311.32
5.5.80.0070.00011.20
5.5.70.0060.00311.09
5.5.60.0030.00511.02
5.5.50.0000.00611.03
5.5.40.0030.00610.82
5.5.30.0040.00410.86
5.5.20.0040.00411.01
5.5.10.0030.00311.09
5.5.00.0030.00310.84
5.4.450.0440.02815.17
5.4.440.0550.03815.33
5.4.430.0340.03415.27
5.4.420.0530.02315.04
5.4.410.0380.02515.16
5.4.400.0210.04014.94
5.4.390.0120.03314.95
5.4.380.0080.02914.76
5.4.370.0320.02314.71
5.4.360.0170.02514.75
5.4.350.0080.03011.35
5.4.340.0080.01611.52
5.4.330.0000.01311.20
5.4.320.0030.02111.76
5.4.310.0050.01911.84
5.4.300.0060.02111.79
5.4.290.0030.02111.76
5.4.280.0060.02011.56
5.4.270.0070.01711.64
5.4.260.0080.02011.70
5.4.250.0050.02411.73
5.4.240.0020.02211.68
5.4.230.0050.02011.73
5.4.220.0050.02011.73
5.4.210.0040.02011.63
5.4.200.0040.02311.60
5.4.190.0040.02111.71
5.4.180.0040.02111.68
5.4.170.0060.01911.81
5.4.160.0060.02611.46
5.4.150.0050.01911.52
5.4.140.0040.02511.42
5.4.130.0020.02411.63
5.4.120.0020.02111.42
5.4.110.0050.02011.46
5.4.100.0050.02211.51
5.4.90.0060.02211.56
5.4.80.0020.02311.68
5.4.70.0040.02411.43
5.4.60.0030.02111.65
5.4.50.0060.01911.59
5.4.40.0050.02111.38
5.4.30.0050.01911.46
5.4.20.0070.01811.45
5.4.10.0030.02111.53
5.4.00.0100.01711.32
5.3.290.0040.02411.53
5.3.280.0040.02211.40
5.3.270.0060.01911.45
5.3.260.0060.02011.47
5.3.250.0050.02111.44
5.3.240.0060.01811.36
5.3.230.0070.01911.33
5.3.220.0040.02011.43
5.3.210.0060.02011.40
5.3.200.0060.01811.41
5.3.190.0040.02311.43
5.3.180.0060.01811.43
5.3.170.0070.01711.51
5.3.160.0060.01911.53
5.3.150.0070.02011.46
5.3.140.0030.02111.39
5.3.130.0020.02311.38
5.3.120.0050.02211.49
5.3.110.0030.02411.46
5.3.100.0040.02311.16
5.3.90.0030.02111.21
5.3.80.0050.02211.12
5.3.70.0100.02111.04
5.3.60.0060.01911.18
5.3.50.0070.01811.08
5.3.40.0030.02411.08
5.3.30.0040.01910.96
5.3.20.0040.02010.85
5.3.10.0040.02110.88
5.3.00.0060.01810.87
5.2.170.0050.0169.57
5.2.160.0030.0179.57
5.2.150.0060.0149.57
5.2.140.0040.0179.57
5.2.130.0030.0189.55
5.2.120.0010.0249.55
5.2.110.0020.0169.55
5.2.100.0060.0149.55
5.2.90.0040.0199.55
5.2.80.0050.0199.55
5.2.70.0060.0159.55
5.2.60.0060.0179.52
5.2.50.0050.0149.51
5.2.40.0020.0189.49
5.2.30.0040.0199.49
5.2.20.0040.0199.48
5.2.10.0050.0189.44
5.2.00.0040.0199.37
5.1.60.0050.0149.01
5.1.50.0030.0169.01
5.1.40.0040.0149.00
5.1.30.0040.0149.18
5.1.20.0040.0169.19
5.1.10.0080.0149.05
5.1.00.0040.0179.05
5.0.50.0020.0128.29
5.0.40.0020.0128.22
5.0.30.0010.0208.13
5.0.20.0020.0118.11
5.0.10.0020.0128.10
5.0.00.0050.0178.09
4.4.90.0030.0097.37
4.4.80.0010.0117.35
4.4.70.0040.0087.36
4.4.60.0000.0127.36
4.4.50.0000.0117.36
4.4.40.0020.0157.33
4.4.30.0040.0097.36
4.4.20.0020.0107.40
4.4.10.0020.0117.40
4.4.00.0020.0147.36
4.3.110.0010.0117.31
4.3.100.0010.0107.31
4.3.90.0040.0077.29
4.3.80.0030.0127.27
4.3.70.0010.0097.29
4.3.60.0020.0107.29
4.3.50.0030.0107.29
4.3.40.0010.0147.25
4.3.30.0020.0096.62
4.3.20.0010.0116.61
4.3.10.0040.0096.59
4.3.00.0040.0148.53

preferences:
46.85 ms | 401 KiB | 5 Q