xref: /php-src/ext/pcntl/tests/pcntl_exec_2.phpt (revision 74859783)
1--TEST--
2pcntl_exec() 2
3--EXTENSIONS--
4pcntl
5--SKIPIF--
6<?php
7
8if (!getenv("TEST_PHP_EXECUTABLE") || !is_executable(getenv("TEST_PHP_EXECUTABLE"))) die("skip TEST_PHP_EXECUTABLE not set");
9
10?>
11--FILE--
12<?php
13if (getenv("PCNTL_EXEC_TEST_IS_CHILD")) {
14    var_dump(getenv("FOO"));
15    exit;
16}
17echo "ok\n";
18pcntl_exec(getenv("TEST_PHP_EXECUTABLE"), array('-n', __FILE__), array(
19    "PCNTL_EXEC_TEST_IS_CHILD" => "1",
20    "FOO" => "BAR",
21    1 => "long")
22);
23
24echo "nok\n";
25?>
26--EXPECT--
27ok
28string(3) "BAR"
29