3v4l.org

run code in 300+ PHP versions simultaneously
<?php function test($input) { switch ($input) { case 'foo': echo 'foo'; break; case 'bar': echo 'bar'; break; default: echo 'default'; case 'baz': echo 'baz'; break; } } test('foo'); test('bar'); test('nope'); test('baz');

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.40.0140.00018.71
8.3.30.0000.01318.95
8.3.20.0000.00820.30
8.3.10.0090.00923.59
8.3.00.0030.00519.13
8.2.170.0130.00722.96
8.2.160.0110.00320.47
8.2.150.0000.00824.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0050.00519.21
8.2.110.0030.00919.39
8.2.100.0040.00817.71
8.2.90.0040.00417.90
8.2.80.0080.00017.97
8.2.70.0080.00017.38
8.2.60.0040.00417.91
8.2.50.0060.00318.07
8.2.40.0000.00718.22
8.2.30.0000.00819.31
8.2.20.0020.00517.48
8.2.10.0040.00417.91
8.2.00.0000.00717.66
8.1.270.0060.00323.64
8.1.260.0040.00426.35
8.1.250.0070.00028.09
8.1.240.0030.00622.52
8.1.230.0090.00320.79
8.1.220.0000.00817.74
8.1.210.0040.00418.77
8.1.200.0090.00017.10
8.1.190.0080.00017.10
8.1.180.0030.00518.10
8.1.170.0040.00418.34
8.1.160.0070.00021.86
8.1.150.0000.00818.68
8.1.140.0000.00717.32
8.1.130.0000.00717.72
8.1.120.0040.00417.20
8.1.110.0040.00417.32
8.1.100.0040.00417.23
8.1.90.0030.00317.30
8.1.80.0030.00317.37
8.1.70.0040.00417.22
8.1.60.0030.00517.42
8.1.50.0040.00417.32
8.1.40.0050.00317.48
8.1.30.0060.00317.54
8.1.20.0040.00417.57
8.1.10.0040.00417.45
8.1.00.0040.00417.43
8.0.300.0000.00919.91
8.0.290.0000.00716.63
8.0.280.0030.00618.37
8.0.270.0030.00317.08
8.0.260.0000.00817.19
8.0.250.0030.00316.77
8.0.240.0030.00316.87
8.0.230.0040.00416.71
8.0.220.0050.00216.74
8.0.210.0030.00316.77
8.0.200.0000.00616.79
8.0.190.0070.00016.86
8.0.180.0040.00416.69
8.0.170.0040.00416.69
8.0.160.0070.00016.68
8.0.150.0030.00316.77
8.0.140.0080.00016.73
8.0.130.0000.00513.16
8.0.120.0060.00316.70
8.0.110.0000.00716.79
8.0.100.0040.00416.70
8.0.90.0040.00316.72
8.0.80.0080.00816.83
8.0.70.0040.00416.60
8.0.60.0040.00416.59
8.0.50.0000.00716.56
8.0.30.0120.01316.96
8.0.20.0150.00517.40
8.0.10.0000.00716.67
8.0.00.0080.00816.70
7.4.330.0030.00315.00
7.4.320.0060.00016.40
7.4.300.0000.00716.48
7.4.290.0070.00016.58
7.4.280.0080.00016.53
7.4.270.0030.00316.58
7.4.260.0030.00416.51
7.4.250.0000.00716.53
7.4.240.0020.00516.47
7.4.230.0070.00016.61
7.4.220.0110.00616.61
7.4.210.0070.00716.58
7.4.200.0050.00316.47
7.4.160.0070.01416.79
7.4.150.0100.01317.40
7.4.140.0080.00917.86
7.4.130.0060.01116.37
7.4.120.0050.01216.50
7.4.110.0090.01016.39
7.4.100.0090.00616.27
7.4.90.0320.02016.29
7.4.80.0040.01519.39
7.4.70.0130.00916.52
7.4.60.0100.00716.60
7.4.50.0000.00916.54
7.4.40.0060.00916.57
7.4.30.0030.01316.51
7.4.10.0110.00514.74
7.4.00.0060.00914.99
7.3.330.0050.00013.07
7.3.320.0000.00513.13
7.3.310.0060.00016.22
7.3.300.0000.00716.24
7.3.290.0030.01216.18
7.3.280.0030.01616.24
7.3.270.0130.00617.40
7.3.260.0120.00916.19
7.3.250.0080.00816.40
7.3.240.0200.01016.31
7.3.230.0070.01016.39
7.3.210.0030.01316.29
7.3.200.0130.00319.39
7.3.190.0060.01116.37
7.3.180.0070.01016.37
7.3.170.0080.00816.48
7.3.160.0100.00716.20
7.3.130.0050.01314.81
7.3.120.0080.00914.78
7.3.110.0070.00914.79
7.3.100.0050.00714.80
7.3.90.0060.01014.73
7.3.80.0060.00714.82
7.3.70.0040.00914.68
7.3.60.0060.00714.58
7.3.50.0090.00414.69
7.3.40.0030.00814.75
7.3.30.0060.00914.74
7.3.20.0090.00516.54
7.3.10.0040.00916.63
7.3.00.0050.00416.62
7.2.330.0090.00916.45
7.2.320.0160.00416.31
7.2.310.0080.00816.69
7.2.300.0100.01316.29
7.2.290.0050.01116.73
7.2.260.0090.00914.86
7.2.250.0030.01414.86
7.2.240.0070.00814.89
7.2.230.0090.00514.88
7.2.220.0070.00614.94
7.2.210.0070.00614.91
7.2.200.0060.00814.95
7.2.190.0070.00514.87
7.2.180.0050.00814.91
7.2.170.0040.00914.93
7.2.160.0060.00714.93
7.2.150.0080.00616.85
7.2.140.0050.00816.89
7.2.130.0050.00816.69
7.2.120.0090.00616.77
7.2.110.0060.00816.78
7.2.100.0040.00916.83
7.2.90.0070.00716.88
7.2.80.0070.00916.82
7.2.70.0000.01616.83
7.2.60.0040.01216.92
7.2.50.0050.00816.84
7.2.40.0080.00516.90
7.2.30.0050.00716.86
7.2.20.0070.00716.78
7.2.10.0050.00916.88
7.2.00.0070.00917.45
7.1.330.0060.00815.84
7.1.320.0060.00715.49
7.1.310.0060.00515.69
7.1.300.0040.00815.60
7.1.290.0090.00415.53
7.1.280.0050.00815.69
7.1.270.0060.00815.67
7.1.260.0080.00515.67
7.1.250.0080.00615.56
7.1.240.0070.00515.69
7.1.230.0020.01115.68
7.1.220.0030.01015.65
7.1.210.0090.00615.58
7.1.200.0080.00415.63
7.1.190.0040.01115.62
7.1.180.0030.01215.75
7.1.170.0080.00515.62
7.1.160.0060.00615.61
7.1.150.0040.00815.69
7.1.140.0050.00715.61
7.1.130.0070.00815.55
7.1.120.0060.00415.64
7.1.110.0050.00815.63
7.1.100.0100.01016.24
7.1.90.0050.01015.66
7.1.80.0030.01215.70
7.1.70.0050.00616.21
7.1.60.0080.00416.20
7.1.50.0070.01016.07
7.1.40.0020.01115.59
7.1.30.0030.00615.64
7.1.20.0030.00915.60
7.1.10.0040.00815.61
7.1.00.0020.03217.95
7.0.330.0090.00715.34
7.0.320.0040.00915.21
7.0.310.0050.01115.30
7.0.300.0090.00515.35
7.0.290.0070.00415.34
7.0.280.0040.00615.48
7.0.270.0060.00715.41
7.0.260.0070.00315.17
7.0.250.0060.00815.22
7.0.240.0050.01115.43
7.0.230.0030.01315.38
7.0.220.0080.00615.27
7.0.210.0090.00515.15
7.0.200.0010.01315.75
7.0.190.0070.00815.41
7.0.180.0050.00915.26
7.0.170.0020.00915.29
7.0.160.0050.00715.42
7.0.150.0040.01015.31
7.0.140.0050.02717.48
7.0.130.0090.00315.42
7.0.120.0080.00515.45
7.0.110.0040.00515.40
7.0.100.0020.01115.25
7.0.90.0050.00915.37
7.0.80.0060.00915.46
7.0.70.0040.00615.40
7.0.60.0040.03116.87
7.0.50.0070.03016.29
7.0.40.0090.02915.70
7.0.30.0080.02115.74
7.0.20.0110.03115.59
7.0.10.0070.03015.58
7.0.00.0050.03415.57
5.6.400.0040.00914.30
5.6.390.0050.01014.13
5.6.380.0030.01114.44
5.6.370.0030.01014.31
5.6.360.0050.01014.38
5.6.350.0070.00514.29
5.6.340.0050.00714.30
5.6.330.0030.01014.18
5.6.320.0050.01014.49
5.6.310.0040.00714.18
5.6.300.0070.00714.03
5.6.290.0050.00814.32
5.6.280.0060.02816.53
5.6.270.0040.00614.08
5.6.260.0070.00714.22
5.6.250.0060.00414.11
5.6.240.0110.00314.32
5.6.230.0070.00714.32
5.6.220.0050.00714.27
5.6.210.0090.02916.40
5.6.200.0040.02015.49
5.6.190.0060.02116.41
5.6.180.0080.02516.45
5.6.170.0110.03116.11
5.6.160.0060.03116.38
5.6.150.0030.02115.66
5.6.140.0060.01715.56
5.6.130.0060.02515.56
5.6.120.0080.02916.61
5.6.110.0100.02116.58
5.6.100.0060.02616.50
5.6.90.0070.03216.54
5.6.80.0040.02316.33
5.6.70.0090.00514.02
5.6.60.0070.00914.34
5.6.50.0020.01314.10
5.6.40.0090.00314.30
5.6.30.0050.00914.18
5.6.20.0060.01114.31
5.6.10.0040.00714.29
5.6.00.0070.00714.36
5.5.380.0030.01314.09
5.5.370.0090.00514.21
5.5.360.0060.00614.25
5.5.350.0130.02816.14
5.5.340.0040.03015.49
5.5.330.0040.02016.35
5.5.320.0090.01916.30
5.5.310.0130.03216.48
5.5.300.0060.02715.55
5.5.290.0030.01715.33
5.5.280.0100.03116.52
5.5.270.0020.03216.31
5.5.260.0080.03116.67
5.5.250.0020.02416.27
5.5.240.0040.02516.20
5.5.230.0050.00714.21
5.5.220.0060.00514.28
5.5.210.0070.00614.28
5.5.200.0030.01114.23
5.5.190.0050.00814.32
5.5.180.0070.00314.30
5.5.170.0050.00714.13
5.5.160.0050.00614.16
5.5.150.0020.01113.95
5.5.140.0030.00914.06
5.5.130.0080.00314.30
5.5.120.0030.00814.13
5.5.110.0060.00814.37
5.5.100.0070.00514.18
5.5.90.0050.00914.19
5.5.80.0110.00414.27
5.5.70.0030.01014.05
5.5.60.0070.00914.14
5.5.50.0040.00914.23
5.5.40.0080.00314.16
5.5.30.0070.00714.03
5.5.20.0060.00414.32
5.5.10.0030.00814.09
5.5.00.0080.00513.86
5.4.450.0210.02013.83
5.4.440.0140.01913.70
5.4.430.0090.01813.82
5.4.420.0130.01913.81
5.4.410.0110.02213.71
5.4.400.0130.01413.64
5.4.390.0070.02213.61
5.4.380.0150.02613.42
5.4.370.0140.02013.59
5.4.360.0180.02613.48
5.4.350.0260.02313.43
5.4.340.0230.01813.58
5.4.330.0050.00510.91
5.4.320.0080.01811.42
5.4.310.0020.01911.41
5.4.300.0030.01911.51
5.4.290.0030.01911.36
5.4.280.0030.01611.49
5.4.270.0060.01811.46
5.4.260.0010.02111.44
5.4.250.0050.01711.38
5.4.240.0040.01911.38
5.4.230.0050.01711.35
5.4.220.0060.01611.47
5.4.210.0070.01411.47
5.4.200.0020.02411.36
5.4.190.0060.01711.46
5.4.180.0050.01611.30
5.4.170.0030.02111.40
5.4.160.0040.01711.33
5.4.150.0050.01911.49
5.4.140.0060.01511.39
5.4.130.0060.01911.37
5.4.120.0040.01911.22
5.4.110.0050.02011.41
5.4.100.0050.01711.31
5.4.90.0030.02111.34
5.4.80.0040.02111.28
5.4.70.0070.01811.16
5.4.60.0040.01911.35
5.4.50.0030.01611.40
5.4.40.0030.01511.29
5.4.30.0030.02111.30
5.4.20.0050.01711.38
5.4.10.0050.01911.23
5.4.00.0050.01711.01
5.3.290.0030.04112.80
5.3.280.0040.04212.71
5.3.270.0080.04212.73
5.3.260.0120.04812.72
5.3.250.0070.04312.72
5.3.240.0090.04512.72
5.3.230.0080.04812.71
5.3.220.0040.03812.68
5.3.210.0090.04412.68
5.3.200.0020.03912.68
5.3.190.0050.03712.68
5.3.180.0060.05212.68
5.3.170.0050.03812.67
5.3.160.0120.03212.68
5.3.150.0080.03512.67
5.3.140.0090.03212.66
5.3.130.0060.03912.66
5.3.120.0060.03712.65
5.3.110.0060.04512.66
5.3.100.0050.03712.12
5.3.90.0060.03912.10
5.3.80.0040.03812.09
5.3.70.0050.03712.09
5.3.60.0080.03212.07
5.3.50.0070.04612.02
5.3.40.0070.03712.02
5.3.30.0060.04011.97
5.3.20.0050.03511.76
5.3.10.0060.03411.73
5.3.00.0050.04211.71
5.2.170.0070.0389.21
5.2.160.0040.0349.21
5.2.150.0050.0339.22
5.2.140.0040.0309.21
5.2.130.0050.0299.17
5.2.120.0050.0289.17
5.2.110.0040.0299.18
5.2.100.0060.0269.17
5.2.90.0060.0269.17
5.2.80.0070.0349.17
5.2.70.0040.0319.17
5.2.60.0050.0289.12
5.2.50.0040.0409.09
5.2.40.0080.0399.07
5.2.30.0070.0359.05
5.2.20.0050.0309.05
5.2.10.0040.0328.94
5.2.00.0040.0328.80
5.1.60.0040.0248.09
5.1.50.0030.0278.09
5.1.40.0050.0238.06
5.1.30.0030.0268.41
5.1.20.0050.0378.43
5.1.10.0050.0238.16
5.1.00.0040.0258.16
5.0.50.0030.0206.64
5.0.40.0020.0206.50
5.0.30.0050.0326.31
5.0.20.0040.0186.27
5.0.10.0040.0246.26
5.0.00.0030.0306.26
4.4.90.0030.0204.78
4.4.80.0050.0224.76
4.4.70.0030.0144.75
4.4.60.0020.0164.76
4.4.50.0060.0234.77
4.4.40.0040.0254.71
4.4.30.0050.0134.76
4.4.20.0020.0164.84
4.4.10.0050.0184.85
4.4.00.0040.0234.76
4.3.110.0030.0164.67
4.3.100.0040.0294.67
4.3.90.0030.0134.63
4.3.80.0040.0334.58
4.3.70.0040.0244.63
4.3.60.0040.0244.63
4.3.50.0030.0224.63
4.3.40.0020.0284.54
4.3.30.0010.0243.31
4.3.20.0020.0203.29
4.3.10.0000.0293.25
4.3.00.0030.01718.56

preferences:
65.06 ms | 400 KiB | 5 Q