3v4l.org

run code in 300+ PHP versions simultaneously
<?php class AbstractFoo { protected static $state; public static setState($state) { static:$state = $state; } public static getState() { return static::$state; } } class Foo extends AbstractFoo {} class Bar extends AbstractFoo {} $Foo = new Foo; $bar = new Bar; AbstractFoo::setState('abstract'); var_dump($bar::getState()); $foo::setState('foo'); var_dump($bar::getState());

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)
5.4.200.0110.04612.38
5.4.190.0130.06012.38
5.4.180.0140.04112.38
5.4.170.0140.04412.39
5.4.160.0130.04712.38
5.4.150.0220.06512.38
5.4.140.0110.04512.07
5.4.130.0120.04912.05
5.4.120.0140.05012.02
5.4.110.0120.04712.02
5.4.100.0180.04212.01
5.4.90.0120.04612.02
5.4.80.0150.04312.01
5.4.70.0220.05812.01
5.4.60.0130.03812.01
5.4.50.0100.03812.01
5.4.40.0110.03812.00
5.4.30.0090.04111.99
5.4.20.0150.04111.99
5.4.10.0240.05812.00
5.4.00.0160.03711.49
5.3.270.0120.04412.72
5.3.260.0140.04312.72
5.3.250.0110.04212.72
5.3.240.0120.04112.72
5.3.230.0120.04712.71
5.3.220.0130.04712.68
5.3.210.0130.04712.68
5.3.200.0090.04712.68
5.3.190.0120.04312.68
5.3.180.0150.03812.67
5.3.170.0140.03812.67
5.3.160.0200.05212.67
5.3.150.0240.05912.67
5.3.140.0110.04212.66
5.3.130.0100.04312.66
5.3.120.0100.04312.66
5.3.110.0140.04312.66
5.3.100.0140.03912.12
5.3.90.0140.03912.09
5.3.80.0090.04512.08
5.3.70.0190.06512.08
5.3.60.0130.04412.07
5.3.50.0140.04212.01
5.3.40.0120.04512.01
5.3.30.0130.04511.97
5.3.20.0100.04611.75
5.3.10.0130.04311.72
5.3.00.0100.04611.70

preferences:
143.33 ms | 935 KiB | 8 Q