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 this is not your bug, you can add a comment by following this link.
If this is your bug, but 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

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