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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: chrism at four dot net
New email:
PHP Version: OS:

 

 [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

Pull Requests

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-2026 The PHP Group
All rights reserved.
Last updated: Wed Jun 17 05:00:01 2026 UTC