php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #4358 new XOR breaks compatibility with php3
Submitted: 2000-05-09 15:08 UTC Modified: 2000-06-09 15:37 UTC
From: chrism at four dot net Assigned:
Status: Closed Package: Scripting Engine problem
PHP Version: 4.0 Release Candidate 1 OS: freebsd3.3
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:
47 - 28 = ?
Subscribe to this entry?

 
 [2000-05-09 15:08 UTC] chrism at four dot net
<?php

$result = (98 xor 200);

echo gettype($result) . "\n";

echo $result . "\n";
?>

twinhead% php3.0.14 -q xor.php
integer
170
twinhead% php -q xor.php
boolean

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-06-09 15:37 UTC] andi at cvs dot php dot net
Both in PHP 3 and PHP 4 bitwise xor is ^ and logical xor is xor.
I think you meant to use ^.
Try: $result = (98 ^ 200);

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Jun 30 19:01:29 2024 UTC