3v4l.org

run code in 300+ PHP versions simultaneously
<?php function get_position($atts) { $string = $atts; $vowels = array("a,e,i,o,u"); $first_letter = strtolower(substr($string,0,1)); 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.23
8.3.50.0080.00822.00
8.3.40.0110.00418.61
8.3.30.0090.00619.00
8.3.20.0040.00420.33
8.3.10.0000.00823.65
8.3.00.0080.00018.98
8.2.180.0000.01918.16
8.2.170.0170.00322.96
8.2.160.0040.01120.17
8.2.150.0040.00424.18
8.2.140.0050.00324.66
8.2.130.0000.00826.16
8.2.120.0040.00419.22
8.2.110.0070.00322.14
8.2.100.0090.00317.88
8.2.90.0040.00417.97
8.2.80.0000.00817.97
8.2.70.0030.00617.61
8.2.60.0030.00817.80
8.2.50.0040.00418.07
8.2.40.0070.00319.84
8.2.30.0000.00718.30
8.2.20.0040.00417.68
8.2.10.0000.00718.02
8.2.00.0040.00417.66
8.1.280.0080.00825.92
8.1.270.0030.00624.05
8.1.260.0050.00326.35
8.1.250.0070.00028.09
8.1.240.0090.00022.59
8.1.230.0040.00720.71
8.1.220.0030.00517.74
8.1.210.0000.00918.85
8.1.200.0030.00617.36
8.1.190.0040.00417.13
8.1.180.0040.00418.10
8.1.170.0000.00818.65
8.1.160.0000.00821.96
8.1.150.0030.00718.63
8.1.140.0030.00517.45
8.1.130.0000.00819.56
8.1.120.0000.00717.50
8.1.110.0000.00817.46
8.1.100.0070.00017.36
8.1.90.0070.00017.44
8.1.80.0000.00717.51
8.1.70.0030.00317.39
8.1.60.0040.00417.46
8.1.50.0040.00417.49
8.1.40.0080.00417.41
8.1.30.0000.00817.59
8.1.20.0040.00417.49
8.1.10.0000.00817.54
8.1.00.0060.00317.31
8.0.300.0040.00419.90
8.0.290.0000.00916.63
8.0.280.0030.00318.30
8.0.270.0040.00417.18
8.0.260.0030.00317.14
8.0.250.0070.00017.00
8.0.240.0000.00816.83
8.0.230.0040.00416.95
8.0.220.0000.00716.79
8.0.210.0040.00416.84
8.0.200.0030.00316.98
8.0.190.0000.00716.98
8.0.180.0000.00716.88
8.0.170.0030.00516.86
8.0.160.0000.00816.79
8.0.150.0000.00716.75
8.0.140.0060.00616.75
8.0.130.0000.00613.30
8.0.120.0040.00416.80
8.0.110.0040.00416.91
8.0.100.0000.00716.87
8.0.90.0000.00716.90
8.0.80.0030.01216.79
8.0.70.0000.00716.87
8.0.60.0000.00816.73
8.0.50.0070.00016.88
8.0.30.0090.01117.15
8.0.20.0110.00717.40
8.0.10.0070.00016.78
8.0.00.0050.01316.81
7.4.330.0020.00215.07
7.4.320.0000.00716.43
7.4.300.0040.00416.64
7.4.290.0030.00316.50
7.4.280.0000.00716.57
7.4.270.0030.00316.44
7.4.260.0030.00316.53
7.4.250.0000.00716.55
7.4.240.0040.00316.54
7.4.230.0040.00416.59
7.4.220.0090.00916.53
7.4.210.0030.01416.59
7.4.200.0000.00716.49
7.4.160.0110.00716.58
7.4.150.0100.00717.40
7.4.140.0050.01317.86
7.4.130.0120.00716.55
7.4.120.0120.00516.60
7.4.110.0120.01116.59
7.4.100.0090.00916.57
7.4.90.0100.01016.47
7.4.80.0110.01119.39
7.4.70.0090.00816.65
7.4.60.0090.00916.58
7.4.50.0030.00616.70
7.4.40.0100.00616.63
7.4.30.0030.01316.57
7.4.00.0090.00615.03
7.3.330.0030.00213.21
7.3.320.0020.00213.22
7.3.310.0030.00316.31
7.3.300.0050.00216.23
7.3.290.0030.01116.36
7.3.280.0120.00816.38
7.3.270.0090.00817.40
7.3.260.0130.00716.55
7.3.250.0120.00816.53
7.3.240.0040.01416.58
7.3.230.0060.00916.53
7.3.210.0180.00016.36
7.3.200.0060.00919.39
7.3.190.0130.00916.66
7.3.180.0080.00816.39
7.3.170.0200.00316.44
7.3.160.0030.01316.43
7.3.120.0000.01414.83
7.3.10.0070.00416.63
7.3.00.0080.00416.68
7.2.330.0090.01216.43
7.2.320.0070.01316.75
7.2.310.0130.00316.60
7.2.300.0140.00716.79
7.2.290.0070.01316.75
7.2.130.0050.00516.92
7.2.120.0060.00916.95
7.2.110.0000.01316.92
7.2.100.0070.00317.06
7.2.90.0100.00716.84
7.2.80.0140.00017.09
7.2.70.0060.00616.84
7.2.60.0030.01317.00
7.2.50.0070.00716.70
7.2.40.0000.01316.97
7.2.30.0100.00616.99
7.2.20.0000.01016.98
7.2.10.0120.00017.03
7.2.00.0040.00816.80
7.1.250.0060.00315.77
7.1.70.0090.00617.25
7.1.60.0100.01319.70
7.1.50.0140.01017.14
7.1.00.0030.07722.44
7.0.200.0000.00916.88
7.0.140.0130.06022.12
7.0.60.0030.05720.04
7.0.50.0100.03317.85
7.0.40.0100.08319.96
7.0.30.0300.07720.07
7.0.20.0270.03320.25
7.0.10.0070.04320.23
7.0.00.0070.06720.24
5.6.210.0100.07720.71
5.6.200.0170.05718.25
5.6.190.0100.07320.68
5.6.180.0270.04020.77
5.6.170.0270.07720.46
5.6.160.0130.06320.39
5.6.150.0030.07718.19
5.6.140.0100.07318.18
5.6.130.0030.08318.14
5.6.120.0000.06321.15
5.6.110.0130.07721.05
5.6.100.0000.04721.05
5.6.90.0100.09020.88
5.6.80.0100.07320.40
5.6.70.0700.02720.44
5.5.350.0000.08020.41
5.5.340.0030.07018.03
5.5.330.0070.07320.21
5.5.320.0230.08020.29
5.5.310.0300.06720.34
5.5.300.0030.07717.95
5.5.290.0070.07318.08
5.5.280.0070.08020.85
5.5.270.0000.08720.84
5.5.260.0070.08320.76
5.5.250.0100.06020.48
5.5.240.0230.03320.27
5.4.450.0430.04034.43
5.4.440.0100.04732.20
5.4.430.0430.05032.19
5.4.420.0730.03732.19
5.4.410.0230.04332.19
5.4.400.0170.04032.20
5.4.390.0830.05032.09
5.4.380.0270.05318.78
5.4.370.0430.05018.79
5.4.360.0270.06018.72
5.4.350.0500.04718.72
5.4.340.0200.06718.62
5.4.320.0090.03912.51
5.4.310.0050.05212.50
5.4.300.0080.03412.50
5.4.290.0070.05012.50
5.4.280.0050.03812.40
5.4.270.0070.03612.40
5.4.260.0070.03712.39
5.4.250.0070.03612.40
5.4.240.0070.03612.40
5.4.230.0040.04012.39
5.4.220.0090.03612.39
5.4.210.0060.03912.39
5.4.200.0070.04812.39
5.4.190.0070.04912.38
5.4.180.0060.05012.39
5.4.170.0090.04712.39
5.4.160.0160.03812.39
5.4.150.0080.04512.39
5.4.140.0130.07712.07
5.4.130.0090.05112.06
5.4.120.0100.04712.02
5.4.110.0060.07412.01
5.4.100.0070.04812.01
5.4.90.0100.04612.01
5.4.80.0090.04912.01
5.4.70.0080.03812.01
5.4.60.0090.04212.01
5.4.50.0060.04612.01
5.4.40.0140.03712.00
5.4.30.0090.04411.99
5.4.20.0090.03811.99
5.4.10.0100.04011.99
5.4.00.0060.03911.48
5.3.290.0090.05712.80
5.3.280.0090.04612.71
5.3.270.0170.05312.72
5.3.260.0120.05812.71
5.3.250.0130.05212.72
5.3.240.0070.05512.72
5.3.230.0100.05012.71
5.3.220.0090.04912.68
5.3.210.0080.03812.68
5.3.200.0070.04412.68
5.3.190.0140.04112.68
5.3.180.0090.05312.68
5.3.170.0070.05312.67
5.3.160.0090.05412.67
5.3.150.0110.05312.68
5.3.140.0080.05312.66
5.3.130.0150.05012.66
5.3.120.0130.05312.65
5.3.110.0100.05612.66
5.3.100.0090.04912.12
5.3.90.0050.05712.10
5.3.80.0070.05112.09
5.3.70.0080.04612.09
5.3.60.0100.05012.08
5.3.50.0070.04612.02
5.3.40.0130.06612.02
5.3.30.0080.05211.98
5.3.20.0070.04811.77
5.3.10.0140.04011.73
5.3.00.0120.04111.71
5.2.170.0060.0389.21
5.2.160.0100.0329.21
5.2.150.0060.0379.21
5.2.140.0070.0369.21
5.2.130.0120.0369.17
5.2.120.0070.0339.17
5.2.110.0070.0319.18
5.2.100.0100.0279.17
5.2.90.0120.0299.17
5.2.80.0070.0359.17
5.2.70.0080.0409.17
5.2.60.0050.0439.13
5.2.50.0070.0419.10
5.2.40.0060.0389.07
5.2.30.0040.0449.05
5.2.20.0040.0429.04
5.2.10.0080.0378.94
5.2.00.0050.0318.80
5.1.60.0040.0268.09
5.1.50.0050.0278.08
5.1.40.0030.0298.06
5.1.30.0050.0368.41
5.1.20.0080.0358.43
5.1.10.0050.0268.16
5.1.00.0050.0268.16
5.0.50.0030.0226.64
5.0.40.0080.0166.50
5.0.30.0040.0426.30
5.0.20.0040.0276.28
5.0.10.0060.0266.25
5.0.00.0040.0406.25
4.4.90.0050.0204.78
4.4.80.0040.0214.75
4.4.70.0050.0204.75
4.4.60.0070.0184.75
4.4.50.0060.0194.77
4.4.40.0020.0344.71
4.4.30.0040.0204.76
4.4.20.0030.0234.85
4.4.10.0060.0214.85
4.4.00.0100.0274.75
4.3.110.0040.0244.67
4.3.100.0030.0234.67
4.3.90.0040.0224.64
4.3.80.0060.0314.59
4.3.70.0040.0214.63
4.3.60.0030.0244.63
4.3.50.0070.0224.63
4.3.40.0040.0364.54
4.3.30.0050.0223.30
4.3.20.0030.0253.29
4.3.10.0050.0213.25
4.3.00.0100.01331.69

preferences:
40.1 ms | 401 KiB | 5 Q