3v4l.org

run code in 300+ PHP versions simultaneously
<?php $s = "arc"; echo "count: " . count($s) . "\n"; $string = "Marcus"; $rest = $string; do { $rest = stristr($rest,$s); echo "rest: $rest\n"; $s3 = substr($rest,0,count($s)+1); $string = str_replace($s3,"<$s3>",$string); echo "s3: $s3\n"; $rest = substr($rest,count($s)+1); echo "rest: $rest\n"; echo "=======\n"; } while ($rest != false); echo "string: $string\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.0090.00916.50
8.3.50.0100.01017.14
8.3.40.0110.00418.87
8.3.30.0110.01118.79
8.3.20.0080.00018.95
8.3.10.0050.00320.53
8.3.00.0040.00419.26
8.2.180.0100.01016.75
8.2.170.0170.00322.96
8.2.160.0110.00322.27
8.2.150.0110.00424.18
8.2.140.0050.00324.66
8.2.130.0040.00426.16
8.2.120.0040.00419.77
8.2.110.0090.00020.99
8.2.100.0000.01217.84
8.2.90.0030.00619.00
8.2.80.0040.00417.97
8.2.70.0030.00617.63
8.2.60.0000.00817.90
8.2.50.0040.00418.10
8.2.40.0080.00020.50
8.2.30.0030.00517.93
8.2.20.0030.00617.75
8.2.10.0050.00317.77
8.2.00.0000.00817.83
8.1.280.0100.00725.92
8.1.270.0040.00423.99
8.1.260.0000.00826.35
8.1.250.0070.00028.09
8.1.240.0090.00022.75
8.1.230.0080.00417.83
8.1.220.0040.00417.91
8.1.210.0090.00018.77
8.1.200.0000.01117.36
8.1.190.0070.00317.23
8.1.180.0080.00018.10
8.1.170.0040.00418.66
8.1.160.0040.00422.17
8.1.150.0040.00418.59
8.1.140.0040.00417.32
8.1.130.0040.00417.78
8.1.120.0000.00717.34
8.1.110.0070.00017.34
8.1.100.0040.00417.42
8.1.90.0040.00417.47
8.1.80.0030.00417.44
8.1.70.0030.00317.38
8.1.60.0050.00517.63
8.1.50.0000.00817.47
8.1.40.0040.00417.55
8.1.30.0020.00517.70
8.1.20.0040.00417.69
8.1.10.0040.00417.58
8.1.00.0040.00417.47
8.0.300.0040.00418.77
8.0.290.0070.00016.63
8.0.280.0000.00718.31
8.0.270.0000.00717.09
8.0.260.0070.00016.71
8.0.250.0040.00416.97
8.0.240.0030.00616.85
8.0.230.0030.00316.95
8.0.220.0030.00316.76
8.0.210.0070.00016.77
8.0.200.0030.00616.84
8.0.190.0070.00017.01
8.0.180.0040.00416.86
8.0.170.0030.00716.86
8.0.160.0040.00416.84
8.0.150.0000.00816.91
8.0.140.0040.00416.79
8.0.130.0000.00613.36
8.0.120.0070.00016.80
8.0.110.0040.00416.76
8.0.100.0040.00416.94
8.0.90.0050.00317.01
8.0.80.0110.00417.01
8.0.70.0050.00216.82
8.0.60.0000.00716.84
8.0.50.0000.00716.89
8.0.30.0150.00617.18
8.0.20.0120.00617.33
8.0.10.0030.00517.00
8.0.00.0130.00716.72
7.4.330.0020.00312.96
7.4.320.0000.00716.64
7.4.300.0000.00716.57
7.4.290.0030.00316.60
7.4.280.0040.00416.54
7.4.270.0000.00716.60
7.4.260.0030.00313.25
7.4.250.0000.00816.57
7.4.240.0000.00816.62
7.4.230.0070.00016.49
7.4.220.0200.00616.56
7.4.210.0110.00716.59
7.4.200.0000.00716.53
7.4.190.0040.00416.37
7.4.160.0080.00816.34
7.4.150.0120.00616.59
7.4.140.0080.01116.49
7.4.130.0110.00616.42
7.4.120.0090.01116.60
7.4.110.0120.00716.72
7.4.100.0110.01116.57
7.4.90.0100.00716.62
7.4.80.0040.01316.67
7.4.70.0030.01516.61
7.4.60.0080.00816.49
7.4.50.0040.00416.51
7.4.40.0030.00716.33
7.4.30.0170.00016.62
7.4.00.0060.00914.97
7.3.330.0060.00013.13
7.3.320.0030.00313.30
7.3.310.0000.00716.34
7.3.300.0030.00316.42
7.3.290.0040.01116.33
7.3.280.0110.00816.47
7.3.270.0090.00916.58
7.3.260.0130.00816.48
7.3.250.0110.00616.46
7.3.240.0100.01416.34
7.3.230.0120.00416.71
7.3.210.0030.01416.32
7.3.200.0070.01119.39
7.3.190.0090.00916.55
7.3.180.0030.01316.55
7.3.170.0160.00316.38
7.3.160.0120.00316.43
7.3.120.0030.01014.92
7.3.10.0080.00616.53
7.3.00.0070.00716.58
7.2.330.0120.00616.71
7.2.320.0080.00816.63
7.2.310.0230.03016.74
7.2.300.0040.01316.60
7.2.290.0130.00616.59
7.2.130.0060.00917.07
7.2.120.0030.01316.70
7.2.110.0000.01416.91
7.2.100.0100.00317.09
7.2.90.0060.00616.85
7.2.80.0100.00716.82
7.2.70.0030.00616.75
7.2.60.0090.00616.88
7.2.50.0030.01317.09
7.2.40.0000.01117.11
7.2.30.0080.00316.74
7.2.20.0090.00616.75
7.2.10.0100.00316.97
7.2.00.0070.00418.29
7.1.250.0060.00315.93
7.1.240.0060.00915.52
7.1.230.0100.00715.66
7.1.220.0000.00815.50
7.1.210.0060.00315.92
7.1.200.0050.00815.86
7.1.190.0040.00815.39
7.1.180.0100.00315.80
7.1.170.0070.00315.84
7.1.160.0030.01515.50
7.1.150.0090.00615.73
7.1.140.0070.00315.91
7.1.130.0110.00415.41
7.1.120.0070.00715.88
7.1.110.0120.00015.68
7.1.100.0050.00516.84
7.1.90.0000.01515.45
7.1.80.0080.00615.85
7.1.70.0040.00716.55
7.1.60.0070.01417.45
7.1.50.0110.00916.36
7.1.40.0030.01315.75
7.1.30.0000.00815.69
7.1.20.0090.00315.84
7.1.10.0090.00615.87
7.1.00.0020.03719.01
7.0.330.0040.00415.56
7.0.320.0060.00615.17
7.0.310.0030.00815.59
7.0.300.0090.00315.34
7.0.290.0090.00615.48
7.0.280.0070.00715.55
7.0.270.0060.00315.46
7.0.260.0060.00615.57
7.0.250.0080.00414.95
7.0.240.0000.01515.33
7.0.230.0000.00915.36
7.0.220.0060.00615.12
7.0.210.0000.01015.42
7.0.200.0180.00615.14
7.0.190.0000.01415.08
7.0.180.0030.00615.33
7.0.170.0120.00015.12
7.0.160.0030.01015.44
7.0.150.0030.01015.33
7.0.140.0020.04318.64
7.0.130.0000.01515.51
7.0.120.0060.04018.78
7.0.110.0060.00615.19
7.0.100.0030.00615.12
7.0.90.0100.00315.47
7.0.80.0090.00315.49
7.0.70.0040.00415.60
7.0.60.0080.04017.66
7.0.50.0080.03016.65
7.0.40.0140.02015.61
7.0.30.0080.04015.59
7.0.20.0070.02815.62
7.0.10.0090.03715.71
7.0.00.0080.03715.66
5.6.380.0070.00714.40
5.6.370.0040.01114.26
5.6.360.0000.01314.11
5.6.350.0080.00014.59
5.6.340.0070.00714.49
5.6.330.0120.00314.57
5.6.320.0000.01214.35
5.6.310.0100.00314.46
5.6.300.0030.01014.54
5.6.290.0040.00814.42
5.6.280.0030.04217.63
5.6.270.0030.01013.96
5.6.260.0030.01014.23
5.6.250.0060.00914.07
5.6.240.0090.00614.19
5.6.230.0060.00814.23
5.6.220.0070.00714.26
5.6.210.0080.03517.52
5.6.200.0050.04416.30
5.6.190.0090.03216.38
5.6.180.0030.04716.22
5.6.170.0080.02616.38
5.6.160.0050.03916.21
5.6.150.0090.02516.06
5.6.140.0040.04816.32
5.6.130.0110.02816.19
5.6.120.0050.04516.33
5.6.110.0030.02516.33
5.6.100.0070.03516.30
5.6.90.0060.03016.36
5.6.80.0040.02215.75
5.6.70.0090.02515.70
5.6.60.0120.03815.84
5.6.50.0070.02516.08
5.6.40.0050.03615.94
5.6.30.0090.01815.74
5.6.20.0080.03016.01
5.6.10.0050.04315.89
5.6.00.0030.04415.97
5.5.380.0060.00010.98
5.5.370.0030.00911.15
5.5.360.0040.00411.21
5.5.350.0200.02315.70
5.5.340.0050.03214.33
5.5.330.0020.02914.53
5.5.320.0090.02514.60
5.5.310.0100.04014.37
5.5.300.0080.03814.61
5.5.290.0080.02514.59
5.5.280.0070.03814.56
5.5.270.0050.03014.44
5.5.260.0060.02514.51
5.5.250.0050.03814.41
5.5.240.0000.02714.14
5.5.230.0080.02214.15
5.5.220.0100.02314.06
5.5.210.0100.03014.23
5.5.200.0070.02714.18
5.5.190.0060.02314.05
5.5.180.0050.02614.21
5.5.170.0000.00811.11
5.5.160.0100.03414.19
5.5.150.0100.03014.19
5.5.140.0080.03714.08
5.5.130.0020.02314.08
5.5.120.0050.02114.15
5.5.110.0020.02414.09
5.5.100.0050.03314.13
5.5.90.0050.04514.08
5.5.80.0110.03814.14
5.5.70.0100.03713.92
5.5.60.0070.03514.04
5.5.50.0030.03513.99
5.5.40.0070.02714.02
5.5.30.0030.04514.19
5.5.20.0050.02814.05
5.5.10.0030.02513.96
5.5.00.0110.03514.21
5.4.450.0080.02615.11
5.4.440.0030.03115.23
5.4.430.0050.02215.31
5.4.420.0050.02315.23
5.4.410.0050.04215.17
5.4.400.0070.02014.95
5.4.390.0040.04314.97
5.4.380.0050.04014.86
5.4.370.0130.02714.97
5.4.360.0030.03714.85
5.4.350.0100.03814.97
5.4.340.0060.02214.84
5.4.330.0050.00511.11
5.4.320.0070.03215.03
5.4.310.0020.04415.00
5.4.300.0030.04115.01
5.4.290.0070.03214.96
5.4.280.0070.02214.83
5.4.270.0050.02714.96
5.4.260.0020.02614.91
5.4.250.0100.04014.91
5.4.240.0070.03714.90
5.4.230.0050.04415.06
5.4.220.0070.03514.96
5.4.210.0100.03815.14
5.4.200.0130.02814.93
5.4.190.0080.04114.90
5.4.180.0050.04514.87
5.4.170.0050.04314.98
5.4.160.0030.04114.98
5.4.150.0090.02415.03
5.4.140.0050.04213.48
5.4.130.0020.03913.72
5.4.120.0050.04213.62
5.4.110.0030.04313.56
5.4.100.0050.02013.59
5.4.90.0100.02013.74
5.4.80.0060.02013.60
5.4.70.0080.03013.53
5.4.60.0090.03013.63
5.4.50.0080.03513.73
5.4.40.0060.02313.51
5.4.30.0080.01813.67
5.4.20.0020.04613.54
5.4.10.0050.02013.59
5.4.00.0030.02713.42
5.3.290.0050.02612.64
5.3.280.0060.02712.40
5.3.270.0110.03712.52
5.3.260.0050.03712.46
5.3.250.0020.03412.59
5.3.240.0080.03812.32
5.3.230.0030.04112.39
5.3.220.0030.04012.47
5.3.210.0070.02912.41
5.3.200.0030.02912.49
5.3.190.0050.04012.36
5.3.180.0020.02412.54
5.3.170.0060.04012.54
5.3.160.0020.03612.31
5.3.150.0030.03312.49
5.3.140.0020.02512.46
5.3.130.0070.04112.49
5.3.120.0100.03812.47
5.3.110.0080.03412.39
5.3.100.0050.04012.25
5.3.90.0020.04412.15
5.3.80.0020.03712.15
5.3.70.0030.02712.12
5.3.60.0050.04012.20
5.3.50.0050.02212.04
5.3.40.0050.04312.12
5.3.30.0030.02312.15
5.3.20.0030.02312.00
5.3.10.0020.02411.89
5.3.00.0060.03811.91
5.2.170.0000.02010.32
5.2.160.0050.03310.34
5.2.150.0060.03010.35
5.2.140.0020.02510.12
5.2.130.0050.01810.28
5.2.120.0060.01510.22
5.2.110.0070.02010.26
5.2.100.0050.03310.30
5.2.90.0070.03310.18
5.2.80.0070.02710.24
5.2.70.0040.02310.01
5.2.60.0040.02210.03
5.2.50.0050.03010.06
5.2.40.0080.02710.16
5.2.30.0030.03310.11
5.2.20.0030.03610.13
5.2.10.0070.02510.09
5.2.00.0020.02510.00
5.1.60.0030.0189.51
5.1.50.0030.0289.48
5.1.40.0070.0279.51
5.1.30.0080.0289.61
5.1.20.0030.0339.61
5.1.10.0050.0309.57
5.1.00.0050.0299.54
5.0.50.0050.0238.78
5.0.40.0050.0108.72
5.0.30.0000.0228.62
5.0.20.0020.0268.65
5.0.10.0080.0188.56
5.0.00.0020.0258.58
4.4.90.0000.0228.56
4.4.80.0000.0218.56
4.4.70.0050.0188.56
4.4.60.0050.0158.56
4.4.50.0020.0178.56
4.4.40.0040.0178.56
4.4.30.0030.0168.56
4.4.20.0060.0108.56
4.4.10.0030.0158.56
4.4.00.0020.0248.56
4.3.110.0020.0228.56
4.3.100.0000.0218.56
4.3.90.0030.0188.56
4.3.80.0040.0258.56
4.3.70.0020.0088.56
4.3.60.0030.0178.56
4.3.50.0020.0158.56
4.3.40.0030.0268.56
4.3.30.0020.0108.56
4.3.20.0030.0158.56
4.3.10.0020.0178.56
4.3.00.0000.0148.56

preferences:
49.59 ms | 401 KiB | 5 Q