@ 2015-12-10T02:00:19Z <?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 {
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.007 0.083 20.23 5.6.16 0.007 0.047 20.57 5.6.15 0.000 0.043 18.19 5.6.14 0.010 0.033 18.28 5.6.13 0.010 0.080 18.27 5.6.12 0.010 0.037 21.13 5.6.11 0.020 0.060 21.05 5.6.10 0.013 0.083 20.96 5.6.9 0.000 0.043 21.11 5.6.8 0.003 0.040 20.54 5.5.30 0.007 0.083 17.98 5.5.29 0.003 0.047 17.95 5.5.28 0.013 0.067 20.82 5.5.27 0.010 0.060 20.65 5.5.26 0.007 0.073 20.98 5.5.25 0.007 0.087 20.72 5.5.24 0.413 0.033 20.20
preferences:dark mode live preview
140.02 ms | 1394 KiB | 7 Q