@ 2015-12-10T02:00:39Z <?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");
Enable javascript to submit You have javascript disabled. You will not be able to edit any code.
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).
Version System time (s) User time (s) Memory (MiB) 7.0.0 0.003 0.093 20.08 5.6.16 0.007 0.060 20.49 5.6.15 0.007 0.037 18.14 5.6.14 0.000 0.063 18.14 5.6.13 0.003 0.087 18.15 5.6.12 0.000 0.060 21.10 5.6.11 0.017 0.080 21.00 5.6.10 0.000 0.060 21.11 5.6.9 0.003 0.047 20.95 5.6.8 0.007 0.077 20.38 5.5.30 0.020 0.070 17.98 5.5.29 0.017 0.070 17.97 5.5.28 0.013 0.070 20.88 5.5.27 0.010 0.083 20.80 5.5.26 0.010 0.063 20.68 5.5.25 0.003 0.067 20.70 5.5.24 0.420 0.040 20.08
preferences:dark mode live preview
139.63 ms | 1394 KiB | 7 Q