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 "yay\ncity"; } else { //print "nay"; } } ?>

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.40.0060.01018.73
8.3.30.0100.00318.95
8.3.20.0070.00020.32
8.3.10.0030.00523.52
8.3.00.0070.00420.77
8.2.170.0100.00722.96
8.2.160.0130.00020.38
8.2.150.0050.00224.18
8.2.140.0000.00824.66
8.2.130.0000.00726.16
8.2.120.0000.00819.36
8.2.110.0100.00021.05
8.2.100.0000.01217.72
8.2.90.0050.00319.21
8.2.80.0040.00417.97
8.2.70.0060.00317.63
8.2.60.0030.00617.80
8.2.50.0000.00818.07
8.2.40.0090.00017.88
8.2.30.0000.00818.30
8.2.20.0070.00017.72
8.2.10.0000.00718.00
8.2.00.0000.00919.54
8.1.270.0040.00423.96
8.1.260.0000.00726.35
8.1.250.0040.00428.09
8.1.240.0050.00322.14
8.1.230.0080.00318.88
8.1.220.0000.00817.76
8.1.210.0080.00018.77
8.1.200.0030.00617.13
8.1.190.0050.00317.36
8.1.180.0040.00418.10
8.1.170.0080.00018.50
8.1.160.0040.00422.01
8.1.150.0070.00018.62
8.1.140.0000.00817.46
8.1.130.0030.00317.78
8.1.120.0030.00317.43
8.1.110.0000.00817.30
8.1.100.0000.00817.34
8.1.90.0030.00317.38
8.1.80.0000.00817.45
8.1.70.0030.00317.34
8.1.60.0080.00017.55
8.1.50.0050.00317.61
8.1.40.0030.00617.55
8.1.30.0000.00817.61
8.1.20.0040.00417.50
8.1.10.0050.00317.51
8.1.00.0080.00017.33
8.0.300.0030.00320.13
8.0.290.0000.00816.75
8.0.280.0000.00818.51
8.0.270.0000.00717.22
8.0.260.0030.00317.26
8.0.250.0000.00716.86
8.0.240.0030.00316.96
8.0.230.0000.00716.96
8.0.220.0030.00316.87
8.0.210.0030.00316.95
8.0.200.0040.00416.95
8.0.190.0000.00816.94
8.0.180.0020.00516.82
8.0.170.0030.00616.92
8.0.160.0000.00716.79
8.0.150.0000.00816.82
8.0.140.0080.00616.84
8.0.130.0040.00413.28
8.0.120.0040.00416.89
8.0.110.0000.00716.80
8.0.100.0000.00816.93
8.0.90.0040.00416.79
8.0.80.0120.00316.86
8.0.70.0020.00516.74
8.0.60.0080.00016.74
8.0.50.0040.00416.67
8.0.30.0140.00516.89
8.0.20.0080.01117.40
8.0.10.0020.00516.92
8.0.00.0090.00816.77
7.4.330.0060.00015.10
7.4.320.0030.00316.61
7.4.300.0030.00316.61
7.4.290.0000.00716.43
7.4.280.0000.00916.49
7.4.270.0030.00316.44
7.4.260.0030.00316.55
7.4.250.0080.00016.51
7.4.240.0030.00316.52
7.4.230.0070.00016.70
7.4.220.0090.00916.71
7.4.210.0070.00716.54
7.4.200.0080.00016.58
7.4.160.0080.00816.57
7.4.150.0080.00917.40
7.4.140.0080.00817.86
7.4.130.0070.01016.49
7.4.120.0090.00816.54
7.4.110.0060.01016.55
7.4.100.0060.01116.34
7.4.90.0040.01116.45
7.4.80.0090.01519.39
7.4.70.0100.01416.50
7.4.60.0070.01016.60
7.4.50.0000.00916.63
7.4.40.0100.00716.30
7.4.30.0090.00616.49
7.4.10.0080.00414.80
7.4.00.0020.01515.07
7.3.330.0000.00513.00
7.3.320.0030.00312.98
7.3.310.0040.00416.12
7.3.300.0020.00516.13
7.3.290.0040.01116.21
7.3.280.0070.01216.30
7.3.270.0140.00417.40
7.3.260.0130.01016.69
7.3.250.0140.00716.22
7.3.240.0070.01116.25
7.3.230.0110.00516.59
7.3.210.0080.00816.44
7.3.200.0120.00619.39
7.3.190.0100.00716.53
7.3.180.0040.01116.43
7.3.170.0070.01016.29
7.3.160.0060.00916.55
7.3.130.0060.01315.02
7.3.120.0030.01314.63
7.3.110.0030.01714.68
7.3.100.0080.00314.82
7.3.90.0120.00314.98
7.3.80.0030.01314.93
7.3.70.0110.00614.54
7.3.60.0100.00714.71
7.3.50.0100.00614.93
7.3.40.0040.00714.48
7.3.30.0060.01314.72
7.3.20.0030.00616.64
7.3.10.0120.00316.71
7.3.00.0030.01216.35
7.2.330.0130.00316.78
7.2.320.0030.01416.68
7.2.310.0090.00616.70
7.2.300.0090.01216.49
7.2.290.0130.00816.77
7.2.260.0120.00615.13
7.2.250.0070.01115.26
7.2.240.0070.01314.96
7.2.230.0070.00715.04
7.2.220.0060.00915.23
7.2.210.0000.01115.02
7.2.200.0060.00915.22
7.2.190.0040.01114.98
7.2.180.0030.01315.03
7.2.170.0080.00815.14
7.2.160.0080.00414.98
7.2.150.0080.00616.80
7.2.140.0070.00316.85
7.2.130.0070.01016.99
7.2.120.0030.00816.89
7.2.110.0060.00616.82
7.2.100.0100.00017.00
7.2.90.0110.00417.03
7.2.80.0100.00317.05
7.2.70.0030.01016.84
7.2.60.0080.00817.08
7.2.50.0130.00317.02
7.2.40.0100.00717.14
7.2.30.0090.00616.75
7.2.20.0030.01016.99
7.2.10.0000.01317.11
7.2.00.0020.01318.04
7.1.330.0000.01515.82
7.1.320.0120.00315.46
7.1.310.0060.01115.77
7.1.300.0140.00015.66
7.1.290.0060.01315.70
7.1.280.0080.00615.74
7.1.270.0030.01015.80
7.1.260.0090.00315.84
7.1.250.0030.01015.98
7.1.240.0000.01115.73
7.1.230.0030.01015.68
7.1.220.0000.00815.73
7.1.210.0040.00715.89
7.1.200.0030.01315.77
7.1.190.0060.00915.92
7.1.180.0060.01215.75
7.1.170.0030.01015.89
7.1.160.0070.00715.74
7.1.150.0090.00016.00
7.1.140.0030.01315.88
7.1.130.0030.01215.83
7.1.120.0030.00615.76
7.1.110.0070.00715.92
7.1.100.0060.00716.97
7.1.90.0040.01115.96
7.1.80.0000.01515.89
7.1.70.0020.00916.25
7.1.60.0090.00917.83
7.1.50.0120.00516.36
7.1.40.0100.00715.70
7.1.30.0030.00615.75
7.1.20.0060.00915.80
7.1.10.0040.01115.67
7.1.00.0110.03519.13
7.0.330.0000.01115.37
7.0.320.0000.00915.47
7.0.310.0030.00915.15
7.0.300.0070.00715.29
7.0.290.0110.00415.63
7.0.280.0000.00815.12
7.0.270.0110.00415.37
7.0.260.0030.01015.42
7.0.250.0030.01015.38
7.0.240.0040.01115.49
7.0.230.0070.00715.40
7.0.220.0120.00315.53
7.0.210.0070.00715.41
7.0.200.0050.00616.20
7.0.190.0030.01215.20
7.0.180.0060.01015.46
7.0.170.0090.00015.44
7.0.160.0070.00715.46
7.0.150.0040.00715.45
7.0.140.0030.03818.61
7.0.130.0090.00615.33
7.0.120.0060.00315.65
7.0.110.0030.00615.48
7.0.100.0040.01115.46
7.0.90.0090.00315.49
7.0.80.0070.00715.39
7.0.70.0000.01715.37
7.0.60.0050.03217.64
7.0.50.0070.03816.50
7.0.40.0020.05216.81
7.0.30.0190.03416.80
7.0.20.0110.03116.83
7.0.10.0010.02616.87
7.0.00.0050.04716.77
5.6.400.0150.00014.17
5.6.390.0090.00014.29
5.6.380.0000.00914.19
5.6.370.0090.00314.48
5.6.360.0110.00314.28
5.6.350.0090.00614.36
5.6.340.0090.00314.64
5.6.330.0110.00414.34
5.6.320.0040.00714.57
5.6.310.0070.00414.05
5.6.300.0040.00414.52
5.6.290.0040.00814.28
5.6.280.0050.04217.71
5.6.270.0030.01014.35
5.6.260.0060.00614.57
5.6.250.0070.00414.16
5.6.240.0060.00614.30
5.6.230.0070.00714.48
5.6.220.0040.00714.61
5.6.210.0050.03517.45
5.6.200.0070.02216.30
5.6.190.0020.03717.20
5.6.180.1220.02517.37
5.6.170.0180.04117.34
5.6.160.0030.02717.33
5.6.150.0020.02716.22
5.6.140.0050.04716.15
5.6.130.0030.02516.12
5.6.120.0070.04617.56
5.6.110.0030.02617.54
5.6.100.0030.03717.60
5.6.90.0060.02317.65
5.6.80.0070.03317.44
5.6.70.2130.02517.30
5.6.60.0040.00914.50
5.6.50.0070.00714.26
5.6.40.0090.00014.52
5.6.30.0040.00814.10
5.6.20.0030.00914.13
5.6.10.0000.01114.27
5.6.00.0000.01114.32
5.5.380.0050.00314.35
5.5.370.0070.01014.05
5.5.360.0060.00613.90
5.5.350.0100.03817.28
5.5.340.0090.04416.08
5.5.330.0080.04517.26
5.5.320.0170.03817.42
5.5.310.0170.02317.17
5.5.300.0050.03915.99
5.5.290.0090.02916.13
5.5.280.0050.03317.48
5.5.270.0070.04517.60
5.5.260.0090.04517.60
5.5.250.0050.04417.35
5.5.240.0180.03817.23
5.5.230.0130.00314.25
5.5.220.0070.00313.92
5.5.210.0030.01313.91
5.5.200.0040.00714.25
5.5.190.0110.00014.10
5.5.180.0100.00314.04
5.5.170.0110.00414.04
5.5.160.0000.01714.32
5.5.150.0030.01214.24
5.5.140.0060.00913.98
5.5.130.0000.01114.24
5.5.120.0030.00713.77
5.5.110.0040.00714.40
5.5.100.0050.00514.33
5.5.90.0090.00614.17
5.5.80.0040.00814.22
5.5.70.0070.00314.16
5.5.60.0060.00614.23
5.5.50.0060.00614.17
5.5.40.0000.01313.84
5.5.30.0070.00313.98
5.5.20.0080.00314.11
5.5.10.0080.00414.00
5.5.00.0060.00613.82
5.4.450.0080.02615.27
5.4.440.0130.02315.29
5.4.430.0100.02215.20
5.4.420.0160.02115.02
5.4.410.0150.02015.25
5.4.400.0130.03015.00
5.4.390.0200.03314.96
5.4.380.0150.03315.04
5.4.370.0160.03014.98
5.4.360.0170.03614.84
5.4.350.0180.02115.00
5.4.340.0180.01814.89
5.4.330.0040.00810.93
5.4.320.0190.02015.01
5.4.310.0160.03614.82
5.4.300.0170.02415.04
5.4.290.0170.02414.89
5.4.280.0150.03814.79
5.4.270.0150.03015.18
5.4.260.0180.02814.99
5.4.250.0150.03415.00
5.4.240.0180.03315.01
5.4.230.0150.02815.04
5.4.220.0150.02714.88
5.4.210.0120.04415.05
5.4.200.0160.03314.77
5.4.190.0170.02714.88
5.4.180.0150.02314.93
5.4.170.0170.03314.90
5.4.160.0200.02514.80
5.4.150.0170.03814.90
5.4.140.0130.03313.68
5.4.130.0180.03213.73
5.4.120.0150.03713.42
5.4.110.0140.03213.60
5.4.100.0210.03813.67
5.4.90.0130.04013.58
5.4.80.0150.03813.70
5.4.70.0170.02313.61
5.4.60.0150.02813.69
5.4.50.0150.02813.71
5.4.40.0180.03513.62
5.4.30.0130.03513.57
5.4.20.0170.03513.69
5.4.10.0200.03213.70
5.4.00.0160.04013.28
5.3.290.0250.02412.58
5.3.280.0180.03912.50
5.3.270.0150.03012.62
5.3.260.0130.02712.65
5.3.250.0150.04112.49
5.3.240.0180.02512.46
5.3.230.0200.03712.44
5.3.220.0220.03312.47
5.3.210.0150.02312.48
5.3.200.0150.02212.41
5.3.190.0150.02712.53
5.3.180.0190.03412.57
5.3.170.0160.02612.41
5.3.160.0210.03112.46
5.3.150.0190.03012.51
5.3.140.0220.03512.40
5.3.130.0130.03612.43
5.3.120.0150.03712.45
5.3.110.0130.04212.56
5.3.100.0150.02512.16
5.3.90.0180.02112.26
5.3.80.0150.02712.26
5.3.70.0180.02112.17
5.3.60.0160.03812.15
5.3.50.0120.04012.15
5.3.40.0180.03612.09
5.3.30.0180.03312.15
5.3.20.0150.02512.04
5.3.10.0170.02312.05
5.3.00.0130.02012.05
5.2.170.0300.05713.04
5.2.160.0270.03313.04
5.2.150.0270.03313.04
5.2.140.0200.04013.04
5.2.130.0270.05313.04
5.2.120.0300.03013.04
5.2.110.0230.04313.04
5.2.100.0230.05713.04
5.2.90.0230.03313.04
5.2.80.0330.04713.04
5.2.70.0230.04313.04
5.2.60.0270.05313.04
5.2.50.0230.06013.04
5.2.40.0200.06013.04
5.2.30.0170.05313.04
5.2.20.0230.05313.04
5.2.10.0170.04713.04
5.2.00.0230.05013.04
5.1.60.0200.03713.04
5.1.50.0230.03013.04
5.1.40.0300.03313.04
5.1.30.0200.03713.04
5.1.20.0300.04013.04
5.1.10.0170.05013.04
5.1.00.0200.05313.04
5.0.50.0100.04313.04
5.0.40.0130.04313.04
5.0.30.0130.06013.04
5.0.20.0130.04013.04
5.0.10.0100.04313.04
5.0.00.0130.06013.04
4.4.90.0130.03013.04
4.4.80.0100.01713.04
4.4.70.0100.02713.04
4.4.60.0100.01713.04
4.4.50.0100.02713.04
4.4.40.0100.05013.04
4.4.30.0170.02713.04
4.4.20.0070.03713.04
4.4.10.0100.02713.04
4.4.00.0100.03713.04
4.3.110.0130.02713.04
4.3.100.0100.01713.04
4.3.90.0070.02313.04
4.3.80.0170.03313.04
4.3.70.0170.02713.04
4.3.60.0130.02013.04
4.3.50.0130.03313.04
4.3.40.0200.04013.04
4.3.30.0070.03713.04
4.3.20.0030.03013.04
4.3.10.0070.03313.04
4.3.00.0030.03313.04

preferences:
43.54 ms | 400 KiB | 5 Q