3v4l.org

run code in 300+ PHP versions simultaneously
<?php $pos = strrpos($mystring, "b"); if ($pos === false) { // note: three equal signs echo "not found..."; } $pos = strrpos($mystring, "b"); if ($pos === false) { // note: three equal signs echo "not found..."; } $foo = "0123456789a123456789b123456789c"; var_dump(strrpos($foo, '7', -5)); // Starts looking backwards five positions // from the end. Result: int(17) var_dump(strrpos($foo, '7', 20)); // Starts searching 20 positions into the // string. Result: int(27) var_dump(strrpos($foo, '7', 28)); // Result: bool(false)

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.0140.00718.27
8.3.50.0070.01221.21
8.3.40.0120.00318.67
8.3.30.0130.00020.33
8.3.20.0080.00018.77
8.3.10.0040.00421.09
8.3.00.0050.00322.51
8.2.180.0180.00418.29
8.2.170.0160.00622.96
8.2.160.0070.01020.35
8.2.150.0030.00624.18
8.2.140.0070.00324.66
8.2.130.0040.00426.16
8.2.120.0070.00020.87
8.2.110.0100.00022.08
8.2.100.0060.00617.83
8.2.90.0000.00818.99
8.2.80.0040.00418.03
8.2.70.0050.00317.50
8.2.60.0000.00817.80
8.2.50.0030.00618.07
8.2.40.0060.00318.07
8.2.30.0000.00719.35
8.2.20.0030.00517.58
8.2.10.0060.00317.76
8.2.00.0050.00217.74
8.1.280.0130.00725.92
8.1.270.0040.00423.99
8.1.260.0000.00726.35
8.1.250.0000.00728.09
8.1.240.0110.00420.72
8.1.230.0120.00021.05
8.1.220.0050.00318.77
8.1.210.0040.00418.93
8.1.200.0000.01017.10
8.1.190.0060.00317.40
8.1.180.0080.00018.10
8.1.170.0040.00418.57
8.1.160.0000.00818.77
8.1.150.0070.00018.61
8.1.140.0060.00317.43
8.1.130.0000.00717.81
8.1.120.0040.00417.39
8.1.110.0000.00817.36
8.1.100.0000.00717.45
8.1.90.0040.00417.32
8.1.80.0000.00717.49
8.1.70.0040.00417.38
8.1.60.0000.00817.56
8.1.50.0050.00217.46
8.1.40.0040.00417.52
8.1.30.0000.00717.63
8.1.20.0080.00017.52
8.1.10.0030.00617.57
8.1.00.0030.00617.51
8.0.300.0040.00420.07
8.0.290.0030.00617.16
8.0.280.0000.00718.47
8.0.270.0000.00717.33
8.0.260.0000.00616.82
8.0.250.0000.00717.03
8.0.240.0000.00816.85
8.0.230.0070.00016.89
8.0.220.0080.00016.83
8.0.210.0030.00316.91
8.0.200.0050.00317.01
8.0.190.0080.00016.96
8.0.180.0000.00716.85
8.0.170.0000.00716.95
8.0.160.0040.00416.82
8.0.150.0040.00416.91
8.0.140.0030.00416.91
8.0.130.0030.00313.31
8.0.120.0040.00416.93
8.0.110.0040.00416.99
8.0.100.0040.00416.98
8.0.90.0030.00316.75
8.0.80.0040.01216.93
8.0.70.0000.00716.72
8.0.60.0000.00816.91
8.0.50.0070.00016.96
8.0.30.0140.00917.12
8.0.20.0110.01217.40
8.0.10.0080.00017.11
8.0.00.0120.00816.77
7.4.330.0000.00616.69
7.4.320.0000.00616.54
7.4.300.0030.00316.54
7.4.290.0040.00416.43
7.4.280.0040.00416.62
7.4.270.0040.00416.50
7.4.260.0030.00313.29
7.4.250.0000.00716.60
7.4.240.0050.00216.54
7.4.230.0030.00316.45
7.4.220.0070.02016.56
7.4.210.0090.00816.61
7.4.200.0030.00316.39
7.4.190.0000.00716.77
7.4.160.0090.00616.53
7.4.150.0110.01217.40
7.4.140.0070.01517.86
7.4.130.0080.01116.56
7.4.120.0110.00616.59
7.4.110.0070.01116.54
7.4.100.0120.00916.37
7.4.90.0100.01316.61
7.4.80.0110.00719.39
7.4.70.0070.00716.46
7.4.60.0120.00416.57
7.4.50.0000.00516.41
7.4.40.0000.01122.77
7.4.30.0060.01216.55
7.4.00.0060.00615.21
7.3.330.0000.00513.14
7.3.320.0060.00013.07
7.3.310.0000.00716.15
7.3.300.0000.00716.29
7.3.290.0150.00016.25
7.3.280.0080.00816.28
7.3.270.0100.00717.40
7.3.260.0130.01018.24
7.3.250.0040.01516.62
7.3.240.0000.02116.50
7.3.230.0070.01116.53
7.3.210.0110.00716.47
7.3.200.0070.01119.39
7.3.190.0070.01016.25
7.3.180.0040.01116.34
7.3.170.0070.01016.48
7.3.160.0060.01016.41
7.3.120.0100.00314.92
7.3.110.0060.00914.74
7.3.100.0060.00915.09
7.3.90.0030.01414.52
7.3.80.0060.00914.71
7.3.70.0100.00714.71
7.3.60.0090.00614.78
7.3.50.0030.01214.68
7.3.40.0090.00614.89
7.3.30.0160.00014.89
7.3.20.0110.00416.62
7.3.10.0130.00316.66
7.3.00.0070.00616.68
7.2.330.0060.01616.43
7.2.320.0120.00616.30
7.2.310.0120.01216.56
7.2.300.0060.00916.25
7.2.290.0030.01316.75
7.2.240.0040.00815.08
7.2.230.0100.00314.98
7.2.220.0030.01414.89
7.2.210.0060.01014.98
7.2.200.0100.00715.05
7.2.190.0060.00915.09
7.2.180.0030.00914.74
7.2.170.0040.01414.90
7.2.160.0080.00414.76
7.2.150.0030.00916.68
7.2.140.0090.00617.08
7.2.130.0090.00616.75
7.2.120.0070.00716.83
7.2.110.0110.00716.79
7.2.100.0070.01016.94
7.2.90.0040.00816.73
7.2.80.0120.00616.85
7.2.70.0000.01216.76
7.2.60.0060.00916.90
7.2.50.0090.00916.96
7.2.40.0070.00716.77
7.2.30.0030.01016.95
7.2.20.0040.01416.86
7.2.10.0060.01216.84
7.2.00.0070.00316.78
7.1.330.0070.00315.94
7.1.320.0040.01115.50
7.1.310.0140.00015.91
7.1.300.0030.01315.89
7.1.290.0130.00315.79
7.1.280.0060.00315.68
7.1.270.0110.00415.79
7.1.260.0060.00315.80
7.1.250.0000.01215.55
7.1.200.0090.00315.86
7.1.70.0100.00317.19
7.1.60.0120.01219.17
7.1.50.0030.01016.95
7.1.00.0000.04022.31
7.0.200.0030.01316.55
7.0.140.0030.07321.92
7.0.100.0370.08720.02
7.0.90.0030.07319.96
7.0.80.0130.05020.04
7.0.70.0100.07319.98
7.0.60.0000.05320.09
7.0.50.0030.04320.33
7.0.40.0100.06020.04
7.0.30.0000.05020.05
7.0.20.0130.07020.05
7.0.10.0200.07320.02
7.0.00.0030.09320.10
5.6.280.0070.07020.86
5.6.250.0130.03320.62
5.6.240.0100.08320.68
5.6.230.0070.08020.68
5.6.220.0070.08320.66
5.6.210.0000.05720.59
5.6.200.0170.06021.11
5.6.190.0070.04321.00
5.6.180.0100.07721.08
5.6.170.0070.04721.02
5.6.160.0100.05021.04
5.6.150.0100.07321.04
5.6.140.0070.06020.96
5.6.130.0200.06721.07
5.6.120.0200.07021.01
5.6.110.0070.08321.15
5.6.100.0030.08721.01
5.6.90.0130.08321.04
5.6.80.0070.07320.40
5.6.70.0130.07320.44
5.6.60.0170.07320.44
5.6.50.0130.05320.39
5.6.40.0070.08020.41
5.6.30.0070.08320.47
5.6.20.0030.07320.30
5.6.10.0070.07720.43
5.6.00.0030.04720.47
5.5.380.0100.07720.40
5.5.370.0030.07020.44
5.5.360.0030.06720.43
5.5.350.0130.07020.41
5.5.340.0130.05320.86
5.5.330.0100.07720.86
5.5.320.0130.04020.86
5.5.310.0030.05020.91
5.5.300.0230.05020.88
5.5.290.0130.07720.80
5.5.280.0030.05320.82
5.5.270.0130.07320.78
5.5.260.0030.04320.79
5.5.250.0070.08320.64
5.5.240.0100.05719.98
5.5.230.0070.08020.30
5.5.220.0070.04020.10
5.5.210.0030.07020.25
5.5.200.0100.08020.26
5.5.190.0100.06020.25
5.5.180.0070.07020.12
5.5.160.0100.04320.18
5.5.150.0070.07020.08
5.5.140.0130.03720.17
5.5.130.0030.05320.09
5.5.120.0130.07020.23
5.5.110.0000.06320.17
5.5.100.0170.07319.94
5.5.90.0170.07020.14
5.5.80.0130.04320.06
5.5.70.0100.08020.15
5.5.60.0100.06720.08
5.5.50.0100.07020.02
5.5.40.0070.07719.95
5.5.30.0100.07020.06
5.5.20.0100.06020.12
5.5.10.0200.06019.97
5.5.00.0130.06720.05
5.4.450.0030.07719.11
5.4.440.0230.05319.55
5.4.430.0130.03719.46
5.4.420.0070.05719.37
5.4.410.0130.07019.29
5.4.400.0130.07018.79
5.4.390.0030.06719.04
5.4.380.0070.04719.23
5.4.370.0170.06718.79
5.4.360.0270.05318.81
5.4.350.0030.06719.25
5.4.340.0170.06719.05
5.4.320.0030.08319.13
5.4.310.0030.08018.78
5.4.300.0030.08019.07
5.4.290.0030.04318.98
5.4.280.0070.07318.90
5.4.270.0130.06019.05
5.4.260.0100.07019.05
5.4.250.0100.07019.02
5.4.240.0130.07719.14
5.4.230.0030.05018.95
5.4.220.0130.07719.02
5.4.210.0130.06719.12
5.4.200.0170.06718.89
5.4.190.0070.07319.02
5.4.180.0000.08719.04
5.4.170.0100.07318.95
5.4.160.0100.07319.05
5.4.150.0130.04718.96
5.4.140.0100.03716.14
5.4.130.0100.03716.34
5.4.120.0000.05016.32
5.4.110.0070.05716.42
5.4.100.0000.08716.30
5.4.90.0130.05316.41
5.4.80.0070.07316.20
5.4.70.0030.06016.39
5.4.60.0100.03316.21
5.4.50.0030.05316.35
5.4.40.0030.03716.47
5.4.30.0000.04016.19
5.4.20.0030.04016.19
5.4.10.0030.04016.32
5.4.00.0070.02715.57
5.3.290.0030.04714.52
5.3.280.0130.06714.57
5.3.270.0070.06314.61
5.3.260.0070.04714.58
5.3.250.0030.07314.60
5.3.240.0030.07314.51
5.3.230.0070.09014.55
5.3.220.0100.06314.55
5.3.210.0100.07314.55
5.3.200.0030.08314.57
5.3.190.0130.08314.50
5.3.180.0000.08314.47
5.3.170.0070.05014.43
5.3.160.0030.03714.54
5.3.150.0000.04014.54
5.3.140.0000.04014.55
5.3.130.0070.04014.52
5.3.120.0030.03714.40
5.3.110.0000.03314.48
5.3.100.0030.04013.95
5.3.90.0030.03714.01
5.3.80.0030.03314.02
5.3.70.0070.03313.99
5.3.60.0000.03713.94
5.3.50.0030.03313.90
5.3.40.0100.03313.93
5.3.30.0100.03013.77
5.3.20.0030.06713.68
5.3.10.0030.04013.51
5.3.00.0070.03313.41
5.2.170.0000.03311.10
5.2.160.0100.02011.13
5.2.150.0000.03011.18
5.2.140.0070.02311.00
5.2.130.0070.02711.08
5.2.120.0030.02711.09
5.2.110.0030.02711.17
5.2.100.0000.02711.14
5.2.90.0030.02711.08
5.2.80.0000.03011.10
5.2.70.0000.03011.16
5.2.60.0070.02311.12
5.2.50.0070.02310.98
5.2.40.0030.03010.83
5.2.30.0000.02710.81
5.2.20.0070.02010.95
5.2.10.0070.02310.76
5.2.00.0000.03010.77
5.1.60.0000.02710.02
5.1.50.0030.0239.82
5.1.40.0000.02710.02
5.1.30.0030.02710.37
5.1.20.0000.02310.25
5.1.10.0000.02710.05
5.1.00.0000.03010.09
5.0.50.0000.0179.81
5.0.40.0030.0179.81
5.0.30.0000.0479.81
5.0.20.0000.0179.81
5.0.10.0000.0209.81
5.0.00.0030.0239.81
4.4.90.0000.0179.81
4.4.80.0030.0139.81
4.4.70.0000.0179.81
4.4.60.0000.0139.81
4.4.50.0030.0139.81
4.4.40.0000.0239.81
4.4.30.0000.0179.81
4.4.20.0000.0179.81
4.4.10.0000.0179.81
4.4.00.0000.0239.81
4.3.110.0030.0139.81
4.3.100.0000.0139.81
4.3.90.0000.0179.81
4.3.80.0000.0209.81
4.3.70.0070.0079.81
4.3.60.0030.0139.81
4.3.50.0030.0139.81
4.3.40.0000.0209.81
4.3.30.0000.0179.81
4.3.20.0000.0179.81
4.3.10.0000.0179.81
4.3.00.0000.0139.81

preferences:
55.95 ms | 401 KiB | 5 Q