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\n$city"; } else { print "nay\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.0100.01018.43
8.3.50.0070.00922.03
8.3.40.0090.00618.71
8.3.30.0050.00919.10
8.3.20.0000.00820.30
8.3.10.0040.00423.54
8.3.00.0030.00819.14
8.2.180.0130.00616.38
8.2.170.0070.00722.96
8.2.160.0070.00720.39
8.2.150.0040.00424.18
8.2.140.0070.00024.66
8.2.130.0030.00626.16
8.2.120.0000.00919.35
8.2.110.0040.00420.94
8.2.100.0090.00317.91
8.2.90.0040.00418.34
8.2.80.0040.00417.97
8.2.70.0050.00317.63
8.2.60.0090.00017.93
8.2.50.0030.00618.07
8.2.40.0000.00918.22
8.2.30.0030.00318.26
8.2.20.0050.00217.58
8.2.10.0040.00418.14
8.2.00.0000.00819.42
8.1.280.0090.00625.92
8.1.270.0040.00423.79
8.1.260.0000.00726.35
8.1.250.0050.00328.09
8.1.240.0040.00422.24
8.1.230.0070.00320.72
8.1.220.0000.00917.74
8.1.210.0030.00618.91
8.1.200.0030.00617.35
8.1.190.0090.00017.25
8.1.180.0000.00818.10
8.1.170.0040.00418.50
8.1.160.0040.00421.96
8.1.150.0050.00218.62
8.1.140.0000.00717.52
8.1.130.0000.00717.93
8.1.120.0000.00817.52
8.1.110.0070.00017.33
8.1.100.0040.00417.46
8.1.90.0030.00317.36
8.1.80.0000.00717.52
8.1.70.0030.00317.40
8.1.60.0000.00817.59
8.1.50.0050.00317.59
8.1.40.0050.00317.51
8.1.30.0030.00617.69
8.1.20.0040.00417.62
8.1.10.0040.00417.48
8.1.00.0030.00617.45
8.0.300.0040.00420.16
8.0.290.0080.00016.63
8.0.280.0040.00418.38
8.0.270.0030.00317.13
8.0.260.0030.00317.14
8.0.250.0040.00416.88
8.0.240.0040.00416.85
8.0.230.0000.00716.96
8.0.220.0070.00016.90
8.0.210.0000.00716.85
8.0.200.0030.00316.88
8.0.190.0000.00717.00
8.0.180.0070.00016.83
8.0.170.0050.00316.83
8.0.160.0000.00716.95
8.0.150.0070.00416.83
8.0.140.0070.00316.75
8.0.130.0060.00313.29
8.0.120.0050.00316.92
8.0.110.0040.00416.95
8.0.100.0030.00416.79
8.0.90.0000.00716.95
8.0.80.0120.00616.85
8.0.70.0070.00016.98
8.0.60.0000.00716.93
8.0.50.0000.00716.72
8.0.30.0070.01317.15
8.0.20.0100.01017.40
8.0.10.0050.00317.02
8.0.00.0100.00716.81
7.4.330.0030.00315.03
7.4.320.0030.00516.52
7.4.300.0030.00316.52
7.4.290.0030.00316.36
7.4.280.0040.00416.59
7.4.270.0000.00816.37
7.4.260.0050.00316.63
7.4.250.0000.00816.46
7.4.240.0020.00616.52
7.4.230.0030.00316.32
7.4.220.0070.01016.71
7.4.210.0090.01016.55
7.4.200.0050.00316.68
7.4.160.0130.00416.24
7.4.150.0160.00317.40
7.4.140.0060.01217.86
7.4.130.0050.01116.57
7.4.120.0100.01016.51
7.4.110.0070.01016.54
7.4.100.0150.01816.38
7.4.90.0090.00616.53
7.4.80.0140.00719.39
7.4.70.0100.01016.43
7.4.60.0170.00616.54
7.4.50.0060.00316.47
7.4.40.0140.00316.51
7.4.30.0090.00616.23
7.4.10.0060.01215.00
7.4.00.0090.00915.07
7.3.330.0050.00013.21
7.3.320.0000.00513.23
7.3.310.0030.00316.25
7.3.300.0000.00616.37
7.3.290.0140.00016.37
7.3.280.0090.01116.34
7.3.270.0120.00417.40
7.3.260.0130.01316.25
7.3.250.0090.01216.57
7.3.240.0120.00616.32
7.3.230.0110.00616.59
7.3.210.0080.00916.27
7.3.200.0060.01119.39
7.3.190.0080.01416.36
7.3.180.0100.00716.43
7.3.170.0080.00816.36
7.3.160.0120.00316.36
7.3.130.0130.00615.11
7.3.120.0090.00714.90
7.3.110.0130.00614.82
7.3.100.0030.01314.77
7.3.90.0090.00614.85
7.3.80.0030.00914.97
7.3.70.0160.00015.03
7.3.60.0030.01114.75
7.3.50.0000.01014.86
7.3.40.0060.00614.94
7.3.30.0090.00314.81
7.3.20.0030.01216.58
7.3.10.0080.00516.59
7.3.00.0070.00616.68
7.2.330.0100.00616.52
7.2.320.0090.00916.61
7.2.310.0030.01716.77
7.2.300.0150.00916.69
7.2.290.0060.01516.77
7.2.260.0100.00715.00
7.2.250.0070.01115.30
7.2.240.0070.00715.22
7.2.230.0050.00514.79
7.2.220.0030.01315.04
7.2.210.0040.00415.26
7.2.200.0050.00515.01
7.2.190.0080.00014.77
7.2.180.0090.00615.03
7.2.170.0030.00715.16
7.2.160.0060.01214.94
7.2.150.0070.00716.98
7.2.140.0030.01017.02
7.2.130.0050.00716.69
7.2.120.0060.00516.90
7.2.110.0090.00616.78
7.2.100.0080.00717.01
7.2.90.0100.00916.93
7.2.80.0080.01216.99
7.2.70.0110.00816.98
7.2.60.0070.01416.80
7.2.50.0090.01216.88
7.2.40.0080.01017.02
7.2.30.0060.01016.92
7.2.20.0070.00716.94
7.2.10.0060.01117.03
7.2.00.0020.00917.67
7.1.330.0060.00915.85
7.1.320.0110.00315.88
7.1.310.0040.00815.79
7.1.300.0040.00715.92
7.1.290.0040.00715.85
7.1.280.0000.01015.73
7.1.270.0070.01015.52
7.1.260.0000.01415.94
7.1.250.0080.00615.85
7.1.240.0100.00315.86
7.1.230.0030.00715.86
7.1.220.0070.00715.86
7.1.210.0140.00015.84
7.1.200.0070.00715.86
7.1.190.0060.00915.76
7.1.180.0040.01115.78
7.1.170.0100.00615.58
7.1.160.0030.01015.79
7.1.150.0110.00415.75
7.1.140.0060.00915.45
7.1.130.0070.00316.00
7.1.120.0060.00615.68
7.1.110.0100.00315.92
7.1.100.0070.00516.77
7.1.90.0100.00315.71
7.1.80.0030.00615.95
7.1.70.0040.00716.51
7.1.60.0100.00917.82
7.1.50.0090.00916.45
7.1.40.0040.01115.68
7.1.30.0030.01315.48
7.1.20.0040.01115.61
7.1.10.0060.00615.55
7.1.00.0050.04119.04
7.0.330.0060.00615.36
7.0.320.0030.00615.44
7.0.310.0000.01215.07
7.0.300.0070.00715.00
7.0.290.0060.00615.34
7.0.280.0060.00615.57
7.0.270.0030.00615.29
7.0.260.0040.01115.64
7.0.250.0120.00315.22
7.0.240.0070.00715.39
7.0.230.0090.00615.38
7.0.220.0090.00015.58
7.0.210.0090.00315.38
7.0.200.0120.00316.16
7.0.190.0030.00715.40
7.0.180.0030.01015.33
7.0.170.0000.01715.25
7.0.160.0090.00615.44
7.0.150.0030.00615.16
7.0.140.0050.03818.75
7.0.130.0060.00915.61
7.0.120.0110.00415.22
7.0.110.0120.00315.27
7.0.100.0110.00015.46
7.0.90.0000.01015.52
7.0.80.0080.00315.46
7.0.70.0090.00915.49
7.0.60.0090.04517.67
7.0.50.0100.03016.71
7.0.40.0050.03116.68
7.0.30.0300.03716.78
7.0.20.0180.04016.83
7.0.10.0100.03416.72
7.0.00.0050.04816.78
5.6.400.0060.01014.10
5.6.390.0070.00314.24
5.6.380.0080.00814.01
5.6.370.0070.00714.35
5.6.360.0120.00613.99
5.6.350.0070.00714.12
5.6.340.0080.00814.02
5.6.330.0040.01114.31
5.6.320.0040.01114.02
5.6.310.0100.00714.14
5.6.300.0070.00714.34
5.6.290.0000.01414.32
5.6.280.0040.04117.69
5.6.270.0030.01314.43
5.6.260.0060.00614.56
5.6.250.0080.00414.18
5.6.240.0000.00914.63
5.6.230.0080.00614.13
5.6.220.0090.00614.47
5.6.210.0050.04417.51
5.6.200.0010.03616.25
5.6.190.0070.04217.19
5.6.180.0200.02317.48
5.6.170.0230.04317.38
5.6.160.0080.03317.43
5.6.150.0070.02216.14
5.6.140.0060.04116.23
5.6.130.0080.04316.20
5.6.120.0030.03017.56
5.6.110.0070.04517.61
5.6.100.0160.02917.73
5.6.90.0040.02617.71
5.6.80.0100.02117.35
5.6.70.0060.00914.07
5.6.60.0030.01014.39
5.6.50.0070.01014.38
5.6.40.0000.01514.33
5.6.30.0040.01114.14
5.6.20.0030.00614.41
5.6.10.0030.01113.96
5.6.00.0030.00714.09
5.5.380.0090.00313.92
5.5.370.0000.01814.23
5.5.360.0000.01614.00
5.5.350.2080.02617.32
5.5.340.0100.03016.12
5.5.330.0030.02717.03
5.5.320.0120.02717.23
5.5.310.0140.02617.36
5.5.300.0070.02216.08
5.5.290.0050.03316.19
5.5.280.0100.04117.63
5.5.270.0090.02617.41
5.5.260.0070.04717.55
5.5.250.0060.04317.45
5.5.240.0130.03617.17
5.5.230.0090.00314.22
5.5.220.0060.00914.33
5.5.210.0100.00714.47
5.5.200.0060.00614.30
5.5.190.0000.01614.06
5.5.180.0030.01014.21
5.5.170.0060.00314.23
5.5.160.0030.00914.39
5.5.150.0030.00914.19
5.5.140.0060.00914.01
5.5.130.0040.01214.20
5.5.120.0030.01314.01
5.5.110.0070.01014.38
5.5.100.0080.00314.24
5.5.90.0000.01414.18
5.5.80.0040.01113.99
5.5.70.0040.01114.04
5.5.60.0070.01014.07
5.5.50.0100.00614.35
5.5.40.0030.00914.05
5.5.30.0100.00614.01
5.5.20.0000.01313.88
5.5.10.0060.00613.96
5.5.00.0030.00913.95
5.4.450.0280.02228.36
5.4.440.0110.02628.34
5.4.430.0120.02528.31
5.4.420.0370.02028.30
5.4.410.0070.03028.30
5.4.400.0180.02528.30
5.4.390.0150.02428.30
5.4.380.0200.02715.67
5.4.370.0080.02815.77
5.4.360.0110.02815.75
5.4.350.0170.02715.70
5.4.340.0080.03315.73
5.4.330.0080.00312.82
5.4.320.0060.02112.64
5.4.310.0070.02412.64
5.4.300.0090.02012.64
5.4.290.0050.02612.64
5.4.280.0080.02812.59
5.4.270.0060.01912.59
5.4.260.0060.02312.59
5.4.250.0050.02212.59
5.4.240.0060.02212.59
5.4.230.0040.02112.58
5.4.220.0070.02012.58
5.4.210.0060.01812.59
5.4.200.0050.02812.58
5.4.190.0040.02412.58
5.4.180.0050.02712.58
5.4.170.0050.02312.59
5.4.160.0050.02212.59
5.4.150.0050.02212.58
5.4.140.0040.02312.43
5.4.130.0100.01912.42
5.4.120.0090.02012.40
5.4.110.0030.02112.40
5.4.100.0060.02212.40
5.4.90.0040.02312.40
5.4.80.0070.02412.40
5.4.70.0030.03112.40
5.4.60.0070.02312.39
5.4.50.0060.02312.40
5.4.40.0050.02212.39
5.4.30.0060.02212.39
5.4.20.0070.02212.39
5.4.10.0050.02012.39
5.4.00.0040.02112.14
5.3.290.0060.02512.81
5.3.280.0060.02412.77
5.3.270.0040.02612.77
5.3.260.0030.02712.77
5.3.250.0020.02512.77
5.3.240.0050.02312.77
5.3.230.0070.02612.77
5.3.220.0030.02512.75
5.3.210.0040.03012.75
5.3.200.0080.02012.75
5.3.190.0070.02212.75
5.3.180.0050.02112.75
5.3.170.0040.02312.75
5.3.160.0040.02312.75
5.3.150.0040.02512.75
5.3.140.0070.02112.74
5.3.130.0040.02112.74
5.3.120.0040.02712.74
5.3.110.0080.02112.74
5.3.100.0050.01912.47
5.3.90.0090.01812.45
5.3.80.0040.02312.45
5.3.70.0060.02312.45
5.3.60.0040.02412.44
5.3.50.0070.02512.41
5.3.40.0080.02112.41
5.3.30.0080.02012.39
5.3.20.0050.01912.28
5.3.10.0050.02012.26
5.3.00.0040.02212.25
5.2.170.0020.0329.19
5.2.160.0030.0389.19
5.2.150.0050.0319.18
5.2.140.0070.0309.18
5.2.130.0050.0289.14
5.2.120.0070.0259.14
5.2.110.0090.0249.15
5.2.100.0060.0269.15
5.2.90.0040.0309.14
5.2.80.0060.0329.14
5.2.70.0050.0379.14
5.2.60.0030.0339.09
5.2.50.0040.0309.06
5.2.40.0020.0319.03
5.2.30.0030.0309.02
5.2.20.0030.0309.00
5.2.10.0040.0298.93
5.2.00.0040.0298.79
5.1.60.0060.0228.07
5.1.50.0030.0268.07
5.1.40.0020.0268.05
5.1.30.0050.0288.40
5.1.20.0030.0278.43
5.1.10.0060.0268.15
5.1.00.0050.0248.15
5.0.50.0030.0206.63
5.0.40.0040.0196.49
5.0.30.0050.0326.30
5.0.20.0030.0206.27
5.0.10.0010.0226.25
5.0.00.0030.0376.24
4.4.90.0020.0184.78
4.4.80.0020.0154.76
4.4.70.0030.0154.75
4.4.60.0030.0224.75
4.4.50.0050.0184.77
4.4.40.0020.0264.71
4.4.30.0070.0194.76
4.4.20.0020.0204.85
4.4.10.0040.0184.85
4.4.00.0010.0324.76
4.3.110.0040.0144.67
4.3.100.0060.0124.67
4.3.90.0040.0154.64
4.3.80.0030.0274.59
4.3.70.0040.0134.63
4.3.60.0030.0214.63
4.3.50.0030.0224.63
4.3.40.0010.0364.53
4.3.30.0010.0193.29
4.3.20.0020.0153.27
4.3.10.0030.0193.23
4.3.00.0130.01743.77

preferences:
49.43 ms | 401 KiB | 5 Q