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/functions.internal.php

<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$PARENTS = array();
include_once
dirname(__FILE__) ."/toc/language.functions.inc";
$setup = array (
 
'home' =>
  array (
   
0 => 'index.php',
   
1 => 'PHP Manual',
  ),
 
'head' =>
  array (
   
0 => 'UTF-8',
   
1 => 'en',
  ),
 
'this' =>
  array (
   
0 => 'functions.internal.php',
   
1 => 'Internal (built-in) functions',
  ),
 
'up' =>
  array (
   
0 => 'language.functions.php',
   
1 => 'Functions',
  ),
 
'prev' =>
  array (
   
0 => 'functions.variable-functions.php',
   
1 => 'Variable functions',
  ),
 
'next' =>
  array (
   
0 => 'functions.anonymous.php',
   
1 => 'Anonymous functions',
  ),
);
$setup["toc"] = $TOC;
$setup["parents"] = $PARENTS;
manual_setup($setup);

manual_header();
?>
<div id="functions.internal" class="sect1">
   <h2 class="title">Internal (built-in) functions</h2>
  
   <p class="para">
    PHP comes standard with many functions and constructs. There are also
    functions that require specific PHP extensions compiled in, otherwise
    fatal &quot;undefined function&quot; errors will appear. For example, to use
    <a href="ref.image.php" class="link">image</a> functions such as
    <a href="function.imagecreatetruecolor.php" class="function">imagecreatetruecolor()</a>, PHP must be compiled with
    <span class="productname">GD</span> support. Or, to use
    <a href="function.mysql-connect.php" class="function">mysql_connect()</a>, PHP must be compiled with
    <a href="ref.mysql.php" class="link">MySQL</a> support. There are many core functions
    that are included in every version of PHP, such as the
    <a href="ref.strings.php" class="link">string</a> and
    <a href="ref.var.php" class="link">variable</a> functions. A call
    to <a href="function.phpinfo.php" class="function">phpinfo()</a> or
    <a href="function.get-loaded-extensions.php" class="function">get_loaded_extensions()</a> will show which extensions are
    loaded into PHP. Also note that many extensions are enabled by default and
    that the PHP manual is split up by extension. See the
    <a href="configuration.php" class="link">configuration</a>,
    <a href="install.php" class="link">installation</a>, and individual
    extension chapters, for information on how to set up PHP.
   </p>
   <p class="para">
    Reading and understanding a function&#039;s prototype is explained within the
    manual section titled <a href="about.prototypes.php" class="link">how to read a
    function definition</a>. It&#039;s important to realize what a function
    returns or if a function works directly on a passed in value. For example,
    <a href="function.str-replace.php" class="function">str_replace()</a> will return the modified string while
    <a href="function.usort.php" class="function">usort()</a> works on the actual passed in variable
    itself. Each manual page also has specific information for each
    function like information on function parameters, behavior changes,
    return values for both success and failure, and availability information.
    Knowing these important (yet often subtle) differences is crucial for
    writing correct PHP code.
   </p>
   <blockquote><p><b class="note">Note</b>:
    <span class="simpara">
     If the parameters given to a function are not what it expects, such as
     passing an <a href="language.types.array.php" class="type array">array</a> where a <a href="language.types.string.php" class="type string">string</a> is expected,
     the return value of the function is undefined. In this case it will
     likely return <b><tt class="constant">NULL</tt></b> but this is just a convention, and cannot be relied
     upon.
    </span>
   </p></blockquote>
   <p class="para">
    See also <a href="function.function-exists.php" class="function">function_exists()</a>,
    <a href="funcref.php" class="link">the function reference</a>,
    <a href="function.get-extension-funcs.php" class="function">get_extension_funcs()</a>, and
    <a href="function.dl.php" class="function">dl()</a>.
   </p>
  </div><?php manual_footer(); ?>
 
show source | credits | sitemap | contact | advertising | mirror sites