3v4l.org

run code in 300+ PHP versions simultaneously
<?php function foo($ar_holding, $starts_with) { $count = 0; foreach ($ar_holding as $v) { if (strpos($v, $starts_with)===0) { ++$count; } } return $count; } $ar_holding = array('usa-ny-nyc','usa-fl-ftl', 'usa-nj-hb', 'usa-ny-wch', 'usa-ny-li'); echo foo($ar_holding, "usa-ny-");

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.5.10.0110.00716.54
8.5.00.0120.00820.09
8.4.160.0140.00722.09
8.4.150.0030.00014.05
8.4.140.0140.00617.46
8.4.130.0090.01117.77
8.4.120.0110.00920.83
8.4.110.0100.01122.21
8.4.100.0060.00217.72
8.4.90.0130.00717.70
8.4.80.0050.00322.70
8.4.70.0120.00717.59
8.4.60.0070.00222.38
8.4.50.0090.01119.66
8.4.40.0080.00017.73
8.4.30.0170.00317.36
8.4.20.0060.01319.54
8.4.10.0030.00617.61
8.3.290.0100.01120.72
8.3.280.0140.00818.25
8.3.270.0110.00916.72
8.3.260.0050.00316.65
8.3.250.0040.00418.95
8.3.240.0130.00616.66
8.3.230.0100.00916.78
8.3.220.0110.00817.09
8.3.210.0120.00816.57
8.3.200.0060.00316.72
8.3.190.0110.00817.11
8.3.180.0140.00616.33
8.3.170.0120.00618.57
8.3.160.0120.00616.50
8.3.150.0150.00320.50
8.3.140.0080.00018.91
8.3.130.0080.00016.64
8.3.120.0070.01020.61
8.3.110.0080.00020.94
8.3.100.0070.01724.06
8.3.90.0120.00626.77
8.3.80.0030.00618.18
8.3.70.0150.00018.33
8.3.60.0040.01818.14
8.3.50.0070.00717.36
8.3.40.0160.00018.71
8.3.30.0070.00718.75
8.3.20.0000.00821.91
8.3.10.0070.00021.93
8.3.00.0050.00318.89
8.2.300.0130.00922.13
8.2.290.0120.00920.28
8.2.280.0110.01020.00
8.2.270.0070.01116.86
8.2.260.0050.00318.15
8.2.250.0080.00018.37
8.2.240.0090.00617.01
8.2.230.0040.00422.58
8.2.220.0090.00037.54
8.2.210.0040.00426.77
8.2.200.0040.00416.75
8.2.190.0090.00916.58
8.2.180.0040.01116.63
8.2.170.0040.01122.96
8.2.160.0030.01221.14
8.2.150.0080.00024.18
8.2.140.0050.00224.66
8.2.130.0050.00326.16
8.2.120.0080.00021.04
8.2.110.0100.00020.91
8.2.100.0060.00617.91
8.2.90.0050.00317.90
8.2.80.0080.00017.97
8.2.70.0050.00318.04
8.2.60.0000.00818.16
8.2.50.0040.00418.10
8.2.40.0030.00519.30
8.2.30.0000.00719.48
8.2.20.0040.00317.96
8.2.10.0000.00718.16
8.2.00.0040.00418.11
8.1.330.0150.00516.70
8.1.320.0110.00816.19
8.1.310.0080.00018.62
8.1.300.0030.00618.05
8.1.290.0100.00030.84
8.1.280.0100.00725.92
8.1.270.0030.00623.99
8.1.260.0040.00426.35
8.1.250.0070.00028.09
8.1.240.0110.00020.68
8.1.230.0090.00322.74
8.1.220.0060.00317.74
8.1.210.0080.00018.77
8.1.200.0060.00317.35
8.1.190.0050.00317.23
8.1.180.0000.01218.10
8.1.170.0050.00518.68
8.1.160.0000.00718.89
8.1.150.0000.00718.89
8.1.140.0040.00417.63
8.1.130.0000.00720.18
8.1.120.0000.00717.37
8.1.110.0040.00417.50
8.1.100.0000.00817.45
8.1.90.0000.00717.36
8.1.80.0080.00017.34
8.1.70.0030.00317.48
8.1.60.0040.00417.61
8.1.50.0040.00417.57
8.1.40.0040.00417.52
8.1.30.0050.00317.55
8.1.20.0040.00417.52
8.1.10.0050.00217.53
8.1.00.0040.00417.33
8.0.300.0000.00821.51
8.0.290.0060.00316.75
8.0.280.0000.00718.37
8.0.270.0000.00717.25
8.0.260.0060.00316.79
8.0.250.0030.00316.87
8.0.240.0050.00216.84
8.0.230.0030.00316.90
8.0.220.0000.00716.76
8.0.210.0080.00016.78
8.0.200.0050.00316.96
8.0.190.0070.00416.91
8.0.180.0000.00716.93
8.0.170.0050.00316.79
8.0.160.0040.00416.86
8.0.150.0080.00016.72
8.0.140.0040.00416.77
8.0.130.0030.00313.28
8.0.120.0040.00416.91
8.0.110.0030.00516.77
8.0.100.0000.00716.71
8.0.90.0080.00016.92
8.0.80.0040.01116.94
8.0.70.0040.00416.73
8.0.60.0000.00716.91
8.0.50.0040.00416.83
8.0.30.0110.00817.07
8.0.20.0150.00717.40
8.0.10.0070.00016.90
8.0.00.0090.01116.63
7.4.330.0020.00215.55
7.4.320.0000.00616.59
7.4.300.0030.00316.49
7.4.290.0080.00016.59
7.4.280.0000.00816.60
7.4.270.0000.00716.51
7.4.260.0060.00016.59
7.4.250.0000.00716.57
7.4.240.0040.00416.56
7.4.230.0030.00516.68
7.4.220.0000.00816.53
7.4.210.0110.00516.40
7.4.200.0030.00316.67
7.4.160.0080.00916.57
7.4.140.0120.00817.86
7.4.130.0070.01116.51
7.4.120.0080.01116.56
7.4.110.0140.00316.45
7.4.100.0090.01216.30
7.4.90.0090.00916.48
7.4.80.0100.01419.39
7.4.70.0110.01116.60
7.4.60.0090.00916.47
7.4.50.0130.00316.39
7.4.40.0060.01016.59
7.4.00.0080.00714.95
7.3.330.0020.00213.25
7.3.320.0030.00313.25
7.3.310.0030.00316.30
7.3.300.0000.00716.30
7.3.290.0000.00816.25
7.3.280.0110.00616.20
7.3.260.0120.00716.43
7.3.240.0120.00716.35
7.3.230.0030.01416.54
7.3.210.0130.00316.63
7.3.200.0100.01016.37
7.3.190.0090.00916.26
7.3.180.0110.00616.55
7.3.170.0120.00916.40
7.3.160.0110.00716.46
7.3.120.0060.01314.90
7.3.110.0140.00315.06
7.3.100.0070.01114.49
7.3.90.0070.00615.11
7.3.80.0030.00915.04
7.3.70.0070.00414.75
7.3.60.0090.00314.70
7.3.50.0090.00014.66
7.3.40.0000.01214.94
7.3.30.0070.00314.89
7.3.20.0000.00916.61
7.3.10.0060.00916.72
7.3.00.0080.00816.54
7.2.330.0140.00316.61
7.2.320.0090.01116.78
7.2.310.0080.00816.72
7.2.300.0060.01116.51
7.2.290.0160.00616.71
7.2.250.0130.00615.23
7.2.240.0130.00714.97
7.2.230.0050.00515.15
7.2.220.0030.01014.97
7.2.210.0000.01614.78
7.2.200.0060.00315.05
7.2.190.0100.00315.09
7.2.180.0090.00615.18
7.2.170.0070.00714.96
7.2.130.0110.00416.75
7.2.120.0100.00716.54
7.2.110.0060.00916.75
7.2.100.0100.00316.46
7.2.90.0080.00616.73
7.2.80.0130.00616.56
7.2.70.0120.00616.93
7.2.60.0070.00816.70
7.2.50.0040.01016.70
7.2.40.0210.00917.28
7.2.30.0220.00917.49
7.2.20.0260.00617.42
7.2.10.0200.00617.11
7.2.00.0160.01017.54
7.1.330.0030.01015.46
7.1.320.0040.01115.94
7.1.310.0060.01015.86
7.1.300.0030.00915.53
7.1.290.0100.00315.60
7.1.280.0040.00715.82
7.1.270.0040.00915.58
7.1.260.0070.00315.84
7.1.250.0110.00415.47
7.1.240.0080.00815.27
7.1.230.0100.00315.48
7.1.220.0080.00815.55
7.1.210.0080.00415.24
7.1.200.0080.00815.57
7.1.190.0140.00315.27
7.1.180.0120.00315.82
7.1.170.0110.00415.50
7.1.160.0160.01016.06
7.1.150.0320.00516.20
7.1.140.0210.00916.13
7.1.130.0250.00716.23
7.1.120.0230.00816.31
7.1.110.0170.00515.96
7.1.100.0160.01115.87
7.1.90.0210.00615.97
7.1.80.0170.00715.71
7.1.70.0170.00715.38
7.1.60.0310.00524.21
7.1.50.0260.01024.40
7.1.40.0270.00624.30
7.1.30.0300.00624.24
7.1.20.0240.00924.11
7.1.10.0190.00615.16
7.1.00.0180.00815.13
7.0.330.0090.00615.04
5.6.380.0090.00014.21

preferences:
177.44 ms | 403 KiB | 5 Q