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,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.0100.01418.09
8.3.50.0130.00521.97
8.3.40.0110.00418.43
8.3.30.0040.01118.95
8.3.20.0070.00020.26
8.3.10.0080.00023.66
8.3.00.0080.00018.96
8.2.180.0130.01016.50
8.2.170.0110.00322.96
8.2.160.0080.00520.43
8.2.150.0040.00424.18
8.2.140.0030.00524.66
8.2.130.0040.00426.16
8.2.120.0050.00319.23
8.2.110.0000.00920.47
8.2.100.0040.00819.57
8.2.90.0000.00818.16
8.2.80.0080.00017.97
8.2.70.0090.00017.63
8.2.60.0050.00218.05
8.2.50.0040.00418.07
8.2.40.0030.00519.94
8.2.30.0000.00718.12
8.2.20.0000.00817.81
8.2.10.0000.00717.99
8.2.00.0000.00717.79
8.1.280.0110.00425.92
8.1.270.0000.00824.02
8.1.260.0000.00726.35
8.1.250.0070.00028.09
8.1.240.0040.00422.18
8.1.230.0060.00620.90
8.1.220.0040.00417.74
8.1.210.0050.00318.97
8.1.200.0060.00317.22
8.1.190.0030.00617.23
8.1.180.0000.00818.10
8.1.170.0060.00318.67
8.1.160.0070.00021.96
8.1.150.0090.00018.63
8.1.140.0000.00817.49
8.1.130.0030.00319.72
8.1.120.0070.00017.45
8.1.110.0050.00317.39
8.1.100.0050.00217.46
8.1.90.0000.00717.45
8.1.80.0040.00417.50
8.1.70.0030.00317.35
8.1.60.0050.00317.45
8.1.50.0000.00917.53
8.1.40.0030.00617.49
8.1.30.0000.00817.64
8.1.20.0040.00417.49
8.1.10.0000.00717.49
8.1.00.0030.00517.45
8.0.300.0080.00020.13
8.0.290.0000.00716.75
8.0.280.0040.00418.34
8.0.270.0030.00317.25
8.0.260.0040.00417.31
8.0.250.0000.00716.93
8.0.240.0000.00716.97
8.0.230.0030.00316.88
8.0.220.0080.00016.87
8.0.210.0000.00716.93
8.0.200.0030.00317.00
8.0.190.0040.00416.91
8.0.180.0070.00016.80
8.0.170.0040.00416.89
8.0.160.0030.00316.82
8.0.150.0000.00816.78
8.0.140.0030.00616.84
8.0.130.0030.00313.29
8.0.120.0040.00416.86
8.0.110.0050.00316.87
8.0.100.0040.00416.82
8.0.90.0080.00016.76
8.0.80.0060.00916.95
8.0.70.0040.00416.86
8.0.60.0000.00816.84
8.0.50.0000.00816.81
8.0.30.0130.00616.91
8.0.20.0090.01017.40
8.0.10.0000.00716.71
8.0.00.0130.00716.60
7.4.330.0000.00515.13
7.4.320.0000.00716.57
7.4.300.0030.00316.49
7.4.290.0040.00416.56
7.4.280.0070.00016.41
7.4.270.0030.00316.49
7.4.260.0040.00516.59
7.4.250.0030.00616.47
7.4.240.0020.00516.43
7.4.230.0040.00416.68
7.4.220.0090.00916.62
7.4.210.0110.00316.50
7.4.200.0030.00316.51
7.4.160.0080.00816.53
7.4.150.0120.00817.40
7.4.140.0150.00817.86
7.4.130.0070.01116.43
7.4.120.0100.01016.50
7.4.110.0060.01616.48
7.4.100.0130.00316.55
7.4.90.0170.00316.43
7.4.80.0060.01219.39
7.4.70.0060.01316.49
7.4.60.0030.01316.53
7.4.50.0030.00616.31
7.4.40.0100.01016.62
7.4.30.0110.00516.65
7.4.00.0120.00615.06
7.3.330.0000.00513.29
7.3.320.0000.00513.22
7.3.310.0070.00016.34
7.3.300.0050.00316.25
7.3.290.0100.00316.29
7.3.280.0080.01116.25
7.3.270.0090.00917.40
7.3.260.0110.00716.40
7.3.250.0100.01016.43
7.3.240.0040.01616.42
7.3.230.0110.00516.60
7.3.210.0030.01516.46
7.3.200.0090.01119.39
7.3.190.0100.01316.29
7.3.180.0040.01216.34
7.3.170.0130.01016.29
7.3.160.0030.01216.46
7.3.120.0070.01014.87
7.3.110.0060.01315.09
7.3.100.0110.00415.02
7.3.90.0060.00914.70
7.3.80.0060.00914.50
7.3.70.0070.00714.77
7.3.60.0030.01314.86
7.3.50.0000.01514.76
7.3.40.0060.00814.95
7.3.30.0080.00014.46
7.3.20.0070.00716.64
7.3.10.0140.00716.41
7.3.00.0140.00716.45
7.2.330.0120.00616.69
7.2.320.0090.01016.77
7.2.310.0060.01016.65
7.2.300.0090.01316.84
7.2.290.0100.00716.65
7.2.250.0100.01015.26
7.2.240.0060.00915.27
7.2.230.0070.01015.21
7.2.220.0120.00615.09
7.2.210.0120.00615.24
7.2.200.0110.00315.14
7.2.190.0060.00314.90
7.2.180.0030.01215.12
7.2.170.0030.00615.04
7.2.130.0050.01016.52
7.2.120.0050.00816.53
7.2.110.0050.00916.76
7.2.100.0090.00616.43
7.2.90.0030.01116.49
7.2.80.0130.00816.55
7.2.70.0110.00616.52
7.2.60.0130.00716.73
7.2.50.0110.00716.64
7.2.40.0100.01416.86
7.2.30.0120.00716.60
7.2.20.0050.01216.60
7.2.10.0100.00516.76
7.2.00.0040.00817.72
7.1.330.0000.01515.77
7.1.320.0000.01415.74
7.1.310.0050.00815.94
7.1.300.0030.01015.62
7.1.290.0030.01215.57
7.1.280.0070.00715.86
7.1.270.0040.01115.61
7.1.260.0070.00415.84
7.1.250.0050.00915.45
7.1.200.0210.00915.36
7.1.100.0000.01118.04
7.1.70.0000.00717.10
7.1.60.0070.01719.70
7.1.50.0120.00916.98
7.1.00.0070.07322.45
7.0.200.0000.00816.79
7.0.140.0100.06721.95
7.0.60.0130.07719.86
7.0.50.0000.04717.83
7.0.40.0130.08020.09
7.0.30.0270.08020.22
7.0.20.0300.07020.32
7.0.10.0130.04720.07
7.0.00.0130.07320.33
5.6.280.0070.06721.03
5.6.210.0100.07320.61
5.6.200.0130.07718.16
5.6.190.0070.09020.67
5.6.180.0370.07020.61
5.6.170.0370.07020.56
5.6.160.0070.08320.52
5.6.150.0170.07018.15
5.6.140.0070.04018.19
5.6.130.0030.04318.12
5.6.120.0100.07721.00
5.6.110.0170.07721.00
5.6.100.0100.08021.00
5.6.90.0070.08021.01
5.6.80.0030.04320.49
5.6.70.4500.03320.38
5.5.350.0030.07320.41
5.5.340.0070.08018.07
5.5.330.0170.07320.41
5.5.320.0200.03720.31
5.5.310.0170.05020.33
5.5.300.0070.07717.92
5.5.290.0070.06017.95
5.5.280.0070.05720.86
5.5.270.0130.08020.79
5.5.260.0030.04320.76
5.5.250.0070.08320.56
5.5.240.3930.04020.27
5.4.450.0130.04034.43
5.4.440.0600.03732.20
5.4.430.0230.04732.19
5.4.420.0330.03732.19
5.4.410.0330.08332.19
5.4.400.0330.03332.19
5.4.390.0300.04031.93
5.4.380.0370.04318.53
5.4.370.0270.06018.66
5.4.360.0370.05018.78
5.4.350.0330.05018.77
5.4.340.0500.04318.74
5.4.320.0040.03712.51
5.4.310.0060.04312.50
5.4.300.0090.03612.50
5.4.290.0050.04012.50
5.4.280.0070.03512.40
5.4.270.0040.03912.40
5.4.260.0070.03812.40
5.4.250.0060.04012.40
5.4.240.0070.04012.40
5.4.230.0070.04012.39
5.4.220.0050.03912.39
5.4.210.0090.04612.39
5.4.200.0080.04912.39
5.4.190.0090.03612.39
5.4.180.0050.03912.39
5.4.170.0100.03712.39
5.4.160.0050.03912.39
5.4.150.0070.03812.39
5.4.140.0080.03612.07
5.4.130.0050.03712.05
5.4.120.0080.03412.02
5.4.110.0080.03512.02
5.4.100.0090.03312.01
5.4.90.0050.04012.01
5.4.80.0040.04212.02
5.4.70.0050.03812.00
5.4.60.0070.03712.00
5.4.50.0080.03512.01
5.4.40.0060.03812.00
5.4.30.0070.03612.00
5.4.20.0070.03811.99
5.4.10.0060.03712.00
5.4.00.0060.03811.48
5.3.290.0030.04412.80
5.3.280.0090.04112.71
5.3.270.0090.03912.72
5.3.260.0080.03912.72
5.3.250.0100.03512.72
5.3.240.0080.03712.72
5.3.230.0090.04812.71
5.3.220.0100.05012.68
5.3.210.0100.05012.68
5.3.200.0100.04212.68
5.3.190.0120.03812.68
5.3.180.0040.04112.68
5.3.170.0050.04112.67
5.3.160.0100.04812.67
5.3.150.0090.04112.67
5.3.140.0050.04112.66
5.3.130.0050.04112.66
5.3.120.0070.04312.65
5.3.110.0070.05112.65
5.3.100.0100.04912.12
5.3.90.0130.04712.10
5.3.80.0080.04912.09
5.3.70.0110.04612.09
5.3.60.0080.05212.08
5.3.50.0160.04712.02
5.3.40.0130.04612.02
5.3.30.0090.04911.98
5.3.20.0090.04611.76
5.3.10.0080.04911.73
5.3.00.0110.03511.72
5.2.170.0080.0299.21
5.2.160.0070.0339.21
5.2.150.0040.0379.21
5.2.140.0040.0379.21
5.2.130.0020.0399.17
5.2.120.0090.0309.17
5.2.110.0070.0309.18
5.2.100.0050.0349.17
5.2.90.0050.0339.18
5.2.80.0050.0339.17
5.2.70.0060.0309.17
5.2.60.0080.0319.13
5.2.50.0040.0319.09
5.2.40.0040.0319.07
5.2.30.0060.0309.04
5.2.20.0080.0279.03
5.2.10.0040.0318.94
5.2.00.0060.0288.81
5.1.60.0030.0258.09
5.1.50.0050.0258.08
5.1.40.0040.0268.06
5.1.30.0030.0278.41
5.1.20.0040.0278.43
5.1.10.0070.0248.16
5.1.00.0040.0308.16
5.0.50.0060.0196.63
5.0.40.0030.0226.50
5.0.30.0050.0336.31
5.0.20.0070.0186.27
5.0.10.0050.0226.26
5.0.00.0030.0336.25
4.4.90.0070.0144.78
4.4.80.0050.0134.75
4.4.70.0030.0154.76
4.4.60.0030.0154.75
4.4.50.0020.0164.77
4.4.40.0030.0284.71
4.4.30.0030.0164.76
4.4.20.0030.0164.84
4.4.10.0040.0174.84
4.4.00.0020.0304.75
4.3.110.0050.0154.67
4.3.100.0070.0124.66
4.3.90.0040.0154.63
4.3.80.0050.0284.58
4.3.70.0030.0214.63
4.3.60.0050.0194.63
4.3.50.0050.0204.63
4.3.40.0040.0314.54
4.3.30.0030.0213.30
4.3.20.0040.0203.29
4.3.10.0030.0183.25
4.3.00.0070.02031.70

preferences:
71.23 ms | 401 KiB | 5 Q