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,1,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.0140.00718.30
8.3.50.0110.00418.02
8.3.40.0040.01118.80
8.3.30.0110.00419.10
8.3.20.0080.00020.06
8.3.10.0080.00023.48
8.3.00.0050.00319.07
8.2.180.0140.00718.29
8.2.170.0070.01422.96
8.2.160.0000.01420.39
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0130.00326.16
8.2.120.0040.00419.36
8.2.110.0100.00021.01
8.2.100.0080.00317.91
8.2.90.0050.00319.00
8.2.80.0000.00817.97
8.2.70.0000.00917.50
8.2.60.0040.00417.93
8.2.50.0040.00418.10
8.2.40.0030.00620.59
8.2.30.0030.00519.16
8.2.20.0080.00017.78
8.2.10.0070.00017.98
8.2.00.0080.00017.73
8.1.270.0060.00323.90
8.1.260.0050.00326.35
8.1.250.0000.00828.09
8.1.240.0110.00023.97
8.1.230.0080.00420.39
8.1.220.0060.00317.78
8.1.210.0080.00018.77
8.1.200.0100.00017.35
8.1.190.0080.00017.35
8.1.180.0080.00018.10
8.1.170.0040.00418.30
8.1.160.0030.00318.88
8.1.150.0040.00420.04
8.1.140.0040.00417.53
8.1.130.0000.00819.50
8.1.120.0040.00417.48
8.1.110.0000.00817.48
8.1.100.0070.00017.43
8.1.90.0040.00417.45
8.1.80.0000.00717.36
8.1.70.0030.00317.34
8.1.60.0030.00617.47
8.1.50.0000.00817.54
8.1.40.0070.00417.41
8.1.30.0030.00617.68
8.1.20.0070.00017.60
8.1.10.0000.00717.50
8.1.00.0080.00017.46
8.0.300.0000.00818.77
8.0.290.0080.00016.63
8.0.280.0000.00718.42
8.0.270.0000.00717.16
8.0.260.0000.00617.12
8.0.250.0030.00316.97
8.0.240.0070.00016.84
8.0.230.0000.00716.94
8.0.220.0030.00316.84
8.0.210.0000.00716.77
8.0.200.0000.00716.99
8.0.190.0040.00416.91
8.0.180.0030.00316.93
8.0.170.0000.00816.86
8.0.160.0070.00016.82
8.0.150.0050.00316.73
8.0.140.0000.00916.74
8.0.130.0000.00613.26
8.0.120.0030.00516.85
8.0.110.0070.00016.91
8.0.100.0000.00716.84
8.0.90.0080.00016.84
8.0.80.0060.00916.80
8.0.70.0050.00216.72
8.0.60.0040.00416.82
8.0.50.0030.00316.72
8.0.30.0120.00716.94
8.0.20.0110.00817.40
8.0.10.0000.00816.91
8.0.00.0100.00716.75
7.4.330.0030.00315.08
7.4.320.0060.00016.57
7.4.300.0030.00316.39
7.4.290.0000.00716.59
7.4.280.0000.00716.49
7.4.270.0000.00716.59
7.4.260.0080.00016.57
7.4.250.0080.00016.50
7.4.240.0040.00416.46
7.4.230.0030.00316.59
7.4.220.0070.01116.57
7.4.210.0040.01116.66
7.4.200.0070.00016.54
7.4.160.0200.00316.46
7.4.150.0070.01717.40
7.4.140.0120.00517.86
7.4.130.0120.00516.61
7.4.120.0110.00616.50
7.4.110.0060.01616.67
7.4.100.0150.00916.49
7.4.90.0120.00616.44
7.4.80.0160.00519.39
7.4.70.0130.00616.34
7.4.60.0100.00716.54
7.4.50.0000.00616.45
7.4.40.0040.01416.55
7.4.30.0090.01216.33
7.4.00.0060.00914.73
7.3.330.0000.00513.11
7.3.320.0030.00313.22
7.3.310.0030.00316.32
7.3.300.0070.00016.11
7.3.290.0040.01116.34
7.3.280.0110.00516.28
7.3.270.0080.00817.40
7.3.260.0150.00316.41
7.3.250.0040.01516.41
7.3.240.0080.00816.40
7.3.230.0110.00716.39
7.3.210.0060.01216.72
7.3.200.0090.00919.39
7.3.190.0190.00316.32
7.3.180.0080.00816.38
7.3.170.0030.01416.27
7.3.160.0120.00916.32
7.3.120.0000.01214.91
7.2.330.0030.01416.48
7.2.320.0120.00616.73
7.2.310.0030.01316.52
7.2.300.0070.01016.54
7.2.290.0070.01016.62
7.2.00.0040.01119.56
7.1.100.0040.00818.39
7.1.70.0020.00517.22
7.1.60.0100.01319.70
7.1.50.0170.00716.92
7.1.00.0000.08022.40
7.0.200.0000.00816.68
7.0.140.0070.07022.10
7.0.60.0100.07319.84
7.0.50.0030.04317.88
7.0.40.0100.04720.24
7.0.30.0570.06720.34
7.0.20.0370.07720.12
7.0.10.0100.08020.23
7.0.00.0030.06320.26
5.6.280.0030.07320.96
5.6.210.0330.06720.51
5.6.200.0130.08018.19
5.6.190.0070.04320.77
5.6.180.0170.09020.42
5.6.170.0270.04020.71
5.6.160.0070.04020.51
5.6.150.0030.08318.18
5.6.140.0070.06018.14
5.6.130.0000.04718.18
5.6.120.0100.07721.05
5.6.110.0130.07721.02
5.6.100.0100.06721.09
5.6.90.0130.05320.96
5.6.80.0030.03720.52
5.6.70.4230.03320.48
5.5.350.0000.03320.43
5.5.340.0100.07717.98
5.5.330.0100.07020.27
5.5.320.0200.04020.34
5.5.310.0330.04320.32
5.5.300.0070.05018.08
5.5.290.0100.08018.08
5.5.280.0030.09020.69
5.5.270.0070.05020.66
5.5.260.0070.03720.65
5.5.250.0030.08320.57
5.5.240.0270.04720.27
5.4.450.0230.04734.72
5.4.440.0230.04332.20
5.4.430.0130.05032.19
5.4.420.0270.05032.19
5.4.410.0300.04332.19
5.4.400.0200.04032.20
5.4.390.0130.04332.20
5.4.380.0370.05318.54
5.4.370.0300.05318.63
5.4.360.0330.05318.55
5.4.350.0300.05718.77
5.4.340.0300.05318.52
5.4.320.0020.04012.51
5.4.310.0060.04112.50
5.4.300.0050.04412.50
5.4.290.0060.04312.50
5.4.280.0050.04212.39
5.4.270.0140.04412.40
5.4.260.0120.05712.39
5.4.250.0060.06512.40
5.4.240.0080.06012.39
5.4.230.0070.05712.39
5.4.220.0070.05212.39
5.4.210.0090.05112.39
5.4.200.0060.05512.39
5.4.190.0160.04312.39
5.4.180.0100.04912.38
5.4.170.0060.05312.39
5.4.160.0060.05012.39
5.4.150.0070.04912.39
5.4.140.0090.05112.07
5.4.130.0090.04612.06
5.4.120.0070.05112.02
5.4.110.0060.05012.02
5.4.100.0090.04412.02
5.4.90.0060.05212.02
5.4.80.0070.05212.02
5.4.70.0110.04512.00
5.4.60.0120.04512.01
5.4.50.0040.05312.01
5.4.40.0120.04412.00
5.4.30.0060.04911.99
5.4.20.0070.05111.99
5.4.10.0050.05211.99
5.4.00.0080.05011.48
5.3.290.0050.04912.80
5.3.280.0150.04312.71
5.3.270.0040.05912.72
5.3.260.0090.05312.72
5.3.250.0070.05512.72
5.3.240.0110.04912.71
5.3.230.0100.05012.71
5.3.220.0090.05312.68
5.3.210.0050.05812.68
5.3.200.0080.05212.68
5.3.190.0060.05212.68
5.3.180.0090.05012.68
5.3.170.0070.03912.67
5.3.160.0040.03912.67
5.3.150.0030.04112.68
5.3.140.0060.03712.66
5.3.130.0060.04012.66
5.3.120.0070.04012.66
5.3.110.0080.03912.66
5.3.100.0080.03612.12
5.3.90.0080.03512.10
5.3.80.0120.03312.09
5.3.70.0100.04312.09
5.3.60.0050.03712.07
5.3.50.0090.03312.02
5.3.40.0040.04512.01
5.3.30.0020.04311.98
5.3.20.0050.03711.76
5.3.10.0050.03611.73
5.3.00.0050.03811.72
5.2.170.0050.0309.21
5.2.160.0050.0309.21
5.2.150.0040.0339.21
5.2.140.0040.0329.21
5.2.130.0050.0299.16
5.2.120.0060.0289.17
5.2.110.0060.0299.18
5.2.100.0030.0329.17
5.2.90.0030.0329.17
5.2.80.0080.0289.17
5.2.70.0070.0329.17
5.2.60.0070.0329.13
5.2.50.0050.0329.09
5.2.40.0080.0279.07
5.2.30.0040.0319.05
5.2.20.0030.0329.03
5.2.10.0050.0288.93
5.2.00.0030.0328.80
5.1.60.0060.0238.09
5.1.50.0060.0238.08
5.1.40.0040.0258.07
5.1.30.0050.0268.42
5.1.20.0060.0258.43
5.1.10.0040.0258.16
5.1.00.0020.0278.16
5.0.50.0030.0216.64
5.0.40.0060.0176.50
5.0.30.0050.0316.31
5.0.20.0040.0276.28
5.0.10.0030.0226.26
5.0.00.0060.0276.25
4.4.90.0020.0174.78
4.4.80.0040.0144.76
4.4.70.0040.0204.75
4.4.60.0040.0204.76
4.4.50.0030.0214.77
4.4.40.0050.0304.71
4.4.30.0020.0174.75
4.4.20.0030.0154.85
4.4.10.0020.0164.84
4.4.00.0030.0264.76
4.3.110.0040.0154.67
4.3.100.0020.0164.67
4.3.90.0040.0144.64
4.3.80.0010.0264.58
4.3.70.0050.0134.63
4.3.60.0010.0174.62
4.3.50.0060.0134.63
4.3.40.0010.0264.54
4.3.30.0020.0173.30
4.3.20.0040.0143.28
4.3.10.0030.0153.24
4.3.00.0070.01331.70

preferences:
56.12 ms | 400 KiB | 5 Q