3v4l.org

run code in 300+ PHP versions simultaneously
<?php class foo { var $my_public = array(); //forward php4 to constructor function foo() { $this->my_public[] = 'php4 constructor'; return $this->__construct(); } //constructor php5 function __construct() { $this->my_public[] = 'php4 constructor'; register_shutdown_function(array(&$this, "__destruct")); } function dump() { print_r($this->my_public; } } $test = new foo();

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.4.270.0130.04718.77
5.4.260.0130.04718.99
5.4.250.0070.05718.93
5.4.240.0100.07019.00
5.4.230.0070.05018.84
5.4.220.0030.06018.65
5.4.210.0030.05318.79
5.4.200.0030.05318.76
5.4.190.0130.06719.09
5.4.180.0070.05319.00
5.4.170.0070.07718.66
5.4.160.0170.04018.82
5.4.150.0130.05318.92
5.4.140.0100.06016.66
5.4.130.0030.05016.48
5.4.120.0100.04716.55
5.4.110.0170.04016.62
5.4.100.0100.04716.54
5.4.90.0030.05016.57
5.4.80.0030.05016.55
5.4.70.0170.04016.53
5.4.60.0000.05316.39
5.4.50.0030.05016.31
5.4.40.0130.06716.36
5.4.30.0100.04716.38
5.4.20.0100.05016.36
5.4.10.0170.04716.52
5.4.00.0070.04715.89
5.3.280.0070.05014.76
5.3.270.0100.05314.71
5.3.260.0270.03314.75
5.3.250.0100.05014.58
5.3.240.0100.05014.83
5.3.230.0070.05014.68
5.3.220.0070.05314.75
5.3.210.0000.06014.54
5.3.200.0130.05314.60
5.3.190.0100.04714.56
5.3.180.0100.04714.65
5.3.170.0100.04714.75
5.3.160.0030.05314.42
5.3.150.0100.04714.40
5.3.140.0070.05014.55
5.3.130.0100.05014.74
5.3.120.0100.05014.69
5.3.110.0100.05714.46
5.3.100.0100.04714.12
5.3.90.0100.04713.92
5.3.80.0070.04713.99
5.3.70.0070.05014.24
5.3.60.0070.05014.07
5.3.50.0130.04014.14
5.3.40.0070.06013.78
5.3.30.0100.04314.00
5.3.20.0030.05713.77
5.3.10.0000.05013.81
5.3.00.0100.04713.72
5.2.170.0100.03711.12
5.2.160.0030.05311.36
5.2.150.0000.06311.23
5.2.140.0070.04011.23
5.2.130.0130.03311.18
5.2.120.0030.04011.32
5.2.110.0030.04011.12
5.2.100.0070.04011.17
5.2.90.0070.04011.08
5.2.80.0000.04711.28
5.2.70.0030.05711.16
5.2.60.0130.04311.21
5.2.50.0030.04011.01
5.2.40.0070.03711.22
5.2.30.0030.04010.96
5.2.20.0030.04010.82
5.2.10.0070.03710.95
5.2.00.0000.05010.57
5.1.60.0070.03010.04
5.1.50.0070.0309.99
5.1.40.0130.02710.08
5.1.30.0030.03710.50
5.1.20.0000.04010.42
5.1.10.0070.03010.16
5.1.00.0070.03310.13
5.0.50.0030.0278.56
5.0.40.0030.0278.37
5.0.30.0030.0538.26
5.0.20.0070.0208.15
5.0.10.0000.0308.41
5.0.00.0070.0408.22
4.4.90.0130.0136.91
4.4.80.0000.0236.91
4.4.70.0000.0236.91
4.4.60.0030.0206.91
4.4.50.0030.0206.91
4.4.40.0070.0406.91
4.4.30.0030.0206.91
4.4.20.0030.0206.91
4.4.10.0000.0236.91
4.4.00.0030.0336.91
4.3.110.0100.0136.91
4.3.100.0000.0236.91
4.3.90.0000.0236.91
4.3.80.0030.0306.91
4.3.70.0030.0206.91
4.3.60.0000.0206.91
4.3.50.0030.0236.91
4.3.40.0000.0336.91
4.3.30.0000.0236.91
4.3.20.0030.0206.91
4.3.10.0030.0206.91
4.3.00.0070.0306.62

preferences:
142.14 ms | 1394 KiB | 7 Q