|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #57707 Big-endian vs Little-endian
Submitted: 2007-06-18 05:31 UTC Modified: 2013-02-18 00:35 UTC
Avg. Score:4.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: glenn at europlan dot no Assigned: val (profile)
Status: No Feedback Package: bcompiler (PECL)
PHP Version: Irrelevant OS: Irrelevant
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2007-06-18 05:31 UTC] glenn at europlan dot no
bcompiler is in most cases used to hide the php code. This is working perfectly.

The only thing I don't like today, is that it doesn't handle endians the same way on different platforms.

Problem: If I compile a php file on a Intel processor, it wont work on Sparc processor (since sparc expect the file to be in big-endian format).

Workaround is to have to set of php files. One for Intel, and one for Sparc.

What I would prefer: The bcompiler sees that the processor is a big-endian processor, it would then convert the bytecode to big-endian style if it sess that the php file is compiled in a little-endinan format.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2007-06-21 05:35 UTC] glenn at europlan dot no
Os is irrelevant..
 [2009-12-04 13:41 UTC]
Could you suggest some defines that can tell if the system is big-endian (like __x86_64__ that is used to tell of 64-bit)?

I'll probably make bcompiler to always read/write it in little-endian format as of 1.0. But I care about 32-bit vs 64-bit more, which is no so easy to solve...
 [2013-02-18 00:35 UTC] pecl-dev at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Sun May 16 19:01:23 2021 UTC