Find this useful? Enter your email to receive occasional updates for securing PHP code.

Signing you up...

Thank you for signing up!

PHP Decode

--TEST-- ReflectionObject::IsInstantiable() - basic function test --FILE-- <?php class C {..

Decoded Output download

--TEST--
ReflectionObject::IsInstantiable() - basic function test
--FILE--
<?php
class C {
}

interface iface {
    function f1();
}

class ifaceImpl implements iface {
    function f1() {}
}

abstract class abstractClass {
    function f1() {}
    abstract function f2();
}

class D extends abstractClass {
    function f2() {}
}

$classes = array("C", "ifaceImpl", "D");

foreach($classes  as $class ) {
    $ro = new ReflectionObject(new $class);
    echo "Is $class instantiable?  ";
    var_dump($ro->IsInstantiable());
}
?>
--EXPECT--
Is C instantiable?  bool(true)
Is ifaceImpl instantiable?  bool(true)
Is D instantiable?  bool(true)

Did this file decode correctly?

Original Code

--TEST--
ReflectionObject::IsInstantiable() - basic function test
--FILE--
<?php
class C {
}

interface iface {
    function f1();
}

class ifaceImpl implements iface {
    function f1() {}
}

abstract class abstractClass {
    function f1() {}
    abstract function f2();
}

class D extends abstractClass {
    function f2() {}
}

$classes = array("C", "ifaceImpl", "D");

foreach($classes  as $class ) {
    $ro = new ReflectionObject(new $class);
    echo "Is $class instantiable?  ";
    var_dump($ro->IsInstantiable());
}
?>
--EXPECT--
Is C instantiable?  bool(true)
Is ifaceImpl instantiable?  bool(true)
Is D instantiable?  bool(true)

Function Calls

None

Variables

None

Stats

MD5 5cc4ab0d4ab3d29323c32121f41ca826
Eval Count 0
Decode Time 85 ms