Source of: /manual/en/function.pcntl-exec.php
<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/ref.pcntl.inc";
$setup = array (
'home' =>
array (
0 => 'index.php',
1 => 'PHP Manual',
),
'head' =>
array (
0 => 'UTF-8',
1 => 'en',
),
'this' =>
array (
0 => 'function.pcntl-exec.php',
1 => 'pcntl_exec',
),
'up' =>
array (
0 => 'ref.pcntl.php',
1 => 'PCNTL Functions',
),
'prev' =>
array (
0 => 'function.pcntl-alarm.php',
1 => 'pcntl_alarm',
),
'next' =>
array (
0 => 'function.pcntl-fork.php',
1 => 'pcntl_fork',
),
);
$setup["toc"] = $TOC;
$setup["parents"] = $PARENTS;
manual_setup($setup);
manual_header();
?>
<div id="function.pcntl-exec" class="refentry">
<div class="refnamediv">
<h1 class="refname">pcntl_exec</h1>
<p class="verinfo">(PHP 4 >= 4.2.0, PHP 5)</p><p class="refpurpose"><span class="refname">pcntl_exec</span> — <span class="dc-title">Executes specified program in current process space</span></p>
</div>
<a name="function.pcntl-exec.description"></a><div class="refsect1 description">
<h3 class="title">Description</h3>
<div class="methodsynopsis dc-description">
<span class="type"><span class="type void">void</span></span> <span class="methodname"><b>pcntl_exec</b></span>
( <span class="methodparam"><span class="type">string</span> <tt class="parameter">$path</tt></span>
[, <span class="methodparam"><span class="type">array</span> <tt class="parameter">$args</tt></span>
[, <span class="methodparam"><span class="type">array</span> <tt class="parameter">$envs</tt></span>
]] )</div>
<p class="para rdfs-comment">
Executes the program with the given arguments.
</p>
</div>
<a name="function.pcntl-exec.parameters"></a><div class="refsect1 parameters">
<h3 class="title">Parameters</h3>
<p class="para">
</p><dl>
<dt class="varlistentry">
<span class="term"><i><tt class="parameter">path</tt></i>
</span>
</dt><dd class="listitem">
<p class="para">
<i><tt class="parameter">path</tt></i>
must be the path to a binary executable or a
script with a valid path pointing to an executable in the shebang (
#!/usr/local/bin/perl for example) as the first line. See your system's
man execve(2) page for additional information.
</p>
</dd>
<dt class="varlistentry">
<span class="term"><i><tt class="parameter">args</tt></i>
</span>
</dt><dd class="listitem">
<p class="para">
<i><tt class="parameter">args</tt></i>
is an array of argument strings passed to the
program.
</p>
</dd>
<dt class="varlistentry">
<span class="term"><i><tt class="parameter">envs</tt></i>
</span>
</dt><dd class="listitem">
<p class="para">
<i><tt class="parameter">envs</tt></i>
is an array of strings which are passed as
environment to the program. The array is in the format of name => value,
the key being the name of the environmental variable and the value being
the value of that variable.
</p>
</dd>
</dl>
<p>
</p>
</div>
<a name="function.pcntl-exec.returnvalues"></a><div class="refsect1 returnvalues">
<h3 class="title">Return Values</h3>
<p class="para">
Returns <b><tt class="constant">FALSE</tt></b> on error and does not return on success.
</p>
</div>
</div><?php manual_footer(); ?>