downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

Our source is open

The syntax highlighted source is automatically generated by PHP from the plaintext script. If you're interested in what's behind the several functions we used, you can always take a look at the source of the following files:

Of course, if you want to see the source of this page, we have it available. You can also browse the SVN repository for this website on svn.php.net.

Source of: /manual/en/internals2.buildsys.environment.php

<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$PARENTS = array();
include_once
dirname(__FILE__) ."/toc/internals2.buildsys.inc";
$setup = array (
 
'home' =>
  array (
   
0 => 'index.php',
   
1 => 'PHP Manual',
  ),
 
'head' =>
  array (
   
0 => 'UTF-8',
   
1 => 'en',
  ),
 
'this' =>
  array (
   
0 => 'internals2.buildsys.environment.php',
   
1 => 'Building PHP for extension development',
  ),
 
'up' =>
  array (
   
0 => 'internals2.buildsys.php',
   
1 => 'The PHP 5 build system',
  ),
 
'prev' =>
  array (
   
0 => 'internals2.buildsys.php',
   
1 => 'The PHP 5 build system',
  ),
 
'next' =>
  array (
   
0 => 'internals2.buildsys.skeleton.php',
   
1 => 'The ext_skel script',
  ),
);
$setup["toc"] = $TOC;
$setup["parents"] = $PARENTS;
manual_setup($setup);

manual_header();
?>
<div id="internals2.buildsys.environment" class="sect1">
  <h2 class="title">Building PHP for extension development</h2>
  <p class="para">
   In a typical PHP installation, the need for high performance almost always
   results in optimization at the cost of debugging facilities. This is a
   reasonable tradeoff for production use, but when developing an extension it
   falls short. What we need is a build of PHP which will give us some hints
   what has gone wrong when something does.
  </p>
 
  <p class="para">
   The Zend Engine provides a memory manager which is capable of tracking
   memory leaks in extensions and providing detailed debugging information.
   This tracking is disabled by default, as is thread-safety. To turn them
   on, pass the <span class="option">--enable-debug</span> and
   <i>--enable-maintainer-zts</i> options to
   <var class="filename">configure</var>, along with whatever options you typically
   use. For instructions on building PHP from source, see the instructions at
   <a href="install.general.php" class="xref">General Installation Considerations</a>. A typical <var class="filename">configure</var>
   line might look like this:
   </p><div class="example-contents programlisting">
<div class="shellcode"><pre class="shellcode">$ ./configure --prefix=/where/to/install/php --enable-debug --enable-maintainer-zts --enable-cgi --enable-cli --with-mysql=/path/to/mysql</pre>
</div>
   </div>
<p>
  </p>
 </div><?php manual_footer(); ?>
 
show source | credits | sitemap | contact | advertising | mirror sites