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)); echo $first_letter."<br>"; print_r($vowels); $new_string = ""; if( in_array($first_letter,$vowels) ) { $new_string = "an <strong>".ucfirst($string)."</strong>"; } else { $new_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.0120.00916.75
8.3.50.0100.01018.18
8.3.40.0070.00718.63
8.3.30.0180.00019.05
8.3.20.0040.00420.09
8.3.10.0040.00423.52
8.3.00.0040.00420.97
8.2.180.0090.00918.16
8.2.170.0080.00622.96
8.2.160.0070.00720.55
8.2.150.0000.00724.18
8.2.140.0080.00024.66
8.2.130.0070.00026.16
8.2.120.0030.00619.36
8.2.110.0090.00022.07
8.2.100.0110.00019.51
8.2.90.0000.00819.03
8.2.80.0000.00817.97
8.2.70.0030.00717.50
8.2.60.0060.00317.80
8.2.50.0000.00818.07
8.2.40.0030.00620.07
8.2.30.0080.00018.25
8.2.20.0050.00317.56
8.2.10.0040.00418.04
8.2.00.0040.00417.62
8.1.280.0070.00725.92
8.1.270.0030.00623.91
8.1.260.0000.00826.35
8.1.250.0070.00028.09
8.1.240.0000.00822.18
8.1.230.0070.00319.00
8.1.220.0050.00317.79
8.1.210.0000.00818.77
8.1.200.0030.00617.10
8.1.190.0000.00817.10
8.1.180.0000.00818.10
8.1.170.0040.00418.65
8.1.160.0000.00722.01
8.1.150.0040.00418.56
8.1.140.0040.00417.40
8.1.130.0070.00019.53
8.1.120.0030.00417.51
8.1.110.0040.00417.42
8.1.100.0050.00217.34
8.1.90.0070.00017.46
8.1.80.0020.00517.42
8.1.70.0030.00317.35
8.1.60.0030.00617.51
8.1.50.0040.00417.49
8.1.40.0080.00317.45
8.1.30.0030.00617.50
8.1.20.0000.00817.60
8.1.10.0070.00017.41
8.1.00.0080.00017.43
8.0.300.0000.00718.77
8.0.290.0040.00417.05
8.0.280.0040.00418.44
8.0.270.0040.00417.21
8.0.260.0030.00317.31
8.0.250.0080.00016.95
8.0.240.0000.00816.98
8.0.230.0070.00016.88
8.0.220.0000.00716.94
8.0.210.0000.00716.90
8.0.200.0060.00016.94
8.0.190.0070.00016.88
8.0.180.0070.00016.97
8.0.170.0050.00516.95
8.0.160.0000.00716.77
8.0.150.0030.00316.72
8.0.140.0090.00416.89
8.0.130.0030.00313.25
8.0.120.0080.00016.91
8.0.110.0000.00816.76
8.0.100.0050.00216.91
8.0.90.0050.00316.73
8.0.80.0060.00916.94
8.0.70.0040.00416.82
8.0.60.0000.00716.78
8.0.50.0080.00016.76
8.0.30.0100.01117.05
8.0.20.0090.01317.40
8.0.10.0050.00216.93
8.0.00.0120.00716.89
7.4.330.0020.00215.05
7.4.320.0070.00016.52
7.4.300.0060.00016.65
7.4.290.0000.00716.49
7.4.280.0040.00416.42
7.4.270.0030.00316.40
7.4.260.0030.00316.63
7.4.250.0040.00416.42
7.4.240.0020.00516.41
7.4.230.0000.00716.63
7.4.220.0140.00316.64
7.4.210.0180.00316.55
7.4.200.0070.00016.59
7.4.160.0030.01516.52
7.4.150.0120.00817.40
7.4.140.0120.00717.86
7.4.130.0050.01216.59
7.4.120.0040.01216.48
7.4.110.0060.01216.71
7.4.100.0140.00316.59
7.4.90.0090.00916.52
7.4.80.0050.01419.39
7.4.70.0120.00616.61
7.4.60.0090.00916.54
7.4.50.0050.00316.52
7.4.40.0090.00616.53
7.4.30.0060.01016.63
7.4.00.0030.01314.73
7.3.330.0000.00513.09
7.3.320.0050.00013.10
7.3.310.0030.00316.26
7.3.300.0080.00016.25
7.3.290.0090.00616.30
7.3.280.0050.01416.32
7.3.270.0120.00617.40
7.3.260.0120.01216.59
7.3.250.0080.01116.34
7.3.240.0110.00716.51
7.3.230.0130.00316.39
7.3.210.0100.01016.50
7.3.200.0130.00319.39
7.3.190.0150.00316.68
7.3.180.0070.01016.29
7.3.170.0160.00316.36
7.3.160.0110.00416.55
7.3.120.0030.01315.17
7.2.330.0100.01316.51
7.2.320.0100.00716.77
7.2.310.0060.00916.49
7.2.300.0130.00316.64
7.2.290.0100.00716.75
7.2.120.0140.00416.72
7.2.110.0120.00316.45
7.2.100.0030.01216.38
7.2.90.0130.00616.64
7.2.80.0080.00816.73
7.2.70.0150.00416.79
7.2.60.0120.00416.53
7.2.50.0130.00316.75
7.2.40.0100.00716.96
7.2.30.0100.01017.14
7.2.20.0100.00716.81
7.2.10.0190.00016.92
7.2.00.0060.00818.13
7.1.240.0160.00315.99
7.1.230.0050.01115.94
7.1.220.0180.00015.55
7.1.210.0140.00615.75
7.1.200.0060.01015.48
7.1.190.0040.01115.60
7.1.180.0120.00615.74
7.1.170.0040.01215.72
7.1.160.0170.00015.75
7.1.150.0110.00515.81
7.1.140.0140.00315.69
7.1.130.0160.00015.50
7.1.120.0100.00515.82
7.1.110.0060.01316.00
7.1.100.0220.00916.74
7.1.90.0130.00515.73
7.1.80.0090.00415.77
7.1.70.0060.00716.42
7.1.60.0080.01117.74
7.1.50.0150.00416.35
7.1.40.0000.01315.69
7.1.30.0120.00715.82
7.1.20.0100.00715.69
7.1.10.0020.01215.76
7.1.00.0100.03718.99
7.0.320.0100.00715.10
7.0.310.0090.00615.25
7.0.300.0040.00815.23
7.0.290.0130.00415.40
7.0.280.0080.00815.32
7.0.270.0080.00815.48
7.0.260.0110.00415.45
7.0.250.0040.01115.43
7.0.240.0110.00515.55
7.0.230.0130.00415.66
7.0.220.0180.00015.16
7.0.210.0120.00315.56
7.0.200.0070.00516.00
7.0.190.0120.00415.52
7.0.180.0100.00715.55
7.0.170.0120.00315.58
7.0.160.0120.00615.35
7.0.150.0130.00315.39
7.0.140.0120.03518.67
7.0.130.0090.00915.32
7.0.120.0080.00515.42
7.0.110.0100.00715.35
7.0.100.0090.00615.48
7.0.90.0130.00415.29
7.0.80.0140.00315.08
7.0.70.0120.00315.14
7.0.60.0100.02317.69
7.0.50.0100.02516.72
7.0.40.0120.02716.70
7.0.30.0270.03816.81
7.0.20.0180.02916.85
7.0.10.0070.02816.87
7.0.00.0100.03716.87
5.6.380.0110.00514.10
5.6.370.0140.00514.24
5.6.360.0160.00014.46
5.6.350.0120.00214.20
5.6.340.0040.01414.25
5.6.330.0110.00614.18
5.6.320.0100.00614.13
5.6.310.0110.00014.48
5.6.300.0060.01114.32
5.6.290.0120.00214.12
5.6.280.0040.03817.57
5.6.270.0100.00514.47
5.6.260.0170.00014.33
5.6.250.0160.00014.54
5.6.240.0110.00514.37
5.6.230.0150.00514.37
5.6.220.0120.00414.27
5.6.210.0140.03317.66
5.6.200.0080.02416.22
5.6.190.0020.04017.45
5.6.180.0350.03517.45
5.6.170.0140.02317.45
5.6.160.0110.03717.40
5.6.150.0060.02716.10
5.6.140.0090.04216.17
5.6.130.0100.03016.16
5.6.120.0130.03817.56
5.6.110.0070.04817.64
5.6.100.0100.04317.55
5.6.90.0080.03317.81
5.6.80.0060.02317.46
5.6.70.0100.00713.94
5.6.60.0130.00314.28
5.6.50.0090.00914.17
5.6.40.0090.00514.45
5.6.30.0100.00614.54
5.6.20.0110.00614.37
5.6.10.0130.00314.11
5.6.00.0140.00314.45
5.5.380.0070.00411.21
5.5.370.0080.00811.07
5.5.360.0030.00711.11
5.5.350.0120.01815.90
5.5.340.0050.04414.58
5.5.330.0110.02315.66
5.5.320.0050.02415.77
5.5.310.0140.02515.74
5.5.300.0080.04314.57
5.5.290.0080.04014.55
5.5.280.0140.03515.88
5.5.270.0060.04216.06
5.5.260.0070.04216.07
5.5.250.0100.04115.83
5.5.240.0070.04015.74
5.5.230.0030.00711.18
5.5.220.0000.01111.11
5.5.210.0030.01011.24
5.5.200.0040.00811.07
5.5.190.0030.00711.24
5.5.180.0050.00711.17
5.5.170.0100.00614.39
5.5.160.0100.00311.32
5.5.150.0070.00311.07
5.5.140.0110.00411.14
5.5.130.0110.00411.29
5.5.120.0090.00311.07
5.5.110.0100.00311.07
5.5.100.0140.00011.07
5.5.90.0140.00011.36
5.5.80.0070.00711.39
5.5.70.0120.00011.07
5.5.60.0080.00311.09
5.5.50.0070.00711.22
5.5.40.0080.00411.22
5.5.30.0040.00811.33
5.5.20.0080.00411.18
5.5.10.0080.00811.28
5.5.00.0080.00811.07
5.4.450.0170.02422.90
5.4.440.0190.02021.68
5.4.430.0170.02321.71
5.4.420.0200.02321.72
5.4.410.0330.02321.74
5.4.400.0330.01721.64
5.4.390.0180.02321.58
5.4.380.0120.03715.07
5.4.370.0160.02814.85
5.4.360.0230.03214.87
5.4.350.0260.02614.93
5.4.340.0190.02814.81
5.4.330.0100.00311.07
5.4.320.0070.02211.90
5.4.310.0070.02111.79
5.4.300.0030.02811.79
5.4.290.0040.02411.87
5.4.280.0080.02011.74
5.4.270.0040.02311.74
5.4.260.0070.02211.87
5.4.250.0050.02511.74
5.4.240.0080.02511.74
5.4.230.0160.05111.73
5.4.220.0100.03311.73
5.4.210.0080.02211.84
5.4.200.0070.02811.73
5.4.190.0060.02311.81
5.4.180.0130.03411.81
5.4.170.0110.02011.73
5.4.160.0110.01811.73
5.4.150.0050.02311.80
5.4.140.0100.01811.58
5.4.130.0070.02211.60
5.4.120.0100.02411.57
5.4.110.0080.02011.62
5.4.100.0100.01911.54
5.4.90.0090.02611.54
5.4.80.0090.02811.54
5.4.70.0110.01911.54
5.4.60.0090.02111.56
5.4.50.0050.02811.54
5.4.40.0060.02011.59
5.4.30.0070.02611.58
5.4.20.0060.02811.55
5.4.10.0100.03411.53
5.4.00.0060.02811.28
5.3.290.0080.02011.94
5.3.280.0100.02111.89
5.3.270.0080.02611.90
5.3.260.0070.02211.90
5.3.250.0110.01911.90
5.3.240.0080.02311.90
5.3.230.0060.02311.89
5.3.220.0050.02411.88
5.3.210.0070.02311.88
5.3.200.0100.02411.88
5.3.190.0080.02511.88
5.3.180.0110.03711.88
5.3.170.0080.02611.87
5.3.160.0070.02411.87
5.3.150.0050.03211.87
5.3.140.0060.02311.87
5.3.130.0090.04511.87
5.3.120.0090.03311.87
5.3.110.0070.03111.86
5.3.100.0040.03011.60
5.3.90.0040.02911.59
5.3.80.0080.02311.58
5.3.70.0060.02311.58
5.3.60.0050.02711.58
5.3.50.0080.01811.54
5.3.40.0060.02911.54
5.3.30.0090.02711.53
5.3.20.0080.02111.42
5.3.10.0060.02411.40
5.3.00.0090.02311.40
5.2.170.0030.01810.14
5.2.160.0020.02010.14
5.2.150.0040.02210.14
5.2.140.0040.01910.14
5.2.130.0060.01910.12
5.2.120.0070.02010.13
5.2.110.0040.02310.12
5.2.100.0040.02210.13
5.2.90.0040.02310.12
5.2.80.0050.02410.12
5.2.70.0020.02710.12
5.2.60.0060.02310.10
5.2.50.0060.02310.08
5.2.40.0060.02110.07
5.2.30.0060.02310.06
5.2.20.0050.02110.06
5.2.10.0050.02110.01
5.2.00.0050.0229.94
5.1.60.0030.0199.58
5.1.50.0060.0189.58
5.1.40.0050.0199.57
5.1.30.0030.0219.74
5.1.20.0060.0199.75
5.1.10.0040.0209.62
5.1.00.0040.0159.62
5.0.50.0040.0138.86
5.0.40.0050.0128.79
5.0.30.0040.0188.69
5.0.20.0050.0118.68
5.0.10.0030.0138.66
5.0.00.0020.0218.66
4.4.90.0020.0137.93
4.4.80.0010.0107.92
4.4.70.0020.0117.91
4.4.60.0040.0097.92
4.4.50.0060.0077.92
4.4.40.0030.0157.89
4.4.30.0010.0127.92
4.4.20.0040.0097.96
4.4.10.0040.0087.96
4.4.00.0040.0137.92
4.3.110.0050.0127.87
4.3.100.0050.0087.87
4.3.90.0040.0097.86
4.3.80.0020.0177.83
4.3.70.0030.0097.85
4.3.60.0030.0107.85
4.3.50.0030.0107.85
4.3.40.0030.0147.80
4.3.30.0040.0097.19
4.3.20.0020.0117.18
4.3.10.0040.0087.16
4.3.00.0050.00821.45

preferences:
50.15 ms | 400 KiB | 5 Q