3v4l.org

run code in 300+ PHP versions simultaneously
<?php abstract class Service { protected $_var = 'S'; public static function test() { echo static::$_var . PHP_EOL; } } class ServiceA extends Service { protected static $_var = 'A'; } class ServiceAB extends ServiceA { protected static $_var = 'AB'; } class ServiceC extends Service { } ServiceA::test(); ServiceAB::test(); ServiceC::test();

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.5.70.0630.03019.28
5.5.60.0670.03719.28
5.5.50.0100.05019.23
5.5.40.0200.06319.44
5.5.30.0230.06019.46
5.5.20.0300.06719.46
5.5.10.0270.07319.42
5.5.00.0270.05319.30
5.4.230.0130.06018.84
5.4.220.0330.06318.85
5.4.210.0200.03719.14
5.4.200.0200.04319.11
5.4.190.0230.06319.14
5.4.180.0230.07019.24
5.4.170.0270.04019.14
5.4.160.0230.03319.23
5.4.150.0230.03719.13
5.4.140.0370.05016.42
5.4.130.0170.07716.46
5.4.120.0300.06716.44
5.4.110.0230.04316.55
5.4.100.0200.07316.47
5.4.90.0300.07016.59
5.4.80.0130.04016.34
5.4.70.0170.07016.46
5.4.60.0130.04016.41
5.4.50.0200.04316.39
5.4.40.0200.05316.53
5.4.30.0130.06716.40
5.4.20.0300.06316.37
5.4.10.0170.05716.54
5.4.00.0300.06015.94
5.3.280.0170.05314.63
5.3.270.0230.07314.61
5.3.260.0300.03014.52
5.3.250.0270.07014.66
5.3.240.0270.05014.61
5.3.230.0330.06314.67
5.3.220.0170.05314.59
5.3.210.0270.06714.59
5.3.200.0230.06314.60
5.3.190.0200.05714.59
5.3.180.0170.04714.56
5.3.170.0230.07014.72
5.3.160.0270.07314.72
5.3.150.0230.04314.45
5.3.140.0370.05714.52
5.3.130.0270.06714.58
5.3.120.0230.07314.70
5.3.110.0270.06314.60
5.3.100.0170.05013.95
5.3.90.0270.07014.03
5.3.80.0270.06314.18
5.3.70.0230.06014.02
5.3.60.0270.06314.04
5.3.50.0100.06013.95
5.3.40.0270.05714.02
5.3.30.0230.05313.85
5.3.20.0230.07313.66
5.3.10.0300.03713.81
5.3.00.0230.07013.64

preferences:
139.68 ms | 1394 KiB | 7 Q