php.net |  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
Votes:1
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
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 — but make sure to vote on the bug!
Your email address:
MUST BE VALID
Solve the problem:
41 - 22 = ?
Subscribe to this entry?

 
 [2007-06-18 05:31 UTC] glenn at europlan dot no
Description:
------------
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.




Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-06-21 05:35 UTC] glenn at europlan dot no
Os is irrelevant..
 [2009-12-04 13:41 UTC] val@php.net
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-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 26 16:01:29 2024 UTC