mirror of
https://github.com/php/php-src.git
synced 2025-01-13 14:34:48 +08:00
32 lines
660 B
PHP
32 lines
660 B
PHP
--TEST--
|
|
ReflectionParameter::__construct(): Invalid method as constructor
|
|
--FILE--
|
|
<?php
|
|
|
|
// Invalid class name
|
|
try {
|
|
new ReflectionParameter (array ('A', 'b'), 0);
|
|
} catch (ReflectionException $e) { echo $e->getMessage ()."\n"; }
|
|
|
|
// Invalid class method
|
|
try {
|
|
new ReflectionParameter (array ('C', 'b'), 0);
|
|
} catch (ReflectionException $e) { echo $e->getMessage ()."\n"; }
|
|
|
|
// Invalid object method
|
|
try {
|
|
new ReflectionParameter (array (new C, 'b'), 0);
|
|
} catch (ReflectionException $e) { echo $e->getMessage ()."\n"; }
|
|
|
|
echo "Done.\n";
|
|
|
|
class C {
|
|
}
|
|
|
|
?>
|
|
--EXPECTF--
|
|
Class A does not exist
|
|
Method C::b() does not exist
|
|
Method C::b() does not exist
|
|
Done.
|