3v4l.org

run code in 300+ PHP versions simultaneously
<?php $mlbCities = array( 'Carolina', 'Atlanta', 'New Orleans', 'Philadelphia', 'St. Louis', 'Washington', 'Houston', 'Tennessee', 'New England', 'NY Jets', 'Cincinnati', 'Green Bay', 'Arizona', 'Jacksonville', 'Oakland', 'Kansas City', 'Minnesota', 'Detroit', 'Tampa Bay', 'Buffalo', 'Seattle', 'San Francisco', 'Pittsburgh', 'Chicago', 'Baltimore', 'San Diego', 'Cleveland', 'Denver', 'NY Giants', 'Dallas', 'Indianapolis', 'Miami' ); $string = 'San Francisco Giants'; foreach($mlbCities as $city) { $index = strrpos( $string, $city ); if(is_numeric($index)) { print "$city\n"; } } ?>

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.0110.00718.31
8.3.50.0160.00521.97
8.3.40.0090.00618.84
8.3.30.0070.00718.94
8.3.20.0040.00420.34
8.3.10.0080.00023.70
8.3.00.0070.00319.21
8.2.180.0060.01216.50
8.2.170.0100.00722.96
8.2.160.0040.00920.43
8.2.150.0040.00424.18
8.2.140.0050.00224.66
8.2.130.0040.00426.16
8.2.120.0000.00819.36
8.2.110.0000.00922.20
8.2.100.0070.00418.22
8.2.90.0080.00019.23
8.2.80.0050.00317.97
8.2.70.0040.00417.62
8.2.60.0030.00818.05
8.2.50.0000.00818.07
8.2.40.0040.00418.22
8.2.30.0030.00318.30
8.2.20.0070.00017.62
8.2.10.0070.00018.17
8.2.00.0040.00419.64
8.1.280.0100.00725.92
8.1.270.0050.00323.97
8.1.260.0000.00726.35
8.1.250.0070.00028.09
8.1.240.0060.00322.13
8.1.230.0120.00019.08
8.1.220.0000.00817.74
8.1.210.0040.00418.77
8.1.200.0060.00317.35
8.1.190.0040.00417.23
8.1.180.0000.00818.10
8.1.170.0050.00318.55
8.1.160.0040.00422.00
8.1.150.0000.00718.55
8.1.140.0040.00417.46
8.1.130.0000.00817.82
8.1.120.0000.00717.37
8.1.110.0030.00517.51
8.1.100.0000.00817.41
8.1.90.0040.00417.38
8.1.80.0040.00417.50
8.1.70.0030.00317.32
8.1.60.0040.00417.47
8.1.50.0040.00417.52
8.1.40.0040.00417.35
8.1.30.0080.00017.65
8.1.20.0000.00717.69
8.1.10.0040.00417.38
8.1.00.0000.00717.34
8.0.300.0040.00418.77
8.0.290.0050.00216.75
8.0.280.0030.00318.35
8.0.270.0030.00317.30
8.0.260.0070.00017.25
8.0.250.0070.00016.96
8.0.240.0070.00016.82
8.0.230.0030.00316.93
8.0.220.0070.00016.93
8.0.210.0000.00716.88
8.0.200.0060.00016.96
8.0.190.0000.00817.02
8.0.180.0040.00416.89
8.0.170.0030.00516.95
8.0.160.0030.00516.94
8.0.150.0000.00816.84
8.0.140.0030.00716.68
8.0.130.0060.00013.30
8.0.120.0050.00216.82
8.0.110.0040.00416.86
8.0.100.0070.00016.95
8.0.90.0000.00816.79
8.0.80.0120.00416.85
8.0.70.0000.00717.00
8.0.60.0000.00716.86
8.0.50.0070.00016.71
8.0.30.0070.01117.06
8.0.20.0080.01117.40
8.0.10.0040.00417.00
8.0.00.0110.00716.79
7.4.330.0050.00015.00
7.4.320.0000.00616.61
7.4.300.0060.00016.49
7.4.290.0030.00316.53
7.4.280.0030.00516.59
7.4.270.0000.00816.56
7.4.260.0000.00716.50
7.4.250.0040.00416.61
7.4.240.0040.00416.55
7.4.230.0000.00716.60
7.4.220.0100.00716.56
7.4.210.0120.00816.56
7.4.200.0040.00316.68
7.4.160.0130.00716.36
7.4.150.0130.00617.40
7.4.140.0160.00317.86
7.4.130.0080.00916.45
7.4.120.0080.01016.47
7.4.110.0000.01616.27
7.4.100.0070.01316.47
7.4.90.0030.01316.44
7.4.80.0120.00619.39
7.4.70.0090.00916.60
7.4.60.0030.01716.61
7.4.50.0080.00016.25
7.4.40.0050.01116.44
7.4.30.0080.00816.44
7.4.00.0140.00414.94
7.3.330.0050.00013.07
7.3.320.0000.00613.10
7.3.310.0000.00616.26
7.3.300.0000.00616.11
7.3.290.0090.00616.30
7.3.280.0080.00916.28
7.3.270.0030.01517.40
7.3.260.0080.00916.73
7.3.250.0120.00616.53
7.3.240.0160.00016.66
7.3.230.0080.00816.61
7.3.210.0090.00916.32
7.3.200.0130.00819.39
7.3.190.0140.00716.31
7.3.180.0110.00516.53
7.3.170.0060.00916.30
7.3.160.0030.01416.27
7.3.120.0030.01314.98
7.2.330.0110.00616.72
7.2.320.0060.01216.73
7.2.310.0090.01316.61
7.2.300.0060.01616.48
7.2.290.0070.01016.63
7.2.60.0030.00617.07
7.2.00.0030.01019.33
7.1.200.0040.01215.59
7.1.100.0060.00618.21
7.1.70.0050.00317.03
7.1.60.0140.01119.70
7.1.50.0130.01317.04
7.1.00.0070.07322.51
7.0.200.0060.00316.82
7.0.140.0070.07022.15
7.0.60.0170.07320.03
7.0.50.0030.08317.90
7.0.40.0070.08720.02
7.0.30.0300.06720.09
7.0.20.0170.04020.04
7.0.10.0100.05020.21
7.0.00.0200.05720.00
5.6.280.0130.06320.76
5.6.210.0100.08020.56
5.6.200.0070.03718.21
5.6.190.0100.03720.68
5.6.180.0370.05020.41
5.6.170.0200.03720.48
5.6.160.0000.04720.44
5.6.150.0030.04018.18
5.6.140.0130.07018.18
5.6.130.0070.05718.20
5.6.120.0070.06320.89
5.6.110.0130.07020.95
5.6.100.0100.07021.12
5.6.90.0070.04021.13
5.6.80.0100.08320.38
5.5.350.0030.06720.43
5.5.340.0070.06718.02
5.5.330.0070.08720.15
5.5.320.0330.07320.30
5.5.310.0300.07720.30
5.5.300.0030.05318.02
5.5.290.0030.04317.92
5.5.280.0200.07320.88
5.5.270.0100.03320.89
5.5.260.0070.04720.67
5.5.250.0100.07720.57
5.5.240.0100.04720.22
5.4.450.0200.04743.75
5.4.440.0130.05037.18
5.4.430.0230.04733.65
5.4.420.0270.05033.63
5.4.410.0430.04333.62
5.4.400.0230.04333.61
5.4.390.0500.03731.27
5.4.380.0230.05018.66
5.4.370.0200.05318.41
5.4.360.0270.05018.66
5.4.350.0270.05018.66
5.4.340.0230.05318.50
5.4.320.0030.03912.46
5.4.310.0060.04112.46
5.4.300.0060.03812.46
5.4.290.0120.03512.45
5.4.280.0100.03312.36
5.4.270.0090.04512.36
5.4.260.0070.03612.35
5.4.250.0050.03812.35
5.4.240.0060.03512.35
5.4.230.0080.03512.35
5.4.220.0070.03512.34
5.4.210.0040.03612.34
5.4.200.0050.03712.35
5.4.190.0060.03512.34
5.4.180.0030.03712.34
5.4.170.0100.03812.36
5.4.160.0060.03512.35
5.4.150.0110.03612.34
5.4.140.0050.03712.03
5.4.130.0070.03312.02
5.4.120.0060.03811.98
5.4.110.0070.03511.97
5.4.100.0060.04011.97
5.4.90.0060.04811.97
5.4.80.0030.04111.97
5.4.70.0040.03511.96
5.4.60.0110.03211.97
5.4.50.0080.03211.96
5.4.40.0090.03811.96
5.4.30.0090.03111.95
5.4.20.0070.03311.95
5.4.10.0070.03211.95
5.4.00.0040.03711.44
5.3.290.0030.04712.80
5.3.280.0060.03812.71
5.3.270.0060.04212.73
5.3.260.0080.03712.72
5.3.250.0060.04112.72
5.3.240.0060.04812.71
5.3.230.0070.04212.71
5.3.220.0050.03812.68
5.3.210.0080.03712.68
5.3.200.0090.03912.68
5.3.190.0070.04212.68
5.3.180.0110.03612.67
5.3.170.0060.03612.66
5.3.160.0090.03512.67
5.3.150.0070.03712.67
5.3.140.0100.03912.66
5.3.130.0100.03612.66
5.3.120.0080.03712.66
5.3.110.0040.04412.66
5.3.100.0110.03512.12
5.3.90.0070.03612.09
5.3.80.0040.03812.07
5.3.70.0100.04312.08
5.3.60.0100.04512.06
5.3.50.0080.03512.00
5.3.40.0060.03812.00
5.3.30.0070.03411.96
5.3.20.0060.03511.73
5.3.10.0110.03011.69
5.3.00.0060.03711.68
5.2.170.0080.0279.18
5.2.160.0050.0299.18
5.2.150.0080.0279.18
5.2.140.0020.0329.18
5.2.130.0060.0299.14
5.2.120.0020.0309.14
5.2.110.0060.0339.15
5.2.100.0050.0299.14
5.2.90.0040.0309.14
5.2.80.0030.0319.14
5.2.70.0030.0339.14
5.2.60.0080.0289.09
5.2.50.0040.0369.06
5.2.40.0050.0299.04
5.2.30.0040.0339.02
5.2.20.0070.0349.00
5.2.10.0050.0288.93
5.2.00.0060.0288.79
5.1.60.0040.0248.07
5.1.50.0100.0278.07
5.1.40.0050.0288.05
5.1.30.0050.0268.40
5.1.20.0040.0308.42
5.1.10.0110.0258.14
5.1.00.0040.0258.15
5.0.50.0010.0266.63
5.0.40.0030.0216.49
5.0.30.0040.0376.30
5.0.20.0020.0206.27
5.0.10.0020.0226.25
5.0.00.0040.0306.25
4.4.90.0030.0174.78
4.4.80.0040.0144.75
4.4.70.0030.0204.76
4.4.60.0010.0174.76
4.4.50.0030.0154.77
4.4.40.0030.0254.71
4.4.30.0040.0144.76
4.4.20.0010.0174.84
4.4.10.0010.0174.85
4.4.00.0050.0224.76
4.3.110.0010.0174.66
4.3.100.0020.0254.66
4.3.90.0030.0204.64
4.3.80.0050.0284.59
4.3.70.0010.0154.63
4.3.60.0040.0174.63
4.3.50.0020.0174.62
4.3.40.0020.0254.54
4.3.30.0000.0223.29
4.3.20.0010.0203.27
4.3.10.0030.0173.22
4.3.00.0070.01331.27

preferences:
41.68 ms | 401 KiB | 5 Q