Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Register Tags Active Topics RSS Search Mark Forums Read

Sponsored Links



What is the PHP bytecode Compiler?

Software Development


Reply
 
Thread Tools Search this Thread
  #1  
Old 09-03-2010
Member
 
Join Date: Jul 2006
Posts: 128
What is the PHP bytecode Compiler?
  

Hi folks,
After completing some basic part of coding in PHP programming language, I have now turned to the compiler part of PHP. Since, I am new to this topic I don't have enough knowledge about it. So thought to ask the query to you guys, since you explain anything very neatly.!! Please tell me what is the PHP bytecode Compiler? Since I am new please provide me the detailed information.!!

__________________
"Every man is guilty of all the good he did not do". - Voltaire
Reply With Quote
  #2  
Old 09-03-2010
Member
 
Join Date: Jul 2006
Posts: 289
Re: What is the PHP bytecode Compiler?

PHP bytecode Compiler is also known as Bcompiler. Bcompiler has been written for various reasons, some of them are as follows :
  1. To encode entire script in a proprietary PHP application
  2. To encode some functions / classes in a proprietary PHP application
  3. To enable the production of php-gtk applications that can be used in desktop applications, without needing a php.exe.
  4. To make the transition easily from PHP to C
The paragraph on code protection is somewhat misleading. While it is correct that the exact source code can not be recreated this does not offer anything in terms of code protection people into a false sense of security.
__________________
Signatures reduce available bandwidth
Reply With Quote
  #3  
Old 09-03-2010
Member
 
Join Date: Mar 2008
Posts: 349
Re: What is the PHP bytecode Compiler?

There are many scenarios where it is better to use the BCompiler. The first reason is possible using the functions bcompiler_write_header (), bcompiler_write_file () and bcompiler_write_footer (). Bytecode files can be compressed or not messages. To use the generated bytecode, you can simply include it with instructions to include or require. The second possible reason is using the functions bcompiler_write_header (), bcompiler_write_class (), bcompiler_write_footer (), bcompiler_read (), and bcompiler_load (). Bytecode files can be compressed or not written. The function bcompiler_load () reads the compressed bytecode , which represents one third the size of the original file.
Reply With Quote
  #4  
Old 09-03-2010
Member
 
Join Date: Aug 2006
Posts: 227
Re: What is the PHP bytecode Compiler?

To create EXE type files, bcompiler must be used with a modified sapi file or a version of PHP has been compiled as a shared library. In this case, bcompiler reads the compressed bytecode from the end of the EXE. Bcompiler can improve performance by about 30% when using uncompressed bytecodes only. But keep in mind that uncompressed bytecode can be a size 5 times larger than the original source code. Using compressed bytecode take less space, but the relief requires more time to analyze the source code. Also, does Bcompiler any bytecode optimization.From a viewpoint of protection of code, we can say that it is absolutely impossible to recreate the exact source code, such as origin, and without the original comments. However, it is possible to recover data from a file bytecode Bcompiler - thus include not only your personal passwords.
__________________
I do to dead flowers what people at morgues do to dead people. Suck all the moisture out, dip them in plastic, paint them up pretty and put them in a nice frame.
Reply With Quote
  #5  
Old 09-03-2010
Member
 
Join Date: Aug 2006
Posts: 235
Re: What is the PHP bytecode Compiler?

The following are functions of the bcompiler, along with the short description :
  • bcompiler_load_exe - Reads and creates classes from a bcompiler exe
  • bcompiler_load - Reads and creates classes from a file compressed in bzip2
  • bcompiler_parse_class - Reads the bytecodes of a class and returned to a user function
  • bcompiler_read - Reads and creates classes from a filehandle
  • bcompiler_write_class - Writes an defined class as bytecodes
  • bcompiler_write_constant - Writes a defined constant as bytecodes
__________________
3.2 (northwood)
2gig ram
ATI AIW X800xt 256mb
Gigabyte GA-8knxp 875p Chipset
Optiwrite 8X DVD Burner
Win XP PRO Sp2 (Works Perfectly)
2 SATA Raptor 74gig Raid 0
2 7200 IDE 320gig HD
Reply With Quote
  #6  
Old 09-03-2010
Member
 
Join Date: May 2008
Posts: 2,290
Re: What is the PHP bytecode Compiler?

I am providing you with some more functions of the bcompiler, that can be useful for you while doing the coding :
  • bcompiler_write_file - Writes a php source file as bytecodes
  • bcompiler_write_footer - Writes the single character \ x00 to indicate End of compiled data
  • bcompiler_write_function - Writes an defined function as bytecodes
  • bcompiler_write_functions_from_file - Writes all functions defined in a file as bytecodes
  • bcompiler_write_header - Writes the header bcompiler
  • bcompiler_write_included_filename - Writes an included file as bytecodes
Reply With Quote
Reply

  TechArena Community > Software > Software Development
Tags: , , , ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "What is the PHP bytecode Compiler?"
Thread Thread Starter Forum Replies Last Post
Which is the best C++ Compiler Ambak Polls & Voting 7 20-01-2012 10:39 AM
disabling verify-bytecode can give more ram and speed up the lg revolution phone? Shinu Portable Devices 5 04-01-2012 07:54 AM
C++ compiler for Windows 7 Shahaka Windows Software 5 18-09-2010 10:39 PM
Best C Compiler kyosang Software Development 3 30-12-2009 08:18 AM
Compiler for PHP Farley Software Development 3 13-03-2009 07:31 PM


All times are GMT +5.5. The time now is 11:54 AM.