3v4l.org

run code in 300+ PHP versions simultaneously
<?php $mystring = 'abc'; $findme = 'b'; $pos = strpos($mystring, $findme); // The !== operator can also be used. Using != would not work as expected // because the position of 'a' is 0. The statement (0 != false) evaluates // to false. if ($pos !== false) { echo "The string '$findme' was found in the string '$mystring'"; echo " and exists at position $pos"; } else { echo "The string '$findme' was not found in the string '$mystring'"; }

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.0130.00618.43
8.3.50.0110.00822.03
8.3.40.0030.01018.79
8.3.30.0060.00819.09
8.3.20.0100.00720.34
8.3.10.0000.00921.76
8.3.00.0040.00419.19
8.2.180.0070.00716.50
8.2.170.0180.00022.96
8.2.160.0170.00020.53
8.2.150.0040.00424.18
8.2.140.0050.00324.66
8.2.130.0120.00326.16
8.2.120.0040.00422.12
8.2.110.0060.00322.28
8.2.100.0070.00417.84
8.2.90.0030.00619.27
8.2.80.0080.00017.97
8.2.70.0080.00017.59
8.2.60.0040.00418.05
8.2.50.0000.00918.07
8.2.40.0040.00417.91
8.2.30.0000.00718.11
8.2.20.0000.00717.68
8.2.10.0070.00018.10
8.2.00.0030.00517.70
8.1.280.0100.00625.92
8.1.270.0030.00518.91
8.1.260.0000.00826.35
8.1.250.0080.00028.09
8.1.240.0000.00923.67
8.1.230.0110.00019.15
8.1.220.0040.00417.79
8.1.210.0050.00518.77
8.1.200.0070.00517.09
8.1.190.0040.00417.00
8.1.180.0030.00518.10
8.1.170.0000.00818.58
8.1.160.0070.00021.95
8.1.150.0040.00418.81
8.1.140.0040.00417.43
8.1.130.0070.00017.83
8.1.120.0000.00717.43
8.1.110.0040.00717.45
8.1.100.0030.00317.38
8.1.90.0080.00017.41
8.1.80.0030.00717.25
8.1.70.0000.00717.29
8.1.60.0020.00517.54
8.1.50.0030.00617.43
8.1.40.0060.00617.36
8.1.30.0080.00017.58
8.1.20.0040.00417.52
8.1.10.0030.00617.52
8.1.00.0000.00817.34
8.0.300.0000.00718.77
8.0.290.0000.00716.75
8.0.280.0030.00318.36
8.0.270.0000.00716.82
8.0.260.0030.00317.17
8.0.250.0000.00816.98
8.0.240.0000.00716.94
8.0.230.0030.00316.84
8.0.220.0000.00916.80
8.0.210.0000.00716.78
8.0.200.0030.00316.95
8.0.190.0030.00616.84
8.0.180.0030.00316.83
8.0.170.0060.00316.92
8.0.160.0030.00316.86
8.0.150.0000.00916.82
8.0.140.0030.00416.83
8.0.130.0040.00413.29
8.0.120.0040.00416.77
8.0.110.0000.00816.95
8.0.100.0040.00417.00
8.0.90.0000.01016.82
8.0.80.0210.00016.89
8.0.70.0050.00316.72
8.0.60.0030.00416.80
8.0.50.0000.00716.75
8.0.30.0050.01616.93
8.0.20.0080.01417.40
8.0.10.0000.00716.99
8.0.00.0140.00316.68
7.4.330.0020.00215.20
7.4.320.0030.00316.58
7.4.300.0000.00716.51
7.4.290.0030.00316.41
7.4.280.0030.00516.47
7.4.270.0030.00316.52
7.4.260.0030.00316.58
7.4.250.0000.00816.57
7.4.240.0020.00516.51
7.4.230.0070.00016.40
7.4.220.0100.00716.57
7.4.210.0070.00716.70
7.4.200.0030.00316.39
7.4.160.0090.00616.40
7.4.150.0120.00617.40
7.4.140.0140.00417.86
7.4.130.0100.00716.59
7.4.120.0100.00816.45
7.4.110.0130.01016.63
7.4.100.0110.00716.33
7.4.90.0130.00916.47
7.4.80.0100.00719.39
7.4.70.0060.01016.76
7.4.60.0100.00616.46
7.4.50.0040.00016.41
7.4.40.0070.01116.42
7.4.30.0130.01016.53
7.4.00.0070.01014.86
7.3.330.0030.00313.09
7.3.320.0000.00513.05
7.3.310.0030.00316.07
7.3.300.0030.00316.19
7.3.290.0090.00716.23
7.3.280.0110.00716.25
7.3.270.0090.00917.40
7.3.260.0030.01316.59
7.3.250.0080.00916.31
7.3.240.0100.00716.36
7.3.230.0080.00816.41
7.3.210.0000.01616.29
7.3.200.0060.01019.39
7.3.190.0150.00916.36
7.3.180.0120.00616.47
7.3.170.0090.00616.32
7.3.160.0120.00616.25
7.2.330.0100.00716.57
7.2.320.0070.01616.60
7.2.310.0100.01316.65
7.2.300.0030.01316.42
7.2.290.0100.00716.50
7.2.60.0070.00716.95
7.2.00.0040.00819.38
7.1.200.0030.01015.92
7.1.100.0040.01118.15
7.1.70.0060.01017.12
7.1.60.0180.00719.57
7.1.50.0100.01016.97
7.1.00.0100.07022.33
7.0.200.0060.00616.74
7.0.140.0070.06722.09
7.0.60.0100.06319.88
7.0.50.0130.07717.80
7.0.40.0100.08720.08
7.0.30.0200.05320.30
7.0.20.0230.07320.16
7.0.10.0130.05720.12
7.0.00.0100.08020.29
5.6.210.0070.09020.70
5.6.200.0030.05018.11
5.6.190.0100.07320.65
5.6.180.0470.07020.67
5.6.170.0270.07720.50
5.6.160.0170.07320.40
5.6.150.0030.04018.07
5.6.140.0170.07318.20
5.6.130.0100.08018.11
5.6.120.0030.08721.10
5.6.110.0030.07321.11
5.6.100.0100.07320.95
5.6.90.0030.04320.88
5.6.80.0130.07320.50
5.5.350.0100.07020.44
5.5.340.0100.06717.98
5.5.330.0070.07720.40
5.5.320.0400.07020.28
5.5.310.0270.07720.17
5.5.300.0070.09017.89
5.5.290.0070.08318.02
5.5.280.0070.09020.61
5.5.270.0130.05020.64
5.5.260.0070.07720.86
5.5.250.0070.04320.61
5.5.240.0330.07020.26
5.4.450.0730.04319.25
5.4.440.0830.05719.27
5.4.430.0170.05019.12
5.4.420.0670.07719.46
5.4.410.0870.06019.36
5.4.400.0800.05319.28
5.4.390.1030.07019.25
5.4.380.0100.06018.68
5.4.370.0130.05718.50
5.4.360.0130.05718.74
5.4.350.0300.04318.49
5.4.340.0170.05318.61
5.4.320.0230.05018.58
5.4.310.0100.06018.72
5.4.300.0230.04718.61
5.4.290.0130.05718.71
5.4.280.0130.06018.49
5.4.270.0170.05318.61
5.4.260.0170.05318.71
5.4.250.0170.05718.73
5.4.240.0170.05718.62
5.4.230.0200.05018.76
5.4.220.0170.05718.73
5.4.210.0200.05018.57
5.4.200.0100.05716.56
5.4.190.0130.05718.56
5.4.180.0270.04718.70
5.4.170.0100.06318.72
5.4.160.0100.06018.70
5.4.150.0130.05318.59
5.4.140.0100.05316.16
5.4.130.0170.04716.33
5.4.120.0130.05716.20
5.4.110.0130.05016.17
5.4.100.0200.04716.32
5.4.90.0200.04716.24
5.4.80.0170.05016.13
5.4.70.0270.04716.22
5.4.60.0270.04316.03
5.4.50.0170.04716.18
5.4.40.0130.05716.22
5.4.30.0200.04716.19
5.4.20.0130.05316.16
5.4.10.0270.04316.11
5.4.00.0170.05015.71
5.3.290.0270.04714.59
5.3.280.0200.05014.63
5.3.270.0130.06014.57
5.3.260.0130.06014.52
5.3.250.0230.04714.70
5.3.240.0170.05314.61
5.3.230.0200.05314.60
5.3.220.0100.06014.57
5.3.210.0230.05314.51
5.3.200.0270.04314.55
5.3.190.0130.05714.65
5.3.180.0230.05714.47
5.3.170.0100.06014.63
5.3.160.0170.05314.52
5.3.150.0230.04314.47
5.3.140.0270.04014.60
5.3.130.0300.06714.63
5.3.120.0330.04714.62
5.3.110.0270.07314.62
5.3.100.0200.07714.11
5.3.90.0370.06014.11
5.3.80.0200.07714.11
5.3.70.0230.05713.93
5.3.60.0130.05713.98
5.3.50.0130.05313.87
5.3.40.0170.05314.04
5.3.30.0070.06014.03
5.3.20.0130.05013.69
5.3.10.0100.06313.68
5.3.00.0130.05713.60
5.2.170.0130.04711.15
5.2.160.0170.04311.18
5.2.150.0100.04711.07
5.2.140.0130.04711.18
5.2.130.0200.03311.15
5.2.120.0100.04311.14
5.2.110.0100.04711.08
5.2.100.0270.03011.09
5.2.90.0130.04311.07
5.2.80.0170.04011.10
5.2.70.0200.03711.08
5.2.60.0200.03311.05
5.2.50.0130.04311.06
5.2.40.0200.04011.03
5.2.30.0170.04010.95
5.2.20.0100.04711.08
5.2.10.0170.03710.99
5.2.00.0100.04010.74
5.1.60.0170.03310.02
5.1.50.0200.03010.18
5.1.40.0130.03310.01
5.1.30.0100.03710.32
5.1.20.0130.03710.45
5.1.10.0130.03310.06
5.1.00.0100.03710.18
5.0.50.0100.0278.76
5.0.40.0070.0278.54
5.0.30.0070.0438.32
5.0.20.0100.0278.24
5.0.10.0100.0238.21
5.0.00.0100.0408.17
4.4.90.0030.0235.96
4.4.80.0000.0275.84
4.4.70.0100.0205.89
4.4.60.0030.0235.92
4.4.50.0100.0175.93
4.4.40.0130.0275.88
4.4.30.0070.0205.91
4.4.20.0070.0205.96
4.4.10.0100.0205.96
4.4.00.0000.0405.88
4.3.110.0030.0235.84
4.3.100.0000.0275.93
4.3.90.0070.0205.84
4.3.80.0070.0335.84
4.3.70.0100.0135.84
4.3.60.0100.0135.84
4.3.50.0070.0205.85
4.3.40.0030.0375.84
4.3.30.0030.0235.84
4.3.20.0030.0235.84
4.3.10.0030.0275.84
4.3.00.0100.0237.44

preferences:
68.58 ms | 401 KiB | 5 Q