3v4l.org

run code in 300+ PHP versions simultaneously
<?php function get_position($string) { $vowels = array("a,e,i,o,u"); $first_letter = strtolower(substr($string,0)); if( in_array($first_letter,$vowels) ) { $string = "an <strong>".ucfirst($string)."</strong>"; } else { $string = "a <strong>".ucfirst($string)."</strong>"; } return $string; } $output = get_position("Advertising"); echo $output;

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.0030.01718.33
8.3.50.0150.00222.12
8.3.40.0090.00618.46
8.3.30.0100.00319.04
8.3.20.0070.00020.34
8.3.10.0040.00423.53
8.3.00.0050.00319.08
8.2.180.0090.00916.50
8.2.170.0100.00722.96
8.2.160.0030.01020.39
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0140.00026.16
8.2.120.0090.00019.13
8.2.110.0110.01122.31
8.2.100.0060.00620.35
8.2.90.0040.00418.99
8.2.80.0040.00417.97
8.2.70.0030.00717.50
8.2.60.0000.00717.93
8.2.50.0000.00818.07
8.2.40.0050.00319.88
8.2.30.0040.00418.30
8.2.20.0030.00617.71
8.2.10.0040.00418.17
8.2.00.0000.00717.67
8.1.280.0130.00725.92
8.1.270.0000.00723.79
8.1.260.0030.00526.35
8.1.250.0040.00428.09
8.1.240.0050.00521.88
8.1.230.0070.00419.09
8.1.220.0000.00817.74
8.1.210.0030.00518.77
8.1.200.0060.00317.23
8.1.190.0080.00017.23
8.1.180.0050.00318.10
8.1.170.0050.00318.65
8.1.160.0030.00622.06
8.1.150.0000.00818.55
8.1.140.0040.00417.50
8.1.130.0000.00719.63
8.1.120.0000.00817.36
8.1.110.0000.00717.42
8.1.100.0000.00717.50
8.1.90.0020.00517.41
8.1.80.0040.00417.34
8.1.70.0000.00717.33
8.1.60.0040.00417.58
8.1.50.0030.00617.52
8.1.40.0050.00717.49
8.1.30.0050.00317.68
8.1.20.0030.00517.49
8.1.10.0030.00617.46
8.1.00.0030.00517.32
8.0.300.0060.00318.77
8.0.290.0040.00416.75
8.0.280.0030.00318.39
8.0.270.0050.00217.10
8.0.260.0060.00017.24
8.0.250.0000.00716.96
8.0.240.0030.00616.93
8.0.230.0000.00716.88
8.0.220.0000.00716.88
8.0.210.0000.00716.89
8.0.200.0030.00316.83
8.0.190.0000.00716.87
8.0.180.0000.00716.90
8.0.170.0000.00816.79
8.0.160.0030.00316.89
8.0.150.0030.00716.77
8.0.140.0070.00316.71
8.0.130.0000.00513.40
8.0.120.0000.00716.85
8.0.110.0000.00716.88
8.0.100.0040.00416.68
8.0.90.0030.00516.84
8.0.80.0090.00616.94
8.0.70.0000.00816.87
8.0.60.0000.00716.71
8.0.50.0000.00716.76
8.0.30.0090.00917.09
8.0.20.0090.01017.40
8.0.10.0040.00416.95
8.0.00.0090.00816.67
7.4.330.0050.00015.00
7.4.320.0000.00616.43
7.4.300.0030.00316.57
7.4.290.0000.00616.60
7.4.280.0030.00316.54
7.4.270.0080.00016.48
7.4.260.0000.00816.59
7.4.250.0070.00016.60
7.4.240.0050.00216.56
7.4.230.0000.00716.61
7.4.220.0300.02016.62
7.4.210.0060.00816.55
7.4.200.0000.00716.40
7.4.160.0110.01116.55
7.4.150.0080.00917.40
7.4.140.0090.01117.86
7.4.130.0070.00916.54
7.4.120.0120.00616.55
7.4.110.0080.01116.61
7.4.100.0060.01216.50
7.4.90.0100.00716.49
7.4.80.0110.00919.39
7.4.70.0130.00616.31
7.4.60.0030.01316.45
7.4.50.0040.00016.58
7.4.40.0070.01016.55
7.4.30.0070.01616.36
7.4.00.0000.01714.68
7.3.330.0050.00013.15
7.3.320.0050.00013.07
7.3.310.0030.00316.33
7.3.300.0080.00016.34
7.3.290.0090.00316.32
7.3.280.0080.00816.28
7.3.270.0120.00617.40
7.3.260.0060.01316.39
7.3.250.0100.01316.53
7.3.240.0090.00916.41
7.3.230.0040.01416.59
7.3.210.0080.00816.39
7.3.200.0070.01019.39
7.3.190.0090.01216.31
7.3.180.0060.01116.55
7.3.170.0060.01616.32
7.3.160.0030.01216.47
7.3.120.0070.00714.73
7.3.10.0110.00716.60
7.3.00.0160.00816.29
7.2.330.0120.00616.40
7.2.320.0150.00716.72
7.2.310.0060.01316.62
7.2.300.0090.00916.71
7.2.290.0150.00316.70
7.2.130.0040.01516.68
7.2.120.0060.01316.55
7.2.110.0050.01016.47
7.2.100.0040.00816.18
7.2.90.0140.00716.54
7.2.80.0050.01016.73
7.2.70.0110.00716.86
7.2.60.0030.00816.67
7.2.50.0070.00716.72
7.2.40.0040.00916.55
7.2.30.0110.00716.92
7.2.20.0160.00016.71
7.2.10.0050.00516.88
7.2.00.0120.00518.16
7.1.250.0070.01015.50
7.1.200.0060.01015.84
7.1.100.0030.01018.20
7.1.70.0000.01217.32
7.1.60.0160.00619.70
7.1.50.0130.01317.14
7.1.00.0000.08022.45
7.0.200.0540.01314.66
7.0.140.0030.07321.90
7.0.60.0070.04019.79
7.0.50.0070.04017.88
7.0.40.0200.07320.10
7.0.30.0200.04720.08
7.0.20.0270.07320.24
7.0.10.0100.08320.06
7.0.00.0030.08720.23
5.6.280.0130.06320.86
5.6.210.0000.04720.73
5.6.200.0070.08318.27
5.6.190.0100.07320.51
5.6.180.0270.07720.50
5.6.170.0230.04020.45
5.6.160.0030.07720.54
5.6.150.0030.03718.18
5.6.140.0070.08318.15
5.6.130.0070.04318.15
5.6.120.0100.04720.89
5.6.110.0100.08720.96
5.6.100.0070.08320.93
5.6.90.0030.04721.11
5.6.80.0100.08320.41
5.6.70.0500.05720.37
5.5.350.0030.07320.39
5.5.340.0130.07317.95
5.5.330.0070.03720.43
5.5.320.0300.07720.52
5.5.310.0200.09020.35
5.5.300.0100.03718.01
5.5.290.0130.07317.94
5.5.280.0130.07720.78
5.5.270.0100.08320.87
5.5.260.0130.07020.65
5.5.250.0070.06020.59
5.5.240.0370.06720.34
5.4.450.0470.04034.43
5.4.440.0070.05032.20
5.4.430.0270.04032.19
5.4.420.0170.04719.54
5.4.410.0370.04032.19
5.4.400.0230.04032.20
5.4.390.0370.06019.14
5.4.380.0430.05318.75
5.4.370.0270.05318.74
5.4.360.0400.04718.56
5.4.350.0530.07018.66
5.4.340.0370.07318.79
5.4.320.0060.03412.51
5.4.310.0070.03912.50
5.4.300.0050.04012.51
5.4.290.0040.04112.50
5.4.280.0060.03612.40
5.4.270.0060.03812.40
5.4.260.0050.03912.40
5.4.250.0050.04112.39
5.4.240.0130.05112.40
5.4.230.0090.04712.39
5.4.220.0120.04812.39
5.4.210.0080.04112.39
5.4.200.0110.03912.39
5.4.190.0080.03912.39
5.4.180.0060.03812.39
5.4.170.0070.04912.39
5.4.160.0060.04112.39
5.4.150.0050.04012.39
5.4.140.0110.04612.07
5.4.130.0120.04312.06
5.4.120.0080.05012.02
5.4.110.0070.05012.01
5.4.100.0100.04312.01
5.4.90.0060.03812.02
5.4.80.0070.03812.02
5.4.70.0030.03912.01
5.4.60.0060.03512.01
5.4.50.0060.03912.01
5.4.40.0040.04212.00
5.4.30.0080.04511.99
5.4.20.0060.03912.00
5.4.10.0110.04511.99
5.4.00.0100.04511.48
5.3.290.0030.04112.80
5.3.280.0030.04212.71
5.3.270.0060.05012.72
5.3.260.0050.04412.72
5.3.250.0060.03812.72
5.3.240.0070.04612.72
5.3.230.0100.04212.71
5.3.220.0050.04412.68
5.3.210.0080.04112.68
5.3.200.0050.04012.68
5.3.190.0130.04412.68
5.3.180.0060.03812.68
5.3.170.0070.03912.67
5.3.160.0070.03612.67
5.3.150.0060.03812.67
5.3.140.0090.03512.66
5.3.130.0050.04112.66
5.3.120.0040.04012.66
5.3.110.0090.03612.66
5.3.100.0050.03912.11
5.3.90.0020.04212.10
5.3.80.0070.03612.09
5.3.70.0110.03312.09
5.3.60.0070.03812.07
5.3.50.0080.03412.02
5.3.40.0070.03612.02
5.3.30.0050.03612.00
5.3.20.0060.04011.76
5.3.10.0070.03711.73
5.3.00.0080.03811.72
5.2.170.0050.0329.21
5.2.160.0080.0299.21
5.2.150.0070.0339.21
5.2.140.0050.0369.21
5.2.130.0090.0309.17
5.2.120.0040.0309.17
5.2.110.0070.0299.18
5.2.100.0070.0319.17
5.2.90.0060.0379.17
5.2.80.0040.0479.17
5.2.70.0070.0349.16
5.2.60.0060.0369.13
5.2.50.0080.0339.09
5.2.40.0070.0359.07
5.2.30.0070.0349.05
5.2.20.0080.0279.04
5.2.10.0090.0288.94
5.2.00.0050.0388.80
5.1.60.0030.0278.08
5.1.50.0040.0268.08
5.1.40.0070.0228.06
5.1.30.0040.0298.41
5.1.20.0030.0298.44
5.1.10.0050.0258.16
5.1.00.0060.0248.16
5.0.50.0040.0226.64
5.0.40.0060.0196.50
5.0.30.0040.0336.30
5.0.20.0050.0196.27
5.0.10.0040.0206.26
5.0.00.0030.0326.25
4.4.90.0030.0154.78
4.4.80.0040.0144.75
4.4.70.0060.0134.75
4.4.60.0040.0154.75
4.4.50.0040.0144.77
4.4.40.0030.0254.71
4.4.30.0030.0164.76
4.4.20.0020.0174.85
4.4.10.0060.0124.85
4.4.00.0030.0264.76
4.3.110.0030.0164.67
4.3.100.0020.0164.66
4.3.90.0030.0154.63
4.3.80.0060.0224.58
4.3.70.0050.0184.63
4.3.60.0040.0134.63
4.3.50.0030.0154.63
4.3.40.0030.0244.54
4.3.30.0050.0133.30
4.3.20.0020.0163.28
4.3.10.0030.0173.25
4.3.00.0030.01331.70

preferences:
48.31 ms | 401 KiB | 5 Q