3v4l.org

run code in 300+ PHP versions simultaneously
<?php class X { public static function test(X $x) { var_dump($x); if (version_compare(PHP_VERSION, '8.1') >= 0) { var_dump(serialize($x)); } } } class Y extends X { private $value = 1; private function __debugInfo() { return array('value' => $this->value); } private function __sleep() { return array('value'); } private function __destruct() {} } X::test(new X()); X::test(new Y());

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.120.0100.01020.66
8.4.110.0110.00922.21
8.4.100.0130.00717.59
8.4.90.0090.01218.03
8.4.80.0050.00318.90
8.4.70.0060.00718.29
8.4.60.0130.00518.75
8.4.50.0140.00919.66
8.4.40.0070.01317.73
8.4.30.0130.00623.65
8.4.20.0120.00819.88
8.4.10.0030.00619.66
8.3.250.0110.00818.89
8.3.240.0080.01116.84
8.3.230.0130.00716.45
8.3.220.0120.00618.76
8.3.210.0120.00716.88
8.3.200.0050.00416.90
8.3.190.0100.00917.21
8.3.180.0120.00416.76
8.3.170.0070.01017.10
8.3.160.0120.00619.03
8.3.150.0060.00917.29
8.3.140.0110.00720.82
8.3.130.0060.00318.62
8.3.120.0190.00619.90
8.3.110.0140.00718.56
8.3.100.0170.01218.54
8.3.90.0170.00517.24
8.3.80.0220.00316.60
8.3.70.0200.00516.50
8.3.60.0180.00417.18
8.3.50.0180.00516.50
8.3.40.0220.00118.08
8.3.30.0160.00617.36
8.3.20.0190.00217.33
8.3.10.0150.00617.36
8.3.00.0060.00818.61
8.2.290.0040.00420.29
8.2.280.0120.00818.31
8.2.270.0160.00316.58
8.2.260.0070.01017.29
8.2.250.0080.00016.74
8.2.240.0100.00318.56
8.2.230.0150.00516.45
8.2.220.0140.00716.50
8.2.210.0160.00417.04
8.2.200.0150.00416.48
8.2.190.0160.00516.39
8.2.180.0150.00316.55
8.2.170.0160.00517.54
8.2.160.0160.00418.03
8.2.150.0140.00417.25
8.2.140.0160.00417.29
8.2.130.0160.00517.37
8.2.120.0250.00217.30
8.2.110.0190.00717.38
8.2.100.0160.00617.50
8.2.90.0160.00817.31
8.2.80.0170.00517.77
8.2.70.0200.00217.38
8.2.60.0190.00517.34
8.2.50.0200.00317.48
8.2.40.0190.00418.05
8.2.30.0160.00517.15
8.2.20.0150.00517.85
8.2.10.0130.00617.13
8.2.00.0130.00517.17
8.1.330.0120.00718.33
8.1.320.0100.00916.28
8.1.310.0090.00918.21
8.1.300.0050.00718.36
8.1.290.0120.00716.44
8.1.280.0120.00716.63
8.1.270.0190.00217.04
8.1.260.0150.00617.06
8.1.250.0160.00416.91
8.1.240.0100.00717.13
8.1.230.0160.00217.01
8.1.220.0150.00317.49
8.1.210.0160.00217.02
8.1.200.0140.00417.48
8.1.190.0140.00417.08
8.1.180.0140.00416.95
8.1.170.0140.00516.94
8.1.160.0100.00716.97
8.1.150.0130.00516.99
8.1.140.0160.00217.10
8.1.130.0110.00816.95
8.1.120.0160.00217.64
8.1.110.0140.00417.08
8.1.100.0120.00716.90
8.1.90.0170.00418.20
8.1.80.0110.00816.97
8.1.70.0150.00517.00
8.1.60.0170.00417.17
8.1.50.0140.00417.10
8.1.40.0130.00617.13
8.1.30.0140.00417.35
8.1.20.0120.00717.13
8.1.10.0140.00516.93
8.1.00.0160.00617.09

preferences:
25.37 ms | 403 KiB | 5 Q