#26571 [Opn->Fbk]: func_get_arg(),func_get_args() fail to give value.

From: Date: Wed, 10 Dec 2003 03:15:49 +0000
Subject: #26571 [Opn->Fbk]: func_get_arg(),func_get_args() fail to give value.
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-51876@lists.php.net to get a copy of this message
ID: 26571 Updated by: alan_k@php.net Reported By: Mentaloid at hotmail dot com -Status: Open +Status: Feedback Bug Type: Scripting Engine problem Operating System: Linux 2.4.22 SMP PHP Version: 4.3.3 New Comment: I cant reproduce this on php5 or php4.3.2-RC Does this exhibit the same problem? php -r 'function test() { print_r(func_get_args()); } test("ffffffff","ffffffff");' Previous Comments: ------------------------------------------------------------------------ [2003-12-09 21:23:50] Mentaloid at hotmail dot com Description: ------------ When passing a string containing 8 bytes that represents hexadecimal data such as 'ffffffff' to a user function that utilizes func_get_arg() or func_get_arg(), values become unavailable (zero length string) while func_num_args() will show that the value existed. Configure Line "'./configure' '--with-mysql=/usr/local/mysql' '--with-ftp' '--enable-sockets' '--with-apxs2=/usr/local/apache2/bin/apxs'" Apache 2.0, standard config + frontpage extensions. Frontpage extensions not active on this virtualhost. Standard INI, with the exception of ASP TAGS. PHPInfo page can be viewed @ http://tko.mentadd.com/ServerControl/control/xxPhpInfo.php Reproduce code: --------------- function binlogdata() { global $DB, $scbinlogtable; $args = func_get_args(); $results = ''; foreach ($args as $key => $value) { if ($key == 0) { $results = $results.'<API>'.$value.'</API>'; } else { $results = $results.'<PARM'.$key.'>'.$value.'</PARM'.$key.'>'; } } return $results; } $fetch['test1'] = 'thisisok'; $fetch['test2'] = 'ffffffff'; echo binlogdata('PlayerLimit',$fetch['test1'],$fetch['test2']); Expected result: ---------------- // The expected result is "<API>PlayerLimit</API><PARM1>thisisok</PARM1><PARM2>ffffffff</PARM2>"; Actual result: -------------- // The actual result is "<API>PlayerLimit</API><PARM1>thisisok</PARM1><PARM2></PARM2>"; ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=26571&edit=1

« previous php.bugs (#51876) next »