Sophie

Sophie

distrib > Mageia > 4 > i586 > by-pkgid > f800694edefe91adea2624f711a41a2d > files > 8592

php-manual-en-5.5.7-1.mga4.noarch.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Introduction</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="book.bcompiler.html">bcompiler</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="bcompiler.setup.html">Installing/Configuring</a></div>
 <div class="up"><a href="book.bcompiler.html">bcompiler</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="intro.bcompiler" class="preface">
   <h1 class="title">Introduction</h1>
   <div class="warning"><strong class="warning">Warning</strong><p class="simpara">This extension is
<em class="emphasis">EXPERIMENTAL</em>. The behaviour of this extension including
the names of its functions and any other documentation surrounding this
extension may change without notice in a future release of PHP.
This extension should be used at your own risk.</p></div>
    <p class="para">
     Bcompiler was written for several reasons:
     <ul class="simplelist">
      <li class="member">To encode entire script in a proprietary PHP application</li>
      <li class="member">To encode some classes and/or functions in a proprietary PHP application</li>
      <li class="member">
       To enable the production of php-gtk applications that could be used on
       client desktops, without the need for a php.exe.
      </li>
      <li class="member">To do the feasibility study for a PHP to C converter</li>
     </ul>
     The first of these goals is achieved using the
      <span class="function"><a href="function.bcompiler-write-header.html" class="function">bcompiler_write_header()</a></span>,
      <span class="function"><a href="function.bcompiler-write-file.html" class="function">bcompiler_write_file()</a></span> and
      <span class="function"><a href="function.bcompiler-write-footer.html" class="function">bcompiler_write_footer()</a></span>
     functions. The bytecode files can
     be written as either uncompressed or plain. 
     To use the generated bytecode, you can simply include it 
     with include or require statements.
    </p>
    <p class="para">
     The second of these goals is achieved using the
      <span class="function"><a href="function.bcompiler-write-header.html" class="function">bcompiler_write_header()</a></span>,
      <span class="function"><a href="function.bcompiler-write-class.html" class="function">bcompiler_write_class()</a></span>,
      <span class="function"><a href="function.bcompiler-write-footer.html" class="function">bcompiler_write_footer()</a></span>,
      <span class="function"><a href="function.bcompiler-read.html" class="function">bcompiler_read()</a></span>,
     and  <span class="function"><a href="function.bcompiler-load.html" class="function">bcompiler_load()</a></span> functions. The bytecode files can
     be written as either uncompressed or plain. The
      <span class="function"><a href="function.bcompiler-load.html" class="function">bcompiler_load()</a></span> reads a bzip compressed bytecode file,
     which tends to be 1/3 of the size of the original file.
    </p>
    <p class="para">
     To create EXE type files, bcompiler has to be used with a modified sapi
     file or a version of PHP which has been compiled as a shared library. In
     this scenario, bcompiler reads the compressed bytecode from the end of the
     exe file.
    </p>
    <p class="para">
     bcompiler can improve performance by about 30% when used with uncompressed
     bytecodes only. But keep in mind that uncompressed bytecode can be up
     to 5 times larger than the original source code. Using bytecode
     compression can save your space, but decompression requires much more
     time than parsing a source. bcompiler also does not do any bytecode
     optimization, this could be added in the future...
    </p>
    <p class="para">
     In terms of code protection, it is safe to say that it would be impossible
     to recreate the exact source code that it was built from, and without the
     accompanying source code comments. It would effectively be useless to use
     the bcompiler bytecodes to recreate and modify a class. However it is
     possible to retrieve data from a bcompiled bytecode file - so don&#039;t put
     your private passwords or anything in it.
    </p>
 </div><hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="book.bcompiler.html">bcompiler</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="bcompiler.setup.html">Installing/Configuring</a></div>
 <div class="up"><a href="book.bcompiler.html">bcompiler</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>