3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Bird { public static $name = 'bird'; public function instance() { return new self(); } public function getName() { return self::$name; } public function name() { return __CLASS__; } } class Eagle extends Bird { public static $name = 'eagle'; public function name() { return __CLASS__; } } var_dump((new Bird)->instance()); //Bird class instance var_dump((new Eagle)->instance()); //Bird class instance var_dump((new Bird)->getName()); //Bird var_dump((new Eagle)->getName()); //Bird

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.4.60.0140.00817.82
8.4.50.0110.00719.47
8.4.40.0130.00517.71
8.4.30.0260.00417.39
8.4.20.0170.00517.55
8.4.10.0150.00619.16
8.3.200.0110.00916.47
8.3.190.0060.00216.30
8.3.180.0090.00418.13
8.3.170.0150.00516.79
8.3.160.0160.00416.14
8.3.150.0170.00516.41
8.3.140.0180.00216.56
8.3.130.0120.00616.54
8.3.120.0110.00716.33
8.3.110.0150.00416.31
8.3.100.0170.00518.20
8.3.90.0170.00316.57
8.3.80.0150.00716.40
8.3.70.0140.00618.09
8.3.60.0190.00416.46
8.3.50.0160.00516.52
8.3.40.0140.00417.25
8.3.30.0100.00617.43
8.3.20.0120.00617.45
8.3.10.0140.00419.04
8.3.00.0090.00219.26
8.2.280.0100.00616.45
8.2.270.0100.00816.59
8.2.260.0250.00616.13
8.2.250.0130.00416.24
8.2.240.0120.00516.19
8.2.230.0120.00518.20
8.2.220.0150.00316.25
8.2.210.0140.00316.21
8.2.200.0120.00416.48
8.2.190.0130.00418.40
8.2.180.0120.00516.42
8.2.170.0160.00517.34
8.2.160.0130.00419.48
8.2.150.0130.00517.63
8.2.140.0130.00619.16
8.2.130.0130.00419.11
8.2.120.0110.00617.41
8.2.110.0130.00519.33
8.2.100.0120.00617.36
8.2.90.0170.00317.59
8.2.80.0250.00817.33
8.2.70.0170.00517.49
8.2.60.0110.00617.45
8.2.50.0140.00417.34
8.2.40.0120.00617.44
8.2.30.0120.00417.36
8.2.20.0120.00517.24
8.2.10.0130.00317.39
8.2.00.0120.00317.21
8.1.320.0120.00315.57

preferences:
32.13 ms | 403 KiB | 5 Q