3v4l.org

run code in 300+ PHP versions simultaneously
<?php $s = "ab"; $s1 = "cAbfabe"; $rest = $s1; do { $rest = stristr($rest,$s); echo "rest: $rest\n"; $s3 = substr($rest,0,count($s)+1); $s1 = str_replace($s3,"<$s3>",$s1); echo "s3: $s3\n"; $rest = substr($rest,count($s)+1); echo "rest: $rest\n"; echo "=======\n"; } while ($rest != false); echo "s1: $s1\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.0150.00616.75
8.3.50.0120.00717.50
8.3.40.0100.01018.67
8.3.30.0120.00318.82
8.3.20.0000.00818.73
8.3.10.0080.00020.53
8.3.00.0090.00317.50
8.2.180.0140.00716.87
8.2.170.0070.00722.96
8.2.160.0070.01022.13
8.2.150.0100.01024.18
8.2.140.0050.00324.66
8.2.130.0040.00426.16
8.2.120.0040.00419.83
8.2.110.0030.00721.11
8.2.100.0110.00017.84
8.2.90.0000.00919.47
8.2.80.0070.00019.40
8.2.70.0050.00317.63
8.2.60.0060.00317.93
8.2.50.0000.00818.07
8.2.40.0050.00318.16
8.2.30.0000.00718.05
8.2.20.0040.00417.78
8.2.10.0040.00417.73
8.2.00.0000.00917.92
8.1.280.0140.00725.92
8.1.270.0080.00024.66
8.1.260.0040.00426.35
8.1.250.0030.00628.09
8.1.240.0040.00423.83
8.1.230.0080.00420.97
8.1.220.0060.00317.79
8.1.210.0000.01018.89
8.1.200.0060.00317.48
8.1.190.0030.00617.53
8.1.180.0050.00318.10
8.1.170.0080.00018.79
8.1.160.0030.00518.99
8.1.150.0040.00418.56
8.1.140.0030.00717.49
8.1.130.0070.00017.73
8.1.120.0040.00317.44
8.1.110.0040.00417.47
8.1.100.0000.00717.36
8.1.90.0030.00517.36
8.1.80.0000.00817.35
8.1.70.0030.00617.45
8.1.60.0020.00517.57
8.1.50.0080.00017.42
8.1.40.0050.00217.58
8.1.30.0060.00317.48
8.1.20.0050.00317.58
8.1.10.0040.00417.59
8.1.00.0030.00617.50
8.0.300.0030.00520.09
8.0.290.0070.00016.75
8.0.280.0050.00318.46
8.0.270.0030.00517.26
8.0.260.0040.00416.88
8.0.250.0000.00716.92
8.0.240.0070.00316.95
8.0.230.0030.00317.02
8.0.220.0020.00516.92
8.0.210.0030.00317.00
8.0.200.0000.00616.90
8.0.190.0030.00316.98
8.0.180.0000.00716.96
8.0.170.0000.00816.97
8.0.160.0040.00417.03
8.0.150.0030.00617.00
8.0.140.0030.00817.00
8.0.130.0000.00613.38
8.0.120.0040.00416.91
8.0.110.0040.00417.00
8.0.100.0030.00517.01
8.0.90.0070.00016.87
8.0.80.0070.00716.90
8.0.70.0000.00716.83
8.0.60.0040.00416.93
8.0.50.0040.00416.91
8.0.30.0100.01517.14
8.0.20.0060.01217.11
8.0.10.0040.00417.09
8.0.00.0100.00916.69
7.4.330.0030.00312.91
7.4.320.0040.00416.50
7.4.300.0030.00316.55
7.4.290.0000.00716.52
7.4.280.0020.00516.61
7.4.270.0030.00316.57
7.4.260.0000.00513.21
7.4.250.0030.00616.56
7.4.240.0070.00016.41
7.4.230.0040.00216.61
7.4.220.0060.01316.49
7.4.210.0110.00316.55
7.4.200.0030.00316.70
7.4.190.0000.00816.55
7.4.160.0180.00616.70
7.4.150.0080.00816.53
7.4.140.0160.00316.58
7.4.130.0080.00916.52
7.4.120.0120.01016.54
7.4.110.0090.00916.59
7.4.100.0140.00716.57
7.4.90.0060.01216.56
7.4.80.0060.01216.52
7.4.70.0050.01116.34
7.4.60.0120.01016.55
7.4.50.0050.00316.29
7.4.40.0000.01216.57
7.4.30.0060.01216.47
7.4.00.0060.00915.19
7.3.330.0030.00313.22
7.3.320.0030.00313.37
7.3.310.0030.00316.45
7.3.300.0040.00416.24
7.3.290.0110.00916.29
7.3.280.0070.01116.36
7.3.270.0060.01516.47
7.3.260.0080.00816.31
7.3.250.0080.01016.49
7.3.240.0130.00916.40
7.3.230.0070.01016.43
7.3.210.0130.00316.43
7.3.200.0090.01119.39
7.3.190.0090.00916.42
7.3.180.0090.00616.33
7.3.170.0060.01116.43
7.3.160.0120.00316.53
7.3.120.0030.01114.89
7.2.330.0000.01816.71
7.2.320.0130.01016.82
7.2.310.0030.01616.73
7.2.300.0090.00916.75
7.2.290.0130.00316.48
7.2.60.0060.00616.88
7.2.00.0100.00319.14
7.1.200.0070.00415.57
7.1.100.0050.00518.07
7.1.70.0000.00716.78
7.1.60.0130.01019.40
7.1.50.0070.01416.85
7.1.00.0000.06722.48
7.0.200.0040.00416.71
7.0.140.0070.07021.96
7.0.120.0030.04022.05
7.0.60.0070.06319.96
7.0.50.0030.04017.95
7.0.40.0030.04317.78
7.0.30.0070.04017.74
7.0.20.0030.04017.78
7.0.10.0030.04017.78
7.0.00.0000.04317.77
5.6.280.0130.06321.06
5.6.210.0130.06320.69
5.6.200.0100.03718.18
5.6.190.0030.04018.21
5.6.180.0070.03718.16
5.6.170.0000.04318.18
5.6.160.0030.04018.21
5.6.150.0100.03318.11
5.6.140.0100.05318.09
5.6.130.0100.06718.11
5.6.120.0030.08018.15
5.6.110.0070.06018.21
5.6.100.0030.07318.20
5.6.90.0070.08318.10
5.6.80.0100.06317.50
5.6.70.0030.05317.58
5.6.60.0130.06717.56
5.6.50.0070.08017.50
5.6.40.0070.07717.57
5.6.30.0100.07317.56
5.6.20.0100.03317.47
5.6.10.0100.03317.51
5.6.00.0000.04717.46
5.5.350.0330.07720.37
5.5.340.0130.02718.02
5.5.330.0070.04018.02
5.5.320.0030.04317.88
5.5.310.0030.04017.92
5.5.300.0070.04717.89
5.5.290.0100.07718.01
5.5.280.0070.08017.94
5.5.270.0100.05017.89
5.5.260.0070.08317.88
5.5.250.0070.07717.73
5.5.240.0130.07017.39
5.5.230.0070.04017.36
5.5.220.0030.06017.36
5.5.210.0070.05017.29
5.5.200.0030.08717.27
5.5.190.0100.06317.36
5.5.180.0030.04717.33
5.5.160.0030.08017.32
5.5.150.0030.04017.32
5.5.140.0100.03717.36
5.5.130.0070.07017.29
5.5.120.0070.06717.26
5.5.110.0030.05317.27
5.5.100.0100.05317.15
5.5.90.0000.05717.16
5.5.80.0100.04017.21
5.5.70.0000.04317.16
5.5.60.0030.04017.24
5.5.50.0130.06317.21
5.5.40.0070.06317.22
5.5.30.0030.05717.24
5.5.20.0070.07717.15
5.5.10.0130.07017.26
5.5.00.0030.04717.20
5.4.450.0100.05019.47
5.4.440.0030.06019.42
5.4.430.0030.07019.23
5.4.420.0130.08019.36
5.4.410.0070.07719.20
5.4.400.0100.04719.00
5.4.390.0070.08019.07
5.4.380.0030.04018.97
5.4.370.0130.07319.07
5.4.360.0070.06019.12
5.4.350.0100.07019.03
5.4.340.0130.07318.97
5.4.320.0170.04018.98
5.4.310.0130.06319.12
5.4.300.0100.03319.03
5.4.290.0070.04719.03
5.4.280.0030.08319.02
5.4.270.0030.07318.96
5.4.260.0000.06718.98
5.4.250.0100.06018.98
5.4.240.0070.05719.00
5.4.230.0100.03719.12
5.4.220.0030.08319.20
5.4.210.0070.06718.88
5.4.200.0170.06718.97
5.4.190.0030.07719.06
5.4.180.0070.08018.97
5.4.170.0000.05319.08
5.4.160.0030.07318.80
5.4.150.0200.04018.97
5.4.140.0070.07016.18
5.4.130.0100.06316.27
5.4.120.0070.07316.25
5.4.110.0130.07016.39
5.4.100.0070.07016.28
5.4.90.0030.06316.36
5.4.80.0030.04016.22
5.4.70.0070.03316.37
5.4.60.0000.07716.23
5.4.50.0070.05716.33
5.4.40.0030.03716.55
5.4.30.0000.04016.33
5.4.20.0170.06016.24
5.4.10.0000.04716.25
5.4.00.0000.04715.70
5.3.290.0100.07714.63
5.3.280.0070.04714.59
5.3.270.0100.05714.54
5.3.260.0030.07314.56
5.3.250.0030.05314.59
5.3.240.0070.07314.53
5.3.230.0030.07714.56
5.3.220.0100.07014.53
5.3.210.0100.07314.52
5.3.200.0070.06314.38
5.3.190.0200.05314.54
5.3.180.0130.06714.38
5.3.170.0030.03714.50
5.3.160.0130.07014.34
5.3.150.0130.07014.52
5.3.140.0070.04014.52
5.3.130.0070.03314.47
5.3.120.0030.05714.52
5.3.110.0030.06014.52
5.3.100.0070.03313.97
5.3.90.0100.07013.93
5.3.80.0100.06013.96
5.3.70.0070.05013.93
5.3.60.0100.04013.78
5.3.50.0100.07013.87
5.3.40.0130.06313.71
5.3.30.0100.07313.87
5.3.20.0030.06313.62
5.3.10.0070.07013.42
5.3.00.0030.04013.57
5.2.170.0030.03711.11
5.2.160.0030.06711.12
5.2.150.0030.07010.92
5.2.140.0030.05710.91
5.2.130.0070.06011.08
5.2.120.0000.04711.06
5.2.110.0070.06011.05
5.2.100.0170.05011.07
5.2.90.0070.03010.92
5.2.80.0030.03011.08
5.2.70.0100.05711.23
5.2.60.0100.03311.04
5.2.50.0070.06310.92
5.2.40.0030.06310.82
5.2.30.0070.03310.92
5.2.20.0100.04310.84
5.2.10.0100.05010.84
5.2.00.0130.03010.73
5.1.60.0030.05310.02
5.1.50.0030.0339.91
5.1.40.0000.03310.12
5.1.30.0030.03710.27
5.1.20.0030.02710.27
5.1.10.0070.05010.07
5.1.00.0030.05710.05
5.0.50.0030.0479.07
5.0.40.0030.0479.07
5.0.30.0100.0579.07
5.0.20.0000.0409.07
5.0.10.0000.0409.07
5.0.00.0000.0379.07
4.4.90.0000.0379.07
4.4.80.0000.0179.07
4.4.70.0030.0379.07
4.4.60.0000.0379.07
4.4.50.0030.0379.07
4.4.40.0000.0409.07
4.4.30.0000.0209.07
4.4.20.0030.0379.07
4.4.10.0030.0139.07
4.4.00.0000.0439.07
4.3.110.0000.0339.07
4.3.100.0030.0379.07
4.3.90.0030.0279.07
4.3.80.0030.0279.07
4.3.70.0000.0379.07
4.3.60.0000.0379.07
4.3.50.0000.0339.07
4.3.40.0070.0439.07
4.3.30.0000.0409.07
4.3.20.0030.0279.07
4.3.10.0000.0309.07
4.3.00.0030.0209.07

preferences:
38.43 ms | 400 KiB | 5 Q