ID: 10057
Updated by: sniper
Reported By: [EMAIL PROTECTED]
Old-Status: Open
Status: Closed
Bug Type: Unknown/Other Function
Operating system:
PHP Version: 4.0.2
Assigned To:
Comments:
Previous Comments:
---------------------------------------------------------------------------
[2001-03-29 11:02:08] [EMAIL PROTECTED]
Here's my quickie test.
<?php
function test()
{
var_dump(func_get_arg(0));
}
$mya = array( array(1,2,3), array(3,4,5) );
test("$mya");
test($mya);
?>
string(5) "Array"
array(2) {
[0]=>
array(3) {
[0]=>
int(1)
[1]=>
int(2)
[2]=>
int(3)
}
[1]=>
array(3) {
[0]=>
int(3)
[1]=>
int(4)
[2]=>
int(5)
}
}
As you can see it works just fine(> 4.0.2), you just can't put quotes around it (it
isnt a string after all), which you may be doing.
-Chris
---------------------------------------------------------------------------
[2001-03-29 10:50:43] [EMAIL PROTECTED]
please include a shortest possible self-contained script that reproduces the behavior
---------------------------------------------------------------------------
[2001-03-29 10:38:51] [EMAIL PROTECTED]
When passing an array to a function declared without arguments, the contents of the
array are replaced with 'Array'. It appears somewhere PHP is assigning the argument
to itself literally, which isn't nice :)
thanks,
Dave
System Linux arthur 2.2.14-5.0 #1 Tue Mar 7 21:07:39 EST 2000 i686 unknown
Configure Command './configure' '--with-sybase-ct'
'--with-apache=/usr/local/src/packages/apache_1.3.12' '--enable-track-vars'
'--with-config-path-file=/etc' '--with-pgsql' '--with-mysql=/usr/local/mysql'
---------------------------------------------------------------------------
ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at http://bugs.php.net/?id=10057&edit=2
--
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]