3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Papa { public function __construct() { $args = func_get_args(); echo print_r($args, true); } } class Kiddo extends Papa { public function __construct() { $args = func_get_args(); $parent_class = 'parent'; if (version_compare(PHP_VERSION, '5.5.0') >= 0) { $parent_class = parent::class; } call_user_func_array(array($parent_class, '__construct'), $args); } } $x = new Papa('bee'); $y = new Kiddo('hello', 'me');

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)
8.3.140.0030.00617.00
8.3.130.0030.00518.64
8.3.120.0090.00318.73
8.3.110.0040.00820.94
8.3.100.0040.00416.50
8.3.90.0090.00916.68
8.3.80.0040.00818.43
8.3.70.0070.01418.18
8.3.60.0110.01116.50
8.3.50.0150.00016.42
8.3.40.0100.00320.17
8.3.30.0100.00320.69
8.3.20.0070.00024.18
8.3.10.0050.00324.66
8.3.00.0040.00426.16
8.2.250.0060.00316.60
8.2.240.0040.01517.16
8.2.230.0040.00422.58
8.2.220.0000.01124.06
8.2.210.0140.00426.77
8.2.200.0080.00418.31
8.2.190.0090.00916.58
8.2.180.0150.00616.63
8.2.170.0040.01122.96
8.2.160.0100.00322.96
8.2.150.0040.00425.66
8.2.140.0040.00424.66
8.2.130.0050.00226.16
8.2.120.0000.00819.48
8.2.110.0110.00022.18
8.2.100.0060.00320.44
8.2.60.0060.00817.38
8.1.300.0100.01017.88
8.1.290.0090.00018.88
8.1.280.0090.00625.92
8.1.270.0050.00224.66
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0060.00318.90
8.1.230.0000.00918.49
5.4.00.0050.00416.52

preferences:
47.17 ms | 403 KiB | 5 Q