3v4l.org

run code in 300+ PHP versions simultaneously
<?php class string { protected $string = null; public function __construct($string) { $this->string=(string)$string; } public function __toString() { return $this->string; } } echo (new string('foo')).(new string('bar')).PHP_EOL; echo substr(new string('foobar'), 3, 2);

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)
5.6.280.0030.09020.89
5.6.250.0070.07720.64
5.6.240.0000.06020.58
5.6.230.0070.08320.76
5.6.220.0100.08020.56
5.6.210.0100.07320.66
5.6.200.0030.08021.12
5.6.190.0130.05721.04
5.6.180.0030.05721.03
5.6.170.0130.07721.07
5.6.160.0030.08720.97
5.6.150.0130.07721.00
5.6.140.0000.05020.96
5.6.130.0070.08021.09
5.6.120.0070.08321.03
5.6.110.0100.08720.96
5.6.100.0000.05721.00
5.6.90.0070.07320.99
5.6.80.0100.07720.43
5.6.70.0100.07320.27
5.6.60.0100.08020.32
5.6.50.0070.05320.47
5.6.40.0200.06320.43
5.6.30.0030.08320.54
5.6.20.0030.08320.40
5.6.10.0200.07020.41
5.6.00.0070.07320.27
5.5.380.0130.07720.51
5.5.370.0170.07020.50
5.5.360.0100.07720.38
5.5.350.0130.07720.40
5.5.340.0030.05320.92
5.5.330.0030.08320.65
5.5.320.0130.07720.88
5.5.310.0130.07720.94
5.5.300.0070.07320.63
5.5.290.0130.07320.64
5.5.280.0070.08320.84
5.5.270.0100.08020.86
5.5.260.0000.09020.88
5.5.250.0100.07720.71
5.5.240.0130.06720.13
5.5.230.0030.08020.28
5.5.220.0200.06320.24
5.5.210.0070.08020.13
5.5.200.0070.08020.00
5.5.190.0130.07720.21
5.5.180.0100.07020.20
5.5.160.0100.07720.29
5.5.150.0100.06720.25
5.5.140.0100.07319.99
5.5.130.0130.05320.14
5.5.120.0130.07320.28
5.5.110.0100.07720.28
5.5.100.0130.08320.05
5.5.90.0030.06020.02
5.5.80.0130.07320.21
5.5.70.0100.07320.11
5.5.60.0130.04720.07
5.5.50.0100.07720.15
5.5.40.0030.08320.03
5.5.30.0070.07719.99
5.5.20.0030.08020.00
5.5.10.0100.07720.00
5.5.00.0130.03719.99
5.4.450.0030.07719.36
5.4.440.0070.08019.45
5.4.430.0070.08019.46
5.4.420.0100.07019.50
5.4.410.0100.05319.29
5.4.400.0030.07019.04
5.4.390.0070.07719.14
5.4.380.0070.07019.09
5.4.370.0100.04719.14
5.4.360.0170.05319.18
5.4.350.0100.07319.10
5.4.340.0130.06319.13
5.4.320.0000.07719.11
5.4.310.0130.07018.90
5.4.300.0130.07319.18
5.4.290.0030.07719.04
5.4.280.0130.06719.09
5.4.270.0000.06318.90
5.4.260.0000.08019.03
5.4.250.0070.07719.05
5.4.240.0100.07019.04
5.4.230.0000.08318.89
5.4.220.0070.04719.17
5.4.210.0130.07318.87
5.4.200.0130.06719.25
5.4.190.0100.06019.17
5.4.180.0170.07318.87
5.4.170.0100.07319.23
5.4.160.0100.07318.83
5.4.150.0030.04719.01
5.4.140.0130.06316.46
5.4.130.0100.03716.44
5.4.120.0070.06016.21
5.4.110.0070.07016.46
5.4.100.0100.06316.52
5.4.90.0030.07016.32
5.4.80.0200.05716.48
5.4.70.0100.06716.47
5.4.60.0070.07716.46
5.4.50.0100.07016.42
5.4.40.0070.07316.42
5.4.30.0070.04316.45
5.4.20.0130.07016.31
5.4.10.0000.04716.30
5.4.00.0070.07015.88
5.3.290.0070.04714.64
5.3.280.0070.07714.65
5.3.270.0070.08014.63
5.3.260.0070.07314.70
5.3.250.0030.07714.58
5.3.240.0000.03714.67
5.3.230.0000.08014.67
5.3.220.0030.07714.55
5.3.210.0200.06714.57
5.3.200.0000.08014.57
5.3.190.0100.05014.63
5.3.180.0030.07014.62
5.3.170.0100.07714.48
5.3.160.0000.05314.58
5.3.150.0070.05714.57
5.3.140.0030.07014.61
5.3.130.0030.08314.66
5.3.120.0070.07714.66
5.3.110.0100.07714.47
5.3.100.0100.07313.96
5.3.90.0100.06714.05
5.3.80.0070.06314.11
5.3.70.0130.06714.09
5.3.60.0070.06014.02
5.3.50.0030.07713.96
5.3.40.0070.07314.02
5.3.30.0170.06313.90
5.3.20.0030.04313.62
5.3.10.0000.07313.65
5.3.00.0030.07313.74
5.2.170.0030.04311.17
5.2.160.0030.07011.17
5.2.150.0070.06311.14
5.2.140.0070.06311.18
5.2.130.0030.06011.16
5.2.120.0070.06011.12
5.2.110.0030.06711.18
5.2.100.0100.06011.09
5.2.90.0000.06311.14
5.2.80.0030.03311.09
5.2.70.0070.06011.01
5.2.60.0130.05711.04
5.2.50.0070.04711.12
5.2.40.0070.05710.93
5.2.30.0070.06010.91
5.2.20.0030.06310.89
5.2.10.0070.06010.89
5.2.00.0100.05310.81
5.1.60.0000.05710.08
5.1.50.0070.05310.07
5.1.40.0030.04710.07
5.1.30.0070.05710.46
5.1.20.0030.05310.28
5.1.10.0030.05310.17
5.1.00.0030.05710.13
5.0.50.0000.04710.07
5.0.40.0100.04010.07
5.0.30.0030.06310.07
5.0.20.0030.04710.07
5.0.10.0070.04310.07
5.0.00.0000.07010.07
4.4.90.0030.03310.07
4.4.80.0030.03310.07
4.4.70.0030.02710.07
4.4.60.0030.03710.07
4.4.50.0070.03010.07
4.4.40.0000.05710.07
4.4.30.0070.03310.07
4.4.20.0030.03310.07
4.4.10.0070.02710.07
4.4.00.0070.05310.07
4.3.110.0000.03710.07
4.3.100.0030.03310.07
4.3.90.0000.02710.07
4.3.80.0070.05010.07
4.3.70.0070.03310.07
4.3.60.0030.03310.07
4.3.50.0000.03310.07
4.3.40.0030.05310.07
4.3.30.0000.03710.07
4.3.20.0000.03010.07
4.3.10.0000.03710.07
4.3.00.0070.03010.07

preferences:
137.63 ms | 1394 KiB | 7 Q