3v4l.org

run code in 300+ PHP versions simultaneously
<?php switch (2) { case 1: echo "we got one"; break; case 2: echo "we got two so we return"; return; break; // not needed but good practice case 3: echo "we got three"; break; // not needed either }

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.0140.00418.43
8.3.50.0140.00418.03
8.3.40.0070.00718.88
8.3.30.0070.00718.67
8.3.20.0000.00819.16
8.3.10.0040.00420.98
8.3.00.0040.00423.68
8.2.180.0150.00616.63
8.2.170.0120.00322.96
8.2.160.0100.00319.21
8.2.150.0040.00424.18
8.2.140.0030.01424.66
8.2.130.0000.00819.83
8.2.120.0070.00026.35
8.2.110.0100.00022.08
8.2.100.0080.00319.45
8.2.90.0080.00017.63
8.2.80.0040.00418.81
8.2.70.0040.00417.80
8.2.60.0000.00917.80
8.2.50.0040.00418.10
8.2.40.0030.00519.29
8.2.30.0000.00819.37
8.2.20.0000.00817.87
8.2.10.0040.00417.90
8.2.00.0070.00019.36
8.1.280.0090.00625.92
8.1.270.0000.00720.20
8.1.260.0000.00926.35
8.1.250.0030.00528.09
8.1.240.0080.00023.91
8.1.230.0110.00020.85
8.1.220.0040.00417.74
8.1.210.0060.00318.77
8.1.200.0070.00317.23
8.1.190.0040.00717.10
8.1.180.0040.00418.10
8.1.170.0040.00418.67
8.1.160.0070.00018.82
8.1.150.0070.00018.82
8.1.140.0040.00417.68
8.1.130.0000.00718.89
8.1.120.0070.00017.33
8.1.110.0000.00717.30
8.1.100.0000.00717.39
8.1.90.0000.00717.38
8.1.80.0000.00817.38
8.1.70.0030.00317.33
8.1.60.0050.00617.51
8.1.50.0040.00417.46
8.1.40.0060.00317.39
8.1.30.0050.00317.65
8.1.20.0050.00317.48
8.1.10.0050.00317.36
8.1.00.0000.00917.41
8.0.300.0040.00418.77
8.0.290.0080.00016.63
8.0.280.0030.00318.41
8.0.270.0000.00817.19
8.0.260.0000.00717.16
8.0.250.0040.00416.86
8.0.240.0000.00616.95
8.0.230.0000.00716.91
8.0.220.0050.00316.80
8.0.210.0020.00516.77
8.0.200.0000.00616.97
8.0.190.0070.00016.95
8.0.180.0050.00316.90
8.0.170.0000.00816.83
8.0.160.0000.00816.89
8.0.150.0080.00016.88
8.0.140.0070.00016.89
8.0.130.0030.00313.36
8.0.120.0000.00716.90
8.0.110.0030.00516.90
8.0.100.0030.00316.68
8.0.90.0040.00416.67
8.0.80.0120.00816.92
8.0.70.0070.00016.92
8.0.60.0000.00716.76
8.0.50.0040.00416.95
8.0.30.0090.00916.98
8.0.20.0120.00817.40
8.0.10.0000.00716.90
8.0.00.0110.00616.70
7.4.330.0050.00015.55
7.4.320.0030.00316.49
7.4.300.0000.00716.33
7.4.290.0000.00716.51
7.4.280.0040.00416.38
7.4.270.0040.00416.38
7.4.260.0000.00616.45
7.4.250.0000.00716.47
7.4.240.0070.00016.45
7.4.230.0030.00316.47
7.4.220.0030.00616.63
7.4.210.0090.00616.40
7.4.200.0030.00316.32
7.4.160.0120.00516.54
7.4.140.0130.00617.86
7.4.130.0140.00316.27
7.4.120.0110.00816.43
7.4.110.0100.00716.33
7.4.100.0110.00616.30
7.4.90.0080.01116.46
7.4.80.0170.00319.39
7.4.70.0090.00916.37
7.4.60.0000.01916.44
7.4.50.0080.00616.60
7.4.40.0180.00316.52
7.4.10.0080.00816.54
7.4.00.0070.01015.80
7.3.330.0000.00513.04
7.3.320.0020.00213.09
7.3.310.0000.00716.04
7.3.300.0030.00316.24
7.3.290.0030.00316.11
7.3.280.0060.00816.25
7.3.260.0150.00616.21
7.3.240.0080.00916.33
7.3.230.0130.00416.45
7.3.210.0150.00616.33
7.3.200.0030.01516.23
7.3.190.0100.01016.17
7.3.180.0090.00916.18
7.3.170.0030.01916.29
7.3.160.0000.02016.24
7.3.130.0090.00916.38
7.3.120.0090.00316.21
7.3.110.0060.01216.39
7.3.100.0030.00616.00
7.3.90.0030.01216.14
7.3.80.0090.00616.20
7.3.70.0090.00316.19
7.3.60.0000.01616.28
7.3.50.0080.00316.25
7.3.40.0070.00716.16
7.3.30.0060.00616.14
7.3.20.0120.00418.06
7.3.10.0070.00817.06
7.3.00.0050.01117.05
7.2.330.0090.00916.63
7.2.320.0070.01016.32
7.2.310.0100.00716.51
7.2.300.0070.01016.43
7.2.290.0130.01016.61
7.2.260.0070.01316.60
7.2.250.0100.01016.31
7.2.240.0030.01016.44
7.2.230.0030.00916.27
7.2.220.0050.00516.38
7.2.210.0070.01016.46
7.2.200.0090.00316.46
7.2.190.0060.00916.47
7.2.180.0000.01416.55
7.2.170.0060.00616.27
7.2.160.0090.00616.19
7.2.150.0130.00318.53
7.2.140.0060.01218.39
7.2.130.0080.00617.29
7.2.120.0100.00717.51
7.2.110.0070.01017.17
7.2.100.0030.01317.39
7.2.90.0100.00717.35
7.2.80.0070.00917.21
7.2.70.0070.00617.37
7.2.60.0470.00716.44
7.2.50.0490.00816.58
7.2.40.0450.00916.60
7.2.30.0520.00916.56
7.2.20.0460.00916.70
7.2.10.0580.00816.65
7.2.00.0470.00716.73
7.1.330.0090.00617.40
7.1.320.0080.00417.50
7.1.310.0030.00617.21
7.1.300.0030.01217.17
7.1.290.0030.00617.21
7.1.280.0030.00617.23
7.1.270.0070.00717.14
7.1.260.0060.00317.38
7.1.250.0110.00516.39
7.1.240.0000.01617.26
7.1.230.0030.01317.15
7.1.220.0040.00817.37
7.1.210.0060.00917.00
7.1.200.0110.00216.45
7.1.190.0040.00417.13
7.1.180.0050.00517.32
7.1.170.0770.00715.49
7.1.160.0600.00816.75
7.1.150.0590.01016.77
7.1.140.0520.00917.04
7.1.130.0600.00916.97
7.1.120.0630.00916.86
7.1.110.1190.01316.60
7.1.100.0680.01016.33
7.1.90.0620.00416.77
7.1.80.0800.00816.60
7.1.70.0650.01116.14
7.1.60.0780.00625.30
7.1.50.0680.01024.97
7.1.40.0520.01125.03
7.1.30.0750.01024.94
7.1.20.0640.01325.02
7.1.10.0590.00715.96
7.1.00.0610.01116.04
7.0.330.0090.00917.04
7.0.320.0060.00616.89
7.0.310.0040.01216.76
7.0.300.0000.01016.71
7.0.290.0090.00316.81
7.0.280.0080.00516.71
7.0.270.0060.01016.64
7.0.260.0070.00316.91
7.0.250.0110.00316.79
7.0.240.0040.01517.09
7.0.230.0000.01116.89
7.0.220.0000.01116.82
7.0.210.0060.00316.86
7.0.200.0080.00317.03
7.0.190.0030.00616.83
7.0.180.0090.00616.78
7.0.170.0040.00816.97
7.0.160.0000.00916.92
7.0.150.0060.00916.93
7.0.140.0030.01216.87
7.0.130.0110.00017.00
7.0.120.0050.00516.90
7.0.110.0070.00716.97
7.0.100.0030.00716.89
7.0.90.0100.00316.79
7.0.80.0060.00616.93
7.0.70.0060.00316.87
7.0.60.0060.00716.80
7.0.50.0040.00716.75
7.0.40.0070.01014.67
7.0.30.0040.00415.16
7.0.20.0090.00614.85
7.0.10.0040.00914.73
7.0.00.0040.01414.83
5.6.400.0070.00715.88
5.6.390.0130.00715.70
5.6.380.0070.00715.85
5.6.370.0030.00615.86
5.6.360.0030.00615.93
5.6.350.0070.00716.08
5.6.340.0090.00015.84
5.6.330.0050.00515.89
5.6.320.0110.00415.77
5.6.310.0060.00915.86
5.6.300.0090.00615.96
5.6.290.0070.01015.51
5.6.280.0070.00715.59
5.6.270.0090.00015.94
5.6.260.0100.00015.96
5.6.250.0060.00715.78
5.6.240.0030.00715.74
5.6.230.0070.00715.74
5.6.220.0000.01015.72
5.6.210.0000.01515.75
5.6.200.0000.01515.80
5.6.190.0030.00615.66
5.6.180.0080.00415.81
5.6.170.0030.01015.51
5.6.160.0000.01115.58
5.6.150.0030.00715.70
5.6.140.0060.00915.63
5.6.130.0120.00315.84
5.6.120.0040.00715.51
5.6.110.0000.01315.85
5.6.100.0060.00915.66
5.6.90.0060.00915.91
5.6.80.0090.00915.62
5.6.70.0030.00915.63
5.6.60.0040.00815.65
5.6.50.0060.00615.68
5.6.40.0030.01515.83
5.6.30.0030.00915.81
5.6.20.0090.00615.77
5.6.10.0060.00615.66
5.6.00.0060.00615.61

preferences:
48.25 ms | 400 KiB | 5 Q