3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { static protected $count = 0; protected $data = [1,2,3,5]; public function data() { return $this->data; } } class B extends A { protected $data = [5,6,7,89]; public function data() { self::$count++; echo self::$count, ""\n"; if (self::$count === 10) return; return static::data(); } } $b = new B(); var_dump($b->data());

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.0.110.0330.06020.24
7.0.100.0430.05020.29
7.0.90.0300.07720.31
7.0.80.0230.06020.27
7.0.70.0300.05320.34
7.0.60.0330.05320.25
7.0.50.0300.07020.21
7.0.41.8630.05020.19
7.0.30.0370.06020.28
7.0.20.0370.05020.36
7.0.10.0400.04720.24
7.0.00.0470.04020.32
5.6.260.0170.05020.86
5.6.250.0100.05720.88
5.6.240.0130.05721.08
5.6.230.0170.05020.89
5.6.220.0170.05320.99
5.6.210.0030.06020.98
5.6.200.0070.05720.95
5.6.190.0130.06321.02
5.6.180.0100.06321.05
5.6.170.0170.05321.01
5.6.160.0030.06320.81
5.6.150.0070.06021.03
5.6.140.0100.06320.81
5.6.130.0030.06320.76
5.6.120.0100.06020.84
5.6.110.0130.06320.83
5.6.100.0170.06720.83
5.6.90.0130.05720.82
5.6.80.0130.07020.48
5.6.70.0130.06720.21
5.6.60.0130.07020.35
5.6.50.0130.07020.22
5.6.40.0100.07720.13
5.6.30.0170.06720.46
5.6.20.0170.05320.43
5.6.10.0170.04320.25
5.6.00.0070.05720.39

preferences:
142.96 ms | 1394 KiB | 7 Q