3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Backup_Config { public $a = ''; function __construct() { $this->a = time(); } } class Backup extends Backup_Config { public $b = 'test'; function __construct() { parent::__construct(); echo __CLASS__ . ':' . $this->a . '<BR>'; } public function foo () { $helper = new Backup_Helper(); echo __FUNCTION__ . ':' . $this->a . '<BR>'; $helper->bar(); } } class Backup_Helper extends Backup { public function bar() { echo __FUNCTION__ . ':' . $this->a . ' and ' . $this->b . '<BR>'; } } $init = new Backup(); $init->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)
7.2.110.0290.00316.20
7.2.60.0000.01116.78
7.2.00.0060.00619.50
7.1.200.0060.00315.63
7.1.100.0060.01318.05
7.1.70.0060.00617.14
7.1.60.0110.00417.01
7.1.50.0040.00817.01
7.1.40.0060.00617.01
7.1.30.0040.01117.01
7.1.20.0110.00317.01
7.1.10.0000.00817.01
7.1.00.0030.00917.01
7.0.200.0060.00317.01
7.0.190.0000.00717.01
7.0.180.0040.00717.01
7.0.170.0000.00917.01
7.0.160.0000.00917.01
7.0.150.0000.00817.01
7.0.140.0000.01517.01
7.0.130.0030.00517.01
7.0.120.0000.00817.01
7.0.110.0000.00717.01
7.0.100.0040.00417.01
7.0.90.0000.00817.01
7.0.80.0000.01017.01
7.0.70.0030.00717.01
7.0.60.0040.00417.01
7.0.50.0000.00817.01
7.0.40.0000.00717.01
7.0.30.0000.00817.01
7.0.20.0080.01117.01
7.0.10.0030.00717.01
7.0.00.0000.01117.01

preferences:
26.67 ms | 402 KiB | 5 Q