File:  [ELWIX - Embedded LightWeight unIX -] / embedaddon / php / ext / standard / tests / general_functions / bug41970.phpt
Revision 1.1: download - view: text, annotated - select for diffs - revision graph
Tue Feb 21 23:48:04 2012 UTC (12 years, 5 months ago) by misho
CVS tags: MAIN, HEAD
Initial revision

--TEST--
Bug #41970 (call_user_func_*() leaks on failure)
--FILE--
<?php

$a = array(4,3,2);

var_dump(call_user_func_array("sort", array($a)));
var_dump(call_user_func_array("strlen", array($a)));
var_dump(call_user_func("sort", $a));
var_dump(call_user_func("strlen", $a));

echo "Done\n";
?>
--EXPECTF--
Warning: Parameter 1 to sort() expected to be a reference, value given in %sbug41970.php on line 5
NULL

Warning: strlen() expects parameter 1 to be string, array given in %sbug41970.php on line 6
NULL

Warning: Parameter 1 to sort() expected to be a reference, value given in %sbug41970.php on line 7
NULL

Warning: strlen() expects parameter 1 to be string, array given in %sbug41970.php on line 8
NULL
Done

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>