cvs: ZendEngine2 /tests 020.phpt

From: Date: Thu, 12 Jul 2007 09:29:50 +0000
Subject: cvs: ZendEngine2 /tests 020.phpt
Groups: php.zend-engine.cvs 
Request: Send a blank email to php-zend-engine-cvs+get-5896@lists.php.net to get a copy of this message
tony2001 Thu Jul 12 09:29:50 2007 UTC Modified files: /ZendEngine2/tests 020.phpt Log: add new test http://cvs.php.net/viewvc.cgi/ZendEngine2/tests/020.phpt?r1=1.1&r2=1.2&diff_format=u Index: ZendEngine2/tests/020.phpt diff -u /dev/null ZendEngine2/tests/020.phpt:1.2 --- /dev/null Thu Jul 12 09:29:50 2007 +++ ZendEngine2/tests/020.phpt Thu Jul 12 09:29:50 2007 @@ -0,0 +1,31 @@ +--TEST-- +func_get_arg() invalid usage +--FILE-- +<?php + +var_dump(func_get_arg(1,2,3)); +var_dump(func_get_arg(1)); +var_dump(func_get_arg()); + +function bar() { + var_dump(func_get_arg(1)); +} + +function foo() { + bar(func_get_arg(1)); +} + +foo(1,2); + +echo "Done\n"; +?> +--EXPECTF-- +bool(false) + +Warning: func_get_arg(): Called from the global scope - no function context in %s on line %d +bool(false) +bool(false) + +Warning: func_get_arg(): Argument 1 not passed to function in %s on line %d +bool(false) +Done

« previous php.zend-engine.cvs (#5896) next »