3v4l.org

run code in 300+ PHP versions simultaneously
<?php /*class ExpressionCalculator { public function calc($expression) { $items = explode('', $expression); return $result; } } $calc = new ExpressionCalculator(); echo $calc->calc('5 1 2 + 4 * + 3 -');*/ $string = "This is\tan example\nstring"; /* Use tab and newline as tokenizing characters as well */ $tok = strtok($string, " \n\t"); while ($tok !== false) { echo "Word=$tok<br />"; $tok = strtok(" \n\t"); }

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.0070.01018.43
8.3.50.0170.00321.20
8.3.40.0090.00618.71
8.3.30.0100.00320.09
8.3.20.0000.00820.33
8.3.10.0080.00021.82
8.3.00.0040.00422.44
8.2.180.0090.00616.50
8.2.170.0000.01522.96
8.2.160.0000.01422.31
8.2.150.0050.00324.18
8.2.140.0040.00424.66
8.2.130.0000.00826.16
8.2.120.0080.00020.80
8.2.110.0060.00322.37
8.2.100.0040.00817.50
8.2.90.0000.00719.22
8.2.80.0030.00519.41
8.2.70.0100.00017.63
8.2.60.0000.00818.05
8.2.50.0040.00418.07
8.2.40.0040.00419.88
8.2.30.0040.00419.50
8.2.20.0000.00717.66
8.2.10.0060.00317.75
8.2.00.0040.00417.73
8.1.280.0140.00325.92
8.1.270.0080.00023.99
8.1.260.0040.00426.35
8.1.250.0080.00028.09
8.1.240.0000.01022.56
8.1.230.0070.00417.48
8.1.220.0000.00817.79
8.1.210.0050.00318.77
8.1.200.0060.00317.35
8.1.190.0040.00417.40
8.1.180.0000.00818.10
8.1.170.0030.00618.50
8.1.160.0000.00718.89
8.1.150.0050.00518.51
8.1.140.0050.00317.34
8.1.130.0040.00417.70
8.1.120.0080.00017.32
8.1.110.0000.00817.43
8.1.100.0030.00617.40
8.1.90.0030.00517.43
8.1.80.0000.00817.41
8.1.70.0030.00317.37
8.1.60.0060.00317.37
8.1.50.0000.00717.31
8.1.40.0050.00217.35
8.1.30.0080.00017.54
8.1.20.0040.00417.57
8.1.10.0040.00417.40
8.1.00.0070.00317.44
8.0.300.0030.00518.77
8.0.290.0000.00717.13
8.0.280.0030.00518.35
8.0.270.0070.00017.17
8.0.260.0030.00316.82
8.0.250.0000.00616.85
8.0.240.0000.00816.96
8.0.230.0030.00316.83
8.0.220.0000.00716.80
8.0.210.0030.00316.91
8.0.200.0000.00816.99
8.0.190.0000.00717.02
8.0.180.0000.00816.96
8.0.170.0000.00716.82
8.0.160.0030.00316.94
8.0.150.0000.00716.88
8.0.140.0030.00616.75
8.0.130.0030.00313.31
8.0.120.0050.00316.86
8.0.110.0040.00416.77
8.0.100.0070.00016.79
8.0.90.0000.00716.91
8.0.80.0120.00316.78
8.0.70.0070.00016.81
8.0.60.0050.00316.67
8.0.50.0040.00416.89
8.0.30.0140.00916.85
8.0.20.0060.01217.40
8.0.10.0040.00416.97
8.0.00.0070.01016.78
7.4.330.0000.00515.00
7.4.320.0040.00416.62
7.4.300.0000.00616.51
7.4.290.0050.00216.41
7.4.280.0030.00316.59
7.4.270.0030.00316.51
7.4.260.0030.00313.22
7.4.250.0000.00716.47
7.4.240.0020.00616.62
7.4.230.0030.00316.36
7.4.220.0070.01016.45
7.4.210.0080.00716.52
7.4.200.0030.00316.35
7.4.190.0000.00716.48
7.4.160.0140.00316.52
7.4.150.0110.00517.40
7.4.140.0140.00517.86
7.4.130.0100.00716.43
7.4.120.0090.00816.37
7.4.110.0090.01016.35
7.4.100.0040.01416.56
7.4.90.0100.00616.40
7.4.80.0100.00719.39
7.4.70.0080.00816.52
7.4.60.0120.00316.38
7.4.50.0040.00416.57
7.4.40.0060.01022.77
7.4.30.0120.00916.46
7.4.00.0070.01015.07
7.3.330.0050.00013.00
7.3.320.0060.00013.14
7.3.310.0050.00316.21
7.3.300.0030.00316.06
7.3.290.0150.00316.17
7.3.280.0050.01116.23
7.3.270.0130.00317.40
7.3.260.0120.01016.26
7.3.250.0140.00416.31
7.3.240.0030.01316.30
7.3.230.0070.01016.54
7.3.210.0130.01016.55
7.3.200.0150.00619.39
7.3.190.0090.00616.40
7.3.180.0060.01216.38
7.3.170.0140.00716.40
7.3.160.0120.00816.35
7.3.120.0000.01514.63
7.3.10.0090.00316.25
7.3.00.0000.00816.44
7.2.330.0070.01016.43
7.2.320.0120.01016.57
7.2.310.0050.01116.52
7.2.300.0100.00716.59
7.2.290.0100.01316.40
7.2.130.0060.00916.89
7.2.120.0040.00716.84
7.2.110.0000.00916.82
7.2.100.0000.00916.81
7.2.90.0040.00716.55
7.2.80.0090.00616.82
7.2.70.0100.00016.59
7.2.60.0070.00716.92
7.2.50.0060.00616.87
7.2.40.0110.00416.71
7.2.30.0050.00316.98
7.2.20.0040.00816.65
7.2.10.0030.00716.81
7.2.00.0030.01018.20
7.1.250.0050.00315.70
7.1.200.0030.01015.73
7.1.100.0030.00717.93
7.1.70.0000.00717.13
7.1.60.0120.01219.32
7.1.50.0140.01016.92
7.1.00.0070.06322.54
7.0.200.0000.01016.82
7.0.140.0000.07721.96
7.0.100.0200.05319.88
7.0.90.0070.08019.95
7.0.80.0470.09019.92
7.0.70.0070.07719.88
7.0.60.0030.04320.05
7.0.50.0330.04020.32
7.0.40.0030.04320.14
7.0.30.0030.04320.05
7.0.20.0070.04320.11
7.0.10.0000.05019.95
7.0.00.0030.04320.09
5.6.280.0100.06720.90
5.6.250.0070.07720.59
5.6.240.0000.05320.51
5.6.230.0070.04720.65
5.6.220.0030.07320.70
5.6.210.0030.04720.60
5.6.200.0000.04721.01
5.6.190.0100.03721.02
5.6.180.0030.04321.13
5.6.170.0030.04321.04
5.6.160.0130.03320.95
5.6.150.0100.06021.07
5.6.140.0030.04020.95
5.6.130.0030.05721.04
5.6.120.0070.05321.04
5.6.110.0130.03720.99
5.6.100.0030.03721.00
5.6.90.0000.04020.94
5.6.80.0030.04020.34
5.6.70.0000.04320.39
5.6.60.0030.04320.40
5.6.50.0030.04020.37
5.6.40.0030.05720.40
5.6.30.0030.04020.39
5.6.20.0130.02720.45
5.6.10.0030.04020.39
5.6.00.0030.04020.36
5.5.380.0000.08020.41
5.5.370.0130.07320.39
5.5.360.0070.05020.44
5.5.350.0170.04320.45
5.5.340.0030.05020.88
5.5.330.0170.03320.64
5.5.320.0030.04320.86
5.5.310.0070.04320.86
5.5.300.0030.04020.82
5.5.290.0030.04320.84
5.5.280.0070.06020.64
5.5.270.0130.03720.89
5.5.260.0100.04020.86
5.5.250.0030.03720.73
5.5.240.0030.04720.20
5.5.230.0000.04320.30
5.5.220.0030.03720.23
5.5.210.0100.03020.23
5.5.200.0000.04320.18
5.5.190.0030.04020.14
5.5.180.0100.03720.25
5.5.160.0030.04320.28
5.5.150.0000.04320.22
5.5.140.0070.04020.06
5.5.130.0030.04020.22
5.5.120.0030.04020.07
5.5.110.0070.03320.15
5.5.100.0000.03720.01
5.5.90.0030.03720.05
5.5.80.0000.07320.14
5.5.70.0070.05720.06
5.5.60.0100.02720.10
5.5.50.0000.08020.19
5.5.40.0070.08020.04
5.5.30.0170.06720.09
5.5.20.0130.07320.05
5.5.10.0200.06020.01
5.5.00.0070.08020.02
5.4.450.0070.04019.45
5.4.440.0000.05719.47
5.4.430.0030.05019.42
5.4.420.0070.03719.38
5.4.410.0170.03719.36
5.4.400.0000.04318.95
5.4.390.0100.02718.95
5.4.380.0030.03318.76
5.4.370.0100.03318.98
5.4.360.0070.03719.02
5.4.350.0070.03319.00
5.4.340.0030.03319.12
5.4.320.0000.03719.20
5.4.310.0000.04019.01
5.4.300.0000.05318.96
5.4.290.0030.03319.12
5.4.280.0000.04019.04
5.4.270.0030.04018.82
5.4.260.0070.03319.02
5.4.250.0000.04019.09
5.4.240.0030.04019.04
5.4.230.0130.03319.05
5.4.220.0070.03718.85
5.4.210.0070.07318.80
5.4.200.0100.06319.04
5.4.190.0130.08019.11
5.4.180.0030.06719.13
5.4.170.0070.04318.95
5.4.160.0100.07019.02
5.4.150.0100.06719.12
5.4.140.0100.06716.38
5.4.130.0100.07316.33
5.4.120.0030.07316.28
5.4.110.0000.07316.40
5.4.100.0000.05716.24
5.4.90.0070.04316.22
5.4.80.0100.07016.20
5.4.70.0030.08316.19
5.4.60.0100.07016.36
5.4.50.0030.07716.41
5.4.40.0130.04716.37
5.4.30.0070.07016.39
5.4.20.0070.07316.18
5.4.10.0070.07016.23
5.4.00.0070.07015.73
5.3.290.0000.04714.60
5.3.280.0030.04314.58
5.3.270.0070.07714.55
5.3.260.0070.08014.46
5.3.250.0200.06014.61
5.3.240.0000.07314.59
5.3.230.0170.05714.59
5.3.220.0070.07714.52
5.3.210.0030.08314.52
5.3.200.0070.03714.52
5.3.190.0100.07314.55
5.3.180.0070.07714.55
5.3.170.0100.07014.38
5.3.160.0130.07014.54
5.3.150.0070.07014.39
5.3.140.0030.08314.49
5.3.130.0070.06314.50
5.3.120.0070.07714.53
5.3.110.0170.07014.50
5.3.100.0070.07714.02
5.3.90.0030.07313.88
5.3.80.0100.07713.92
5.3.70.0030.07313.87
5.3.60.0100.05713.86
5.3.50.0070.07013.85
5.3.40.0070.06313.92
5.3.30.0000.04313.89
5.3.20.0100.06713.55
5.3.10.0070.05713.65
5.3.00.0170.04013.63
5.2.170.0070.06311.14
5.2.160.0030.06311.10
5.2.150.0000.04711.10
5.2.140.0100.06311.10
5.2.130.0100.05711.13
5.2.120.0070.06310.94
5.2.110.0070.06010.94
5.2.100.0100.05311.09
5.2.90.0030.05310.89
5.2.80.0030.06711.09
5.2.70.0100.06310.94
5.2.60.0100.03311.09
5.2.50.0130.05711.08
5.2.40.0000.05010.78
5.2.30.0100.03010.93
5.2.20.0030.05711.01
5.2.10.0130.04010.91
5.2.00.0100.06310.71
5.1.60.0030.0539.87
5.1.50.0030.0309.87
5.1.40.0070.03310.00
5.1.30.0030.04010.36
5.1.20.0030.05310.39
5.1.10.0100.04010.05
5.1.00.0130.04710.11
5.0.50.0100.0338.59
5.0.40.0070.0378.52
5.0.30.0030.0678.52
5.0.20.0030.0438.52
5.0.10.0070.0408.52
5.0.00.0000.0438.52
4.4.90.0000.0278.52
4.4.80.0000.0378.52
4.4.70.0070.0338.52
4.4.60.0000.0378.52
4.4.50.0000.0408.52
4.4.40.0030.0438.52
4.4.30.0000.0338.52
4.4.20.0030.0308.52
4.4.10.0000.0238.52
4.4.00.0030.0578.52
4.3.110.0030.0338.52
4.3.100.0000.0378.52
4.3.90.0070.0338.52
4.3.80.0000.0478.52
4.3.70.0030.0378.52
4.3.60.0070.0308.52
4.3.50.0030.0378.52
4.3.40.0000.0538.52
4.3.30.0070.0308.52
4.3.20.0070.0208.52
4.3.10.0000.0408.52
4.3.00.0030.0338.52

preferences:
48.62 ms | 401 KiB | 5 Q