Annotation of embedaddon/php/ext/reflection/tests/ReflectionFunction_construct.001.phpt, revision 1.1.1.1
1.1 misho 1: --TEST--
2: ReflectionFunction constructor errors
3: --CREDITS--
4: Robin Fernandes <robinf@php.net>
5: Steve Seear <stevseea@php.net>
6: --FILE--
7: <?php
8:
9: $a = new ReflectionFunction(array(1, 2, 3));
10: try {
11: $a = new ReflectionFunction('nonExistentFunction');
12: } catch (Exception $e) {
13: echo $e->getMessage();
14: }
15: $a = new ReflectionFunction();
16: $a = new ReflectionFunction(1, 2);
17: ?>
18: --EXPECTF--
19: Warning: ReflectionFunction::__construct() expects parameter 1 to be string, array given in %s on line %d
20: Function nonExistentFunction() does not exist
21: Warning: ReflectionFunction::__construct() expects exactly 1 parameter, 0 given in %s on line %d
22:
23: Warning: ReflectionFunction::__construct() expects exactly 1 parameter, 2 given in %s on line %d
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>