summaryrefslogtreecommitdiff
path: root/ext/reflection/tests/ReflectionFunction_getClosure_error.phpt
blob: 9a963e41ca71b151dfb7ad176395383c02019a56 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
--TEST--
Test ReflectionFunction::getClosure() function : error functionality
--FILE--
<?php
/* Prototype  : public mixed ReflectionFunction::getClosure()
 * Description: Returns a dynamically created closure for the function
 * Source code: ext/reflection/php_reflection.c
 * Alias to functions:
 */

echo "*** Testing ReflectionFunction::getClosure() : error conditions ***\n";

function foo()
{
	var_dump( "Inside foo function" );
}

$func = new ReflectionFunction( 'foo' );
$closure = $func->getClosure('bar');

?>
===DONE===
--EXPECTF--
*** Testing ReflectionFunction::getClosure() : error conditions ***

Warning: ReflectionFunction::getClosure() expects exactly 0 parameters, 1 given in %s on line %d
===DONE===