php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #5382 & does not work with unsigned int32
Submitted: 2000-07-05 17:15 UTC Modified: 2000-08-20 02:48 UTC
From: casper at steinhauer dot dk Assigned:
Status: Closed Package: Scripting Engine problem
PHP Version: 4.0 Release Candidate 1 OS: Linux version 2.4.0-test2
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
13 - 10 = ?
Subscribe to this entry?

 
 [2000-07-05 17:15 UTC] casper at steinhauer dot dk
#!/usr/local/bin/php -q
<?php

echo "here the & goes good\n";
$a=884330816;
print ($a);
print ("\n");
print (($a-256*256*256*128) & 255);
print ("\n");
print (($a) & 255);
print ("\n");

echo "here it goes bad\n";
$a=4076863680;
print ($a);
print ("\n");
print (($a-256*256*256*128) & 255);
print ("\n");
print (($a) & 255); # $a is an unsigned int32 when it is printed!
print ("\n");

?>

It works in PHP3

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-07-27 22:24 UTC] waldschrott@php.net
Please verify that it?s still happening using the latest version of PHP (release 4.0.1pl2 or CVS).
 [2000-08-20 02:48 UTC] sniper@php.net
No feedback from user.

--Jani
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Apr 30 10:01:29 2024 UTC