|
|
|
@ -3,8 +3,6 @@ invoke with non object or null value |
|
|
|
--FILE-- |
|
|
|
<?php |
|
|
|
|
|
|
|
include_once dirname(__FILE__).'/exception.inc'; |
|
|
|
|
|
|
|
class a { |
|
|
|
function a(){ |
|
|
|
} |
|
|
|
@ -14,26 +12,26 @@ class b { |
|
|
|
|
|
|
|
$b = new b(); |
|
|
|
|
|
|
|
$a=new Reflection_Class("a"); |
|
|
|
$a=new ReflectionClass("a"); |
|
|
|
$m=$a->getMethod("a"); |
|
|
|
|
|
|
|
try { |
|
|
|
$m->invoke(null); |
|
|
|
} catch (reflection_exception $E) { |
|
|
|
} catch (ReflectionException $E) { |
|
|
|
echo $E->getMessage()."\n"; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
try { |
|
|
|
$m->invoke($b); |
|
|
|
} catch (reflection_exception $E) { |
|
|
|
} catch (ReflectionException $E) { |
|
|
|
echo $E->getMessage()."\n"; |
|
|
|
} |
|
|
|
|
|
|
|
$b = new a(); |
|
|
|
try { |
|
|
|
$m->invoke($b); |
|
|
|
} catch (reflection_exception $E) { |
|
|
|
} catch (ReflectionException $E) { |
|
|
|
echo $E->getMessage()."\n"; |
|
|
|
} |
|
|
|
|
|
|
|
|