ID: 31527
User updated by: zxd at zhangxiaodong dot net
Reported By: zxd at zhangxiaodong dot net
Status: Open
Bug Type: Scripting Engine problem
Operating System: RedHat Linux AS3 2.4.21-20 i686
PHP Version: 5.0.3
New Comment:
use a string instead of Integer can get right result.
eg.
msg_send($qid, 1, $a);
------
msg_send($qid, 1, "$a", false);
------
settype($a,"string");
msg_send($qid, 1, $a, false);
------
$a = "1234"
msg_send($qid, 1, $a, false);
Previous Comments:
------------------------------------------------------------------------
[2005-01-13 06:55:20] zxd at zhangxiaodong dot net
Description:
------------
The type and value of a Integer varible passed to function msg_send
which do not use serialize will be changed after 1 second sleep.
Reproduce code:
---------------
function t18(){
$a = 1234;
$qid = msg_get_queue($a);
// cause core dump
msg_send($qid, 1, $a, false);
sleep(1);
echo "type of a=".gettype($a)."\n";
echo "value of a= {$a}\n";
}
Expected result:
----------------
type of a=integer
value of a=1234
Actual result:
--------------
type of a=integer
value of a= 0
segment falut(core dumped)
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=31527&edit=1