php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #46078 var_dump(int xor int) crash
Submitted: 2008-09-14 19:44 UTC Modified: 2008-09-22 01:00 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: ja dot doma at gmail dot com Assigned:
Status: No Feedback Package: Reproducible crash
PHP Version: 5.2.6 OS: Windows
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: ja dot doma at gmail dot com
New email:
PHP Version: OS:

 

 [2008-09-14 19:44 UTC] ja dot doma at gmail dot com
Description:
------------
PHP CLI (console mode) crashes when executing:

var_dump(120 xor 111); //or any other number

reproducible: always


//this works fine
$ch = 120 xor 111;
var_dump($ch);

//this works too
var_dump(120);
var_dump(120 + 3);


weird because other numerical expressions do not cause the crash, only xor.

Reproduce code:
---------------
1) make test.php
2) put <?php var_dump(120 xor 111); ?> into the file
3) php test.php

Expected result:
----------------
int(120)


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-09-14 20:07 UTC] ja dot doma at gmail dot com
This is clearly 'xor' problem, since this cause crash too:

$ch = (1 xor 3);
var_dump($ch);

//this not
$ch = 1 xor 3;
var_dump($ch); //result will be 1, expecting 2
 [2008-09-14 22:15 UTC] felipe@php.net
Thank you for this bug report. To properly diagnose the problem, we
need a backtrace to see what is happening behind the scenes. To
find out how to generate a backtrace, please read
http://bugs.php.net/bugs-generating-backtrace.php for *NIX and
http://bugs.php.net/bugs-generating-backtrace-win32.php for Win32

Once you have generated a backtrace, please submit it to this bug
report and change the status back to "Open". Thank you for helping
us make PHP better.


 [2008-09-22 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sun May 11 03:01:27 2025 UTC