From:             pornel at despammed dot com
Operating system: *
PHP version:      4CVS-2005-11-27 (snap)
PHP Bug Type:     Feature/Change Request
Bug description:  func_get_args don't work as expected in assert

Description:
------------
func_get_args, func_num_args, func_get_arg functions executed inside
assert('') work on assert's arguments, and not on arguments of function
assert is in.

Because assert transparently handles variables scope, one could expect
that it works transparently on arguments as well.

With all PHP functions accepting variable number of arguments and only
basic type hints, such assertions are quite important.

Reproduce code:
---------------

function test()
{
assert('func_num_args()==2');
}

test('one','two');


Expected result:
----------------
nothing

Actual result:
--------------
assertion fails

-- 
Edit bug report at http://bugs.php.net/?id=35434&edit=1
-- 
Try a CVS snapshot (php4):   http://bugs.php.net/fix.php?id=35434&r=trysnapshot4
Try a CVS snapshot (php5.0): 
http://bugs.php.net/fix.php?id=35434&r=trysnapshot50
Try a CVS snapshot (php5.1): 
http://bugs.php.net/fix.php?id=35434&r=trysnapshot51
Fixed in CVS:                http://bugs.php.net/fix.php?id=35434&r=fixedcvs
Fixed in release:            http://bugs.php.net/fix.php?id=35434&r=alreadyfixed
Need backtrace:              http://bugs.php.net/fix.php?id=35434&r=needtrace
Need Reproduce Script:       http://bugs.php.net/fix.php?id=35434&r=needscript
Try newer version:           http://bugs.php.net/fix.php?id=35434&r=oldversion
Not developer issue:         http://bugs.php.net/fix.php?id=35434&r=support
Expected behavior:           http://bugs.php.net/fix.php?id=35434&r=notwrong
Not enough info:             
http://bugs.php.net/fix.php?id=35434&r=notenoughinfo
Submitted twice:             
http://bugs.php.net/fix.php?id=35434&r=submittedtwice
register_globals:            http://bugs.php.net/fix.php?id=35434&r=globals
PHP 3 support discontinued:  http://bugs.php.net/fix.php?id=35434&r=php3
Daylight Savings:            http://bugs.php.net/fix.php?id=35434&r=dst
IIS Stability:               http://bugs.php.net/fix.php?id=35434&r=isapi
Install GNU Sed:             http://bugs.php.net/fix.php?id=35434&r=gnused
Floating point limitations:  http://bugs.php.net/fix.php?id=35434&r=float
No Zend Extensions:          http://bugs.php.net/fix.php?id=35434&r=nozend
MySQL Configuration Error:   http://bugs.php.net/fix.php?id=35434&r=mysqlcfg

Reply via email to