3v4l.org

run code in 300+ PHP versions simultaneously
<?php class ExtendThis{ private $foobar = [1,2,3]; public function setFoobar($value) { $this->foobar = $value; } public printItem($index){ echo($this->foobar[$index]); } } class AChild extends ExtendThis{ } $inst = new AChild; $inst->setFoobar([4,5,6]); $inst->printItem(0);

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.230.0120.05312.38
5.4.220.0250.08012.38
5.4.210.0170.04612.39
5.4.200.0310.10012.39
5.4.190.0120.05412.38
5.4.180.0370.12212.38
5.4.170.0250.07412.39
5.4.160.0150.04812.38
5.4.150.0330.09512.38
5.4.140.0230.04412.07
5.4.130.0160.05512.05
5.4.120.0220.04312.02
5.4.110.0160.04312.01
5.4.100.0460.09012.02
5.4.90.0210.04812.01
5.4.80.0390.08612.02
5.4.70.0190.04212.01
5.4.60.0240.09612.01
5.4.50.0160.04912.01
5.4.40.0190.04112.00
5.4.30.0110.04811.99
5.4.20.0160.04911.99
5.4.10.0260.09512.00
5.4.00.0120.04611.48
5.3.280.0150.05212.70
5.3.270.0190.04412.73
5.3.260.0210.04812.72
5.3.250.0180.05612.71
5.3.240.0180.04512.72
5.3.230.0160.05012.71
5.3.220.0170.04412.68
5.3.210.0190.04412.68
5.3.200.0160.04712.68
5.3.190.0220.07012.68
5.3.180.0160.04412.68
5.3.170.0180.04312.67
5.3.160.0200.04612.67
5.3.150.0170.04912.67
5.3.140.0210.04512.66
5.3.130.0210.04412.66
5.3.120.0170.04612.66
5.3.110.0410.08112.66
5.3.100.0140.04712.12
5.3.90.0240.04812.08
5.3.80.0120.05012.08
5.3.70.0210.04912.07
5.3.60.0170.04512.07
5.3.50.0250.07312.00
5.3.40.0200.04512.00
5.3.30.0220.04211.96
5.3.20.0190.04211.74
5.3.10.0190.04511.70
5.3.00.0150.04811.68

preferences:
134.27 ms | 1394 KiB | 7 Q