3v4l.org

run code in 300+ PHP versions simultaneously
<?php enum E { case A; case B; } class Foo { public $x = E::A; public $y = static function () { return 'x'; }; public $z = [static function () { return 'z1'; }, static fn () => 'z2']; } print_r((new Foo)->x);

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.2.100.0310.00317.69
8.2.90.0300.00317.69
8.2.80.0290.00617.69
8.2.70.0310.00717.69
8.2.60.0250.01017.69
8.2.50.0210.01017.69
8.2.40.0210.01117.69
8.2.30.0250.00617.69
8.2.20.0310.00317.69
8.2.10.0250.00817.69
8.2.00.0310.00017.69
8.1.230.0130.00719.01
8.1.220.0230.00917.69
8.1.210.0320.00017.69
8.1.200.0270.00317.69
8.1.190.0240.00717.69
8.1.180.0280.00317.69
8.1.170.0260.00717.69
8.1.160.0340.00017.69
8.1.150.0340.00017.69
8.1.140.0300.00517.69
8.1.130.0210.00917.69
8.1.120.0240.00717.69
8.1.110.0310.00017.69
8.1.100.0220.00917.69
8.1.90.0220.00917.69
8.1.80.0290.00317.69
8.1.70.0290.00417.69
8.1.60.0190.01217.69
8.1.50.0300.00017.69
8.1.40.0310.00317.69
8.1.30.0220.00617.69
8.1.20.0220.00617.69
8.1.10.0270.00317.69
8.1.00.0280.00217.69
8.0.300.0250.00917.69
8.0.290.0320.00717.69
8.0.280.0260.00417.69
8.0.270.0250.00417.69
8.0.260.0210.00917.69
8.0.250.0230.00517.69
8.0.240.0290.00517.69
8.0.230.0260.00317.69
8.0.220.0270.00317.69
8.0.210.0270.00417.69
8.0.200.0240.00617.69
8.0.190.0250.00317.69
8.0.180.0300.00017.69
8.0.170.0190.00817.69
8.0.160.0240.00717.69
8.0.150.0290.00017.69
8.0.140.0240.00517.69
8.0.130.0310.00017.69
8.0.120.0230.00717.69
8.0.110.0280.00017.69
8.0.100.0350.00417.69
8.0.90.0290.00017.69
8.0.80.0200.01017.69
8.0.70.0250.00617.69
8.0.60.0280.00617.69
8.0.50.0200.00917.69
8.0.30.0280.00317.69
8.0.20.0220.00617.69
8.0.10.0250.00317.69

preferences:
163.45 ms | 997 KiB | 7 Q