3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = '\n;alskdjf;lkdsajf;lkjdsaf \n hey judeee \n'; $pattern = '\n'; $start = 0; while(($newLine = strpos($string, $pattern, $start)) !== false){ $start = $newLine + 1; echo $newLine . '<br>'; }

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.0180.00418.43
8.3.50.0130.01021.21
8.3.40.0140.00718.63
8.3.30.0120.00318.71
8.3.20.0000.00818.63
8.3.10.0050.00321.09
8.3.00.0070.00023.48
8.2.180.0150.00016.50
8.2.170.0070.00722.96
8.2.160.0070.00720.35
8.2.150.0040.00424.18
8.2.140.0000.00824.66
8.2.130.0040.00426.16
8.2.120.0040.00419.56
8.2.110.0030.00620.35
8.2.100.0030.00917.72
8.2.90.0020.00519.02
8.2.80.0040.00418.05
8.2.70.0050.00317.50
8.2.60.0000.00817.93
8.2.50.0040.00418.07
8.2.40.0000.00818.16
8.2.30.0040.00421.23
8.2.20.0080.00017.55
8.2.10.0040.00417.63
8.2.00.0070.00017.68
8.1.280.0060.00825.92
8.1.270.0040.00423.99
8.1.260.0070.01126.35
8.1.250.0000.00728.09
8.1.240.0100.00023.88
8.1.230.0070.00720.89
8.1.220.0030.00618.77
8.1.210.0070.00318.92
8.1.200.0030.00617.23
8.1.190.0050.00217.53
8.1.180.0000.00818.10
8.1.170.0080.00018.59
8.1.160.0030.00518.84
8.1.150.0000.00818.59
8.1.140.0050.00317.50
8.1.130.0030.00317.83
8.1.120.0000.00717.32
8.1.110.0040.00617.30
8.1.100.0060.00317.30
8.1.90.0000.00717.40
8.1.80.0000.00717.25
8.1.70.0030.00317.36
8.1.60.0000.00717.55
8.1.50.0080.00017.47
8.1.40.0040.00417.51
8.1.30.0080.00017.53
8.1.20.0040.00417.52
8.1.10.0000.00717.47
8.1.00.0060.00317.48
8.0.300.0050.00519.85
8.0.290.0030.00617.05
8.0.280.0000.00818.46
8.0.270.0000.00817.13
8.0.260.0060.00016.82
8.0.250.0000.00717.00
8.0.240.0040.00416.94
8.0.230.0030.00316.79
8.0.220.0060.00316.83
8.0.210.0000.00816.90
8.0.200.0000.00716.87
8.0.190.0040.00416.95
8.0.180.0000.00716.82
8.0.170.0000.00816.87
8.0.160.0070.00016.89
8.0.150.0040.00416.94
8.0.140.0050.00316.80
8.0.130.0050.00313.25
8.0.120.0000.00716.76
8.0.110.0080.00016.76
8.0.100.0050.00216.80
8.0.90.0000.00816.76
8.0.80.0110.00716.92
8.0.70.0070.00016.96
8.0.60.0040.00416.79
8.0.50.0000.00717.00
8.0.30.0100.00817.15
8.0.20.0090.00917.40
8.0.10.0050.00217.07
8.0.00.0100.01116.67
7.4.330.0030.00314.70
7.4.320.0030.00316.61
7.4.300.0050.00216.63
7.4.290.0030.00316.58
7.4.280.0070.00016.58
7.4.270.0030.00316.62
7.4.260.0000.00513.27
7.4.250.0050.00316.48
7.4.240.0070.00016.53
7.4.230.0000.00816.51
7.4.220.0110.00716.66
7.4.210.0090.00816.44
7.4.200.0030.00316.48
7.4.190.0040.00416.46
7.4.160.0070.01116.54
7.4.150.0090.00917.40
7.4.140.0060.01117.86
7.4.130.0130.00816.46
7.4.120.0090.01016.50
7.4.110.0130.00616.58
7.4.100.0100.01016.35
7.4.90.0080.01016.70
7.4.80.0070.01419.37
7.4.70.0130.00316.54
7.4.60.0060.01216.46
7.4.50.0040.00416.57
7.4.40.0100.00322.52
7.4.30.0060.00916.45
7.4.00.0000.01815.15
7.3.330.0000.00513.18
7.3.320.0050.00013.14
7.3.310.0030.00316.34
7.3.300.0030.00316.32
7.3.290.0060.00916.26
7.3.280.0080.00716.30
7.3.270.0130.00417.40
7.3.260.0120.01418.24
7.3.250.0080.01016.50
7.3.240.0060.01216.38
7.3.230.0070.01716.42
7.3.210.0070.01016.18
7.3.200.0100.00719.39
7.3.190.0090.00616.49
7.3.180.0060.00916.46
7.3.170.0120.00916.66
7.3.160.0070.00916.43
7.3.120.0070.01015.01
7.3.110.0030.01314.80
7.3.100.0060.00614.75
7.3.90.0000.01114.99
7.3.80.0100.00314.63
7.3.70.0070.00714.99
7.3.60.0030.00614.57
7.3.50.0070.00314.60
7.3.40.0130.00314.56
7.3.30.0060.00914.62
7.3.20.0080.00416.74
7.3.10.0100.00716.61
7.3.00.0090.00616.76
7.2.330.0060.01916.51
7.2.320.0130.01016.73
7.2.310.0060.01216.43
7.2.300.0070.00816.41
7.2.290.0070.01116.72
7.2.250.0070.01115.09
7.2.240.0040.01515.29
7.2.230.0040.01215.08
7.2.220.0080.00314.94
7.2.210.0040.01415.02
7.2.200.0030.01314.89
7.2.190.0080.00615.14
7.2.180.0070.00715.09
7.2.170.0030.01215.01
7.2.160.0030.00915.09
7.2.150.0000.01116.84
7.2.140.0110.00716.90
7.2.130.0030.01516.74
7.2.120.0060.00617.00
7.2.110.0060.01217.07
7.2.100.0060.00317.04
7.2.90.0040.01517.06
7.2.80.0030.01016.84
7.2.70.0120.00416.71
7.2.60.0040.01016.92
7.2.50.0100.00616.84
7.2.40.0080.00416.71
7.2.30.0130.00316.75
7.2.20.0000.01416.91
7.2.10.0060.00916.61
7.2.00.0080.01318.01
7.1.330.0000.01315.86
7.1.320.0080.00315.88
7.1.310.0060.00315.82
7.1.300.0090.00615.63
7.1.290.0060.00615.71
7.1.280.0060.00615.80
7.1.270.0070.00415.74
7.1.260.0030.00615.93
7.1.250.0030.01215.91
7.1.200.0030.00915.77
7.1.100.0050.00818.14
7.1.70.0070.00317.10
7.1.60.0070.01719.40
7.1.50.0130.01316.69
7.1.00.0000.07322.51
7.0.200.0040.00416.97
7.0.140.0000.07722.12
7.0.70.0070.03021.67
7.0.60.0000.03321.71
7.0.50.0000.03322.14
7.0.40.0070.03020.03
7.0.30.0000.03719.94
7.0.20.0000.04720.14
7.0.10.0070.02720.16
7.0.00.0030.04720.17
5.6.280.0070.07020.91
5.6.220.0000.03720.46
5.6.210.0000.04020.53
5.6.200.0030.03321.03
5.6.190.0030.03321.00
5.6.180.0100.03021.03
5.6.170.0030.04021.11
5.6.160.0000.05321.10
5.6.150.0070.07721.08
5.6.140.0100.07720.93
5.6.130.0070.08021.11
5.6.120.0000.07321.07
5.6.110.0000.07021.03
5.6.100.0070.08720.93
5.6.90.0030.07721.05
5.6.80.0000.06320.32
5.6.70.0000.08320.41
5.6.60.0070.05720.47
5.6.50.0100.07720.50
5.6.40.0000.08020.40
5.6.30.0070.07720.46
5.6.20.0100.07720.39
5.6.10.0000.07720.48
5.6.00.0030.07720.37
5.5.360.0000.05020.39
5.5.350.0000.03320.32
5.5.340.0030.03020.89
5.5.330.0000.03320.77
5.5.320.0000.04320.91
5.5.310.0000.04720.88
5.5.300.0070.08320.72
5.5.290.0100.07720.68
5.5.280.0030.07320.89
5.5.270.0000.07020.84
5.5.260.0000.09020.86
5.5.250.0070.05720.73
5.5.240.0100.03720.16
5.5.230.0000.04720.20
5.5.220.0000.07720.25
5.5.210.0070.08020.14
5.5.200.0030.07320.14
5.5.190.0070.05020.24
5.5.180.0130.07320.23
5.5.160.0070.07020.08
5.5.150.0030.08320.20
5.5.140.0070.07720.26
5.5.130.0170.06020.17
5.5.120.0100.07320.24
5.5.110.0070.07320.13
5.5.100.0100.07020.10
5.5.90.0100.06720.05
5.5.80.0030.07320.04
5.5.70.0030.07319.91
5.5.60.0100.03720.14
5.5.50.0100.06720.05
5.5.40.0070.07719.95
5.5.30.0030.08020.10
5.5.20.0000.08020.04
5.5.10.0000.08320.05
5.5.00.0130.07319.96
5.4.450.0070.07319.29
5.4.440.0100.05319.38
5.4.430.0030.04319.35
5.4.420.0030.07319.21
5.4.410.0100.06719.25
5.4.400.0030.07018.96
5.4.390.0030.08019.08
5.4.380.0070.07319.03
5.4.370.0070.07019.10
5.4.360.0070.07319.09
5.4.350.0030.07718.89
5.4.340.0000.08719.22
5.4.320.0070.07719.14
5.4.310.0070.04719.14
5.4.300.0000.07318.91
5.4.290.0000.06718.78
5.4.280.0030.07719.05
5.4.270.0000.08018.80
5.4.260.0030.08019.21
5.4.250.0030.07718.88
5.4.240.0000.07719.05
5.4.230.0100.06318.77
5.4.220.0070.06319.05
5.4.210.0000.07319.04
5.4.200.0000.08319.03
5.4.190.0030.06018.78
5.4.180.0070.07019.05
5.4.170.0030.07318.95
5.4.160.0000.07719.02
5.4.150.0130.05018.84
5.4.140.0030.05016.22
5.4.130.0000.07316.22
5.4.120.0100.05316.23
5.4.110.0100.05716.22
5.4.100.0100.04016.42
5.4.90.0070.04716.39
5.4.80.0070.06316.39
5.4.70.0100.06316.33
5.4.60.0030.06016.33
5.4.50.0000.07716.30
5.4.40.0000.07716.28
5.4.30.0030.05716.27
5.4.20.0000.07016.38
5.4.10.0000.07716.30
5.4.00.0100.06315.76
5.3.290.0030.07714.63
5.3.280.0130.06014.45
5.3.270.0030.08014.56
5.3.260.0070.04714.59
5.3.250.0030.07014.56
5.3.240.0070.06014.44
5.3.230.0030.04014.45
5.3.220.0130.05714.54
5.3.210.0070.07014.52
5.3.200.0000.05314.55
5.3.190.0030.06314.54
5.3.180.0030.06314.54
5.3.170.0070.06014.54
5.3.160.0000.07714.52
5.3.150.0100.07014.42
5.3.140.0100.05714.41
5.3.130.0030.07314.40
5.3.120.0030.07714.55
5.3.110.0030.06314.50
5.3.100.0000.07714.01
5.3.90.0000.07314.02
5.3.80.0030.07714.01
5.3.70.0030.07714.00
5.3.60.0030.07014.00
5.3.50.0030.07013.80
5.3.40.0100.07313.91
5.3.30.0070.07013.85
5.3.20.0030.05713.45
5.3.10.0100.06713.64
5.3.00.0070.06313.63
5.2.170.0070.03311.09
5.2.160.0030.05710.95
5.2.150.0070.06010.98
5.2.140.0030.06011.00
5.2.130.0000.05311.13
5.2.120.0000.05710.96
5.2.110.0070.05010.91
5.2.100.0070.04711.06
5.2.90.0000.04011.17
5.2.80.0030.04011.14
5.2.70.0070.05711.09
5.2.60.0000.05711.09
5.2.50.0030.05310.93
5.2.40.0070.05310.86
5.2.30.0000.05310.96
5.2.20.0100.05010.91
5.2.10.0070.05710.96
5.2.00.0070.04310.86
5.1.60.0030.05710.86
5.1.50.0030.05010.86
5.1.40.0070.04310.86
5.1.30.0000.05010.86
5.1.20.0000.04310.86
5.1.10.0000.04710.86
5.1.00.0130.03710.86
5.0.50.0000.04310.86
5.0.40.0030.04010.86
5.0.30.0000.06010.86
5.0.20.0070.03310.86
5.0.10.0030.04010.86
5.0.00.0000.06710.86
4.4.90.0030.03310.86
4.4.80.0000.03310.86
4.4.70.0000.02710.86
4.4.60.0000.03310.86
4.4.50.0000.03710.86
4.4.40.0070.03710.86
4.4.30.0000.03710.86
4.4.20.0030.03010.86
4.4.10.0000.04010.86
4.4.00.0070.05710.86
4.3.110.0030.03310.86
4.3.100.0000.03710.86
4.3.90.0070.02310.86
4.3.80.0030.04710.86
4.3.70.0000.03010.86
4.3.60.0000.03710.86
4.3.50.0030.03010.86
4.3.40.0030.04710.86
4.3.30.0000.02310.86
4.3.20.0000.03310.86
4.3.10.0100.02710.86
4.3.00.0070.03010.86

preferences:
47.65 ms | 401 KiB | 5 Q