3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { private $vars = array(); public function __construct() {} public function __get($id) { return array_key_exists($id, $this->vars) ? $this->vars[$id] : null; } public function __set($id, $val) { $this->vars[$id] = $val; } } $ta = microtime(true); $ma = memory_get_usage(); $c = new A(); for ($i=0;$i<10000;$i++) { $a = clone $c; $a->klucz = 'wartosc'.$i; $a->hash = md5(microtime(true)); } $tb = microtime(true); $mb = memory_get_usage(); $tc = $tb-$ta; $mc = $mb-$ma; var_dump($tc, $mc);

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)
7.4.00.0060.02215.07
7.3.120.0070.02714.83
7.3.110.0070.01715.13
7.3.100.0070.01814.88
7.3.90.0100.01315.01
7.3.80.0000.02615.05
7.3.70.0130.01614.65
7.3.60.0060.01614.98
7.3.50.0100.01614.99
7.3.40.0070.02015.07
7.3.30.0040.01814.52
7.3.20.0060.02216.64
7.3.10.0110.01816.44
7.3.00.0090.01616.55
7.2.250.0060.02914.94
7.2.240.0030.03315.14
7.2.230.0030.02415.01
7.2.220.0000.02115.25
7.2.210.0070.01715.13
7.2.200.0100.01615.20
7.2.190.0040.02215.20
7.2.180.0030.02614.84
7.2.170.0030.02514.88
7.2.130.0110.02416.68
7.2.120.0080.02416.67
7.2.110.0110.02016.50
7.2.100.0130.02216.79
7.2.90.0110.02116.72
7.2.80.0100.02216.57
7.2.70.0110.02216.76
7.2.60.0090.02516.76
7.2.50.0120.02316.79
7.2.40.0080.02616.64
7.2.30.0090.02216.72
7.2.20.0070.02316.64
7.2.10.0100.02116.69
7.2.00.0080.02017.58
7.1.330.0100.02015.74
7.1.320.0030.02615.98
7.1.310.0090.01915.53
7.1.300.0070.02315.99
7.1.290.0070.02115.73
7.1.280.0070.02115.89
7.1.270.0070.02415.70
7.1.260.0000.02615.82
7.1.250.0080.02315.53
7.1.100.0200.02017.96
7.1.70.0030.01916.93
7.1.60.0070.03919.30
7.1.50.0100.03317.10
7.1.00.0070.09022.33
7.0.200.0030.01516.64
7.0.60.0130.07321.76
7.0.50.0070.10317.93
7.0.40.0030.07720.24
7.0.30.0330.06720.15
7.0.20.0270.05320.23
7.0.10.0100.09020.09
7.0.00.0070.05320.25
5.6.280.0030.09020.82
5.6.210.0030.11020.69
5.6.200.0100.05018.16
5.6.190.0200.10020.64
5.6.180.0500.09020.63
5.6.170.0170.05720.71
5.6.160.0030.06020.54
5.6.150.0030.06018.14
5.6.140.0030.08018.27
5.6.130.0070.09718.11
5.6.120.0030.05721.00
5.6.110.0130.07320.96
5.6.100.0070.11021.07
5.6.90.0100.10021.01
5.6.80.0100.10720.48
5.5.350.0100.08020.33
5.5.340.0030.07017.95
5.5.330.0070.05720.29
5.5.320.0470.07020.26
5.5.310.0230.08720.50
5.5.300.0130.09717.92
5.5.290.0100.07717.98
5.5.280.0030.06320.89
5.5.270.0100.09320.96
5.5.260.0100.11020.95
5.5.250.0100.09720.68
5.5.240.0100.04720.17

preferences:
32.1 ms | 400 KiB | 5 Q