3v4l.org

run code in 300+ PHP versions simultaneously
<?php class MyClass { private $val = 1; public function getVal() { return $this->val; } } trait MyTrait { public function cry() { echo "nya"; } } interface MyInterface { public function say(); } abstract MyAbstract { abstract public function shout(); } function check($class_name) { echo "================ ", $class_name, " ================= \n"; $h = new \ReflectionClass($class_name); echo "abstract? ", $h->isAbstract() ? "true" : "false" , "\n"; echo "trait? ", $h->isTrait() ? "true" : "false" , "\n"; echo "interface? ", $h->isInterface() ? "true" : "false" , "\n"; echo "実体化可能? ", $h->isInstantiable() ? "true" : "false" , "\n"; } check("MyClass"); check("MyTrait"); check("MyInterface"); check("MyAbstract");

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)
7.0.00.0030.09320.08
5.6.160.0070.06020.49
5.6.150.0070.03718.14
5.6.140.0000.06318.14
5.6.130.0030.08718.15
5.6.120.0000.06021.10
5.6.110.0170.08021.00
5.6.100.0000.06021.11
5.6.90.0030.04720.95
5.6.80.0070.07720.38
5.5.300.0200.07017.98
5.5.290.0170.07017.97
5.5.280.0130.07020.88
5.5.270.0100.08320.80
5.5.260.0100.06320.68
5.5.250.0030.06720.70
5.5.240.4200.04020.08

preferences:
139.63 ms | 1394 KiB | 7 Q