3v4l.org

run code in 500+ PHP versions simultaneously
<?php class P { /** * @param static[] $a */ public static function f( array $a ):void { } } class C extends P { public function __construct( private int $v ) {} #[Override] public static function f( array $a ):void { foreach ($a as $me) { echo ((string) $me->v) . PHP_EOL; } } } $list = [ new C(1), new C(2), ]; C::f($list);

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.5.30.0130.00619.69
8.5.20.0250.00917.17
8.5.10.0230.00716.57
8.5.00.0190.01216.73
8.4.180.0120.01019.48
8.4.170.0210.01220.44
8.4.160.0210.01120.37
8.4.150.0370.00719.50
8.4.140.0360.00617.48
8.4.130.0370.00717.61
8.4.120.0380.00717.68
8.4.110.0440.00617.68
8.4.100.0390.01117.39
8.4.90.0270.01017.62
8.4.80.0400.00917.51
8.4.70.0350.01317.69
8.4.60.0350.01417.77
8.4.50.0350.01317.79
8.4.40.0380.00917.78
8.4.30.0380.00917.67
8.4.20.0430.00517.61
8.4.10.0410.00917.48
8.3.300.0230.00918.23
8.3.290.0230.00918.16
8.3.280.0320.01018.18
8.3.270.0330.00916.64
8.3.260.0400.00916.44
8.3.250.0370.01116.40
8.3.240.0400.01216.62
8.3.230.0420.00716.46
8.3.220.0400.00816.49
8.3.210.0380.01116.71
8.3.200.0370.01216.61
8.3.190.0350.00816.75
8.3.180.0240.00716.67
8.3.170.0370.00816.54
8.3.160.0430.00816.43
8.3.150.0370.01316.62
8.3.140.0360.01216.40
8.3.130.0340.01016.59
8.3.120.0310.01116.61
8.3.110.0330.01016.57
8.3.100.0400.00816.68
8.3.90.0400.00716.66
8.3.80.0340.01216.48
8.3.70.0410.00516.46
8.3.60.0390.00616.57
8.3.50.0250.01117.48
8.3.40.0390.00517.94
8.3.30.0330.00517.86
8.3.20.0150.00217.89
8.3.10.0100.00718.05
8.3.00.0150.00818.03

preferences:
48.82 ms | 698 KiB | 5 Q