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); var_dump(explode(new string(':'), new string('foo:bar')));

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.0070.06720.91
5.6.210.0100.06320.55
5.6.200.0000.04718.13
5.6.190.0030.04320.48
5.6.180.0630.04020.46
5.6.170.0170.04020.47
5.6.160.0100.06720.61
5.6.150.0070.08018.12
5.6.140.0200.06718.13
5.6.130.0030.04018.19
5.6.120.0130.05320.99
5.6.110.0100.08021.02
5.6.100.0100.05720.98
5.6.90.0100.06021.08
5.6.80.0100.08020.41
5.5.350.0270.07320.36
5.5.340.0070.08317.98
5.5.330.0030.05720.47
5.5.320.0000.04720.30
5.5.310.0130.08720.30
5.5.300.0030.07717.95
5.5.290.0070.06317.98
5.5.280.0100.08020.69
5.5.270.0000.05720.74
5.5.260.0100.06720.73
5.5.250.0030.08020.58
5.5.240.0230.07020.16
5.4.450.0270.07019.32
5.4.440.0200.07019.20
5.4.430.0270.03019.31
5.4.420.0130.04319.26
5.4.410.0300.06019.21
5.4.400.0270.05018.96
5.4.390.0200.03718.86
5.4.380.0300.06318.87
5.4.370.0200.06319.31
5.4.360.0230.07019.23
5.4.350.0300.06719.26
5.4.340.0230.07319.09
5.4.320.0270.07018.98
5.4.310.0200.06019.25
5.4.300.0230.05719.16
5.4.290.0270.04319.22
5.4.280.0230.06319.09
5.4.270.0270.06719.22
5.4.260.0300.07318.94
5.4.250.0200.08018.94
5.4.240.0330.06319.24
5.4.230.0130.05719.14
5.4.220.0270.06019.14
5.4.210.0200.07718.88
5.4.200.0400.03319.30
5.4.190.0270.06019.18
5.4.180.0230.06319.15
5.4.170.0300.04319.30
5.4.160.0170.06718.92
5.4.150.0400.05018.97
5.4.140.0200.06016.29
5.4.130.0330.04716.50
5.4.120.0400.05316.51
5.4.110.0300.06716.55
5.4.100.0300.07016.55
5.4.90.0300.04716.36
5.4.80.0270.06316.49
5.4.70.0200.05716.52
5.4.60.0200.06716.43
5.4.50.0330.04716.48
5.4.40.0230.06716.43
5.4.30.0200.06316.43
5.4.20.0300.06316.50
5.4.10.0070.05016.59
5.4.00.0270.06715.83
5.3.290.0330.05714.56
5.3.280.0200.04314.60
5.3.270.0370.06014.61
5.3.260.0300.06014.61
5.3.250.0170.07314.60
5.3.240.0230.04714.69
5.3.230.0400.06314.57
5.3.220.0270.07014.62
5.3.210.0230.07014.47
5.3.200.0200.06714.72
5.3.190.0230.07714.57
5.3.180.0170.06014.48
5.3.170.0270.05014.50
5.3.160.0270.06314.78
5.3.150.0170.04714.57
5.3.140.0270.07014.55
5.3.130.0200.06014.63
5.3.120.0270.04014.77
5.3.110.0170.04714.54
5.3.100.0270.05714.09
5.3.90.0300.06313.93
5.3.80.0230.07014.00
5.3.70.0130.05714.03
5.3.60.0230.07014.05
5.3.50.0370.03013.95
5.3.40.0130.08013.87
5.3.30.0200.05014.07
5.3.20.0230.04313.70
5.3.10.0300.05313.56
5.3.00.0270.06713.62
5.2.170.0170.06011.99
5.2.160.0130.05311.99
5.2.150.0230.05311.99
5.2.140.0300.04711.99
5.2.130.0130.04711.99
5.2.120.0170.05011.99
5.2.110.0130.06311.99
5.2.100.0200.04711.99
5.2.90.0200.05011.99
5.2.80.0200.06011.99
5.2.70.0230.05711.99
5.2.60.0300.04711.99
5.2.50.0300.04711.99
5.2.40.0230.04711.99
5.2.30.0170.04711.99
5.2.20.0230.03311.99
5.2.10.0230.05011.99
5.2.00.0170.03711.99
5.1.60.0170.02711.99
5.1.50.0100.03011.99
5.1.40.0230.02311.99
5.1.30.0200.05011.99
5.1.20.0170.03011.99
5.1.10.0170.05311.99
5.1.00.0200.03711.99
5.0.50.0070.03711.99
5.0.40.0170.03311.99
5.0.30.0200.05311.99
5.0.20.0100.03311.99
5.0.10.0100.03011.99
5.0.00.0130.04011.99
4.4.90.0100.03311.99
4.4.80.0030.04311.99
4.4.70.0130.01311.99
4.4.60.0070.03711.99
4.4.50.0070.03711.99
4.4.40.0070.03311.99
4.4.30.0170.03011.99
4.4.20.0070.02011.99
4.4.10.0070.03711.99
4.4.00.0100.04011.99
4.3.110.0130.03711.99
4.3.100.0100.03011.99
4.3.90.0130.02011.99
4.3.80.0170.02311.99
4.3.70.0130.03011.99
4.3.60.0070.03011.99
4.3.50.0100.03711.99
4.3.40.0100.04011.99
4.3.30.0070.03011.99
4.3.20.0030.03711.99
4.3.10.0070.03711.99
4.3.00.0070.03011.99

preferences:
143.05 ms | 1394 KiB | 7 Q