3v4l.org

run code in 300+ PHP versions simultaneously
<?php class StaticA { public function setEmail($redirect) { $this-> email = $redirect; } static function dosomething(){ $obj = new static; $obj-> email = "e@01art.de"; $obj-> classInfo(); } function classInfo(){ echo get_class(new static). "\n"; echo $this->email. "\n"; } } class StaticB extends StaticA { function test(){ //echo get_class(new self). "\n"; parent::classInfo(); } function doit(){ parent::dosomething(); echo $this->email. "\n"; } function } $object = new StaticB(); $object->setEmail("erno@01art.de"); $object->doit();

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.270.0170.04319.23
5.4.260.0230.04019.02
5.4.250.0130.05719.02
5.4.240.0130.05719.00
5.4.230.0100.05319.22
5.4.220.0100.05718.91
5.4.210.0030.06019.04
5.4.200.0170.06019.09
5.4.190.0130.05019.13
5.4.180.0100.05019.06
5.4.170.0100.05018.98
5.4.160.0030.05718.92
5.4.150.0030.05718.99
5.4.140.0100.04716.74
5.4.130.0130.05016.75
5.4.120.0100.04716.76
5.4.110.0030.05716.75
5.4.100.0130.04316.47
5.4.90.0100.05016.73
5.4.80.0170.04716.73
5.4.70.0030.05316.70
5.4.60.0070.06316.63
5.4.50.0130.05316.66
5.4.40.0100.05016.46
5.4.30.0070.05316.54
5.4.20.0100.05016.41
5.4.10.0130.06716.66
5.4.00.0030.05316.15
5.3.280.0100.05014.73
5.3.270.0100.05714.90
5.3.260.0070.05314.90
5.3.250.0070.06014.88
5.3.240.0170.04014.92
5.3.230.0130.05714.80
5.3.220.0130.04714.80
5.3.210.0000.06314.63
5.3.200.0130.04714.76
5.3.190.0130.04714.86
5.3.180.0070.05314.77
5.3.170.0070.05314.63
5.3.160.0070.05014.75
5.3.150.0130.05014.79
5.3.140.0130.06714.74
5.3.130.0030.05714.82
5.3.120.0030.06014.86
5.3.110.0130.06314.62
5.3.100.0100.07014.27
5.3.90.0100.04713.91
5.3.80.0070.05014.23
5.3.70.0170.06014.20
5.3.60.0070.06314.19
5.3.50.0130.04313.96
5.3.40.0030.05314.01
5.3.30.0030.05013.97
5.3.20.0070.05313.99
5.3.10.0100.04713.88
5.3.00.0030.05313.83

preferences:
140.04 ms | 1394 KiB | 7 Q