3v4l.org

run code in 500+ PHP versions simultaneously
<?php class A { private static int $a = 6; private static function foo(): int { return 5; } public function run(): void { var_dump($this->foo()); var_dump($this::foo()); var_dump(static::foo()); echo "\n-----------\n"; var_dump($this::$a); var_dump(static::$a); echo "\n-----------\n"; $other = new static(); var_dump($other->foo()); var_dump($other::foo()); } } class B extends A { public static string $a = 'b'; public static function foo(): string { return "a"; } } (new B)->run();

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.0100.00719.52
8.5.20.0090.00920.09
8.5.10.0100.00816.79
8.5.00.0150.00620.18
8.4.180.0150.00719.69
8.4.170.0140.00820.55
8.4.160.0120.01123.50
8.4.150.0080.00416.77
8.4.140.0180.00817.24
8.4.130.0130.00618.48
8.4.120.0120.00824.18
8.4.110.0120.00320.49
8.4.100.0130.00818.93
8.4.90.0110.00920.82
8.4.80.0140.01018.57
8.4.70.0090.00718.82
8.4.60.0150.00818.80
8.4.50.0090.01020.16
8.4.40.0130.00717.76
8.4.30.0120.00618.57
8.4.20.0070.00319.39
8.4.10.0000.00819.47
8.3.300.0120.01120.88
8.3.290.0120.00820.98
8.3.280.0140.00918.41
8.3.270.0080.01116.48
8.3.260.0100.00916.57
8.3.250.0100.00819.01
8.3.240.0100.01017.10
8.3.230.0160.00616.38
8.3.220.0100.00518.68
8.3.210.0090.00916.56
8.3.200.0030.00616.40
8.3.190.0110.00717.38
8.3.180.0120.00620.76
8.3.170.0040.00416.77
8.3.160.0090.00917.13
8.3.150.0160.00316.63
8.3.140.0140.00420.57
8.3.130.0090.00018.49
8.3.120.0050.00520.66
8.3.110.0040.00416.91
8.3.100.0040.00424.06
8.3.90.0050.00326.77
8.3.80.0030.00618.31
8.3.70.0140.00416.37
8.3.60.0110.01116.32
8.3.50.0180.00316.73
8.3.40.0150.00521.60
8.3.30.0150.00618.95
8.2.300.0130.00722.13
8.2.290.0070.00320.48
8.2.280.0140.00518.27
8.2.270.0150.00416.71
8.2.260.0040.00416.58
8.2.250.0040.00418.39
8.2.240.0040.00419.04
8.2.230.0090.00020.94
8.2.220.0100.00737.54
8.2.210.0080.00626.77
8.2.200.0100.00018.31
8.2.190.0120.00418.16
8.2.180.0140.00718.16
8.2.170.0080.00818.81
8.2.160.0170.00020.20
8.1.340.0110.01017.77
8.1.330.0080.01121.92
8.1.320.0130.00617.98
8.1.310.0090.00615.98
8.1.300.0090.00016.20
8.1.290.0070.00330.84
8.1.280.0060.00925.92

preferences:
53.74 ms | 794 KiB | 5 Q