#31527 [Opn]: msg_send wrong serialize on Integer

From: Date: Thu, 13 Jan 2005 06:04:30 +0000
Subject: #31527 [Opn]: msg_send wrong serialize on Integer
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-72047@lists.php.net to get a copy of this message
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

« previous php.bugs (#72047) next »