mirror of
https://github.com/php/php-src.git
synced 2024-11-24 18:34:21 +08:00
use getenv()
This commit is contained in:
parent
75fdefba0c
commit
1b002cf39f
@ -5,7 +5,7 @@ version string
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
$php = $_ENV['TEST_PHP_EXECUTABLE'];
|
||||
$php = getenv('TEST_PHP_EXECUTABLE');
|
||||
|
||||
var_dump(`$php -n -v`);
|
||||
|
||||
|
@ -10,7 +10,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') {
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
$php = $_ENV['TEST_PHP_EXECUTABLE'];
|
||||
$php = getenv('TEST_PHP_EXECUTABLE');
|
||||
|
||||
var_dump(`$php -n -r 'var_dump("hello");'`);
|
||||
|
||||
|
@ -10,7 +10,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') {
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
$php = $_ENV['TEST_PHP_EXECUTABLE'];
|
||||
$php = getenv('TEST_PHP_EXECUTABLE');
|
||||
|
||||
var_dump(`$php -n -d max_execution_time=111 -r 'var_dump(ini_get("max_execution_time"));'`);
|
||||
var_dump(`$php -n -d max_execution_time=500 -r 'var_dump(ini_get("max_execution_time"));'`);
|
||||
|
@ -5,7 +5,7 @@ show information about function
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
$php = $_ENV['TEST_PHP_EXECUTABLE'];
|
||||
$php = getenv('TEST_PHP_EXECUTABLE');
|
||||
|
||||
var_dump(`$php -n --rf unknown`);
|
||||
var_dump(`$php -n --rf echo`);
|
||||
|
@ -5,7 +5,7 @@ show information about class
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
$php = $_ENV['TEST_PHP_EXECUTABLE'];
|
||||
$php = getenv('TEST_PHP_EXECUTABLE');
|
||||
|
||||
var_dump(`$php -n --rc unknown`);
|
||||
var_dump(`$php -n --rc stdclass`);
|
||||
|
@ -5,7 +5,7 @@ show information about extension
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
$php = $_ENV['TEST_PHP_EXECUTABLE'];
|
||||
$php = getenv('TEST_PHP_EXECUTABLE');
|
||||
|
||||
var_dump(`$php -n --re unknown`);
|
||||
var_dump(`$php -n --re ""`);
|
||||
|
@ -10,7 +10,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') {
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
$php = $_ENV['TEST_PHP_EXECUTABLE'];
|
||||
$php = getenv('TEST_PHP_EXECUTABLE');
|
||||
|
||||
$filename = dirname(__FILE__).'/007.test.php';
|
||||
$code ='
|
||||
|
@ -10,7 +10,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') {
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
$php = $_ENV['TEST_PHP_EXECUTABLE'];
|
||||
$php = getenv('TEST_PHP_EXECUTABLE');
|
||||
|
||||
$filename = dirname(__FILE__).'/008.test.php';
|
||||
$code ='
|
||||
|
@ -5,7 +5,7 @@ using invalid combinations of cmdline options
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
$php = $_ENV['TEST_PHP_EXECUTABLE'];
|
||||
$php = getenv('TEST_PHP_EXECUTABLE');
|
||||
|
||||
var_dump(`$php -n -c -r 'echo hello;'`);
|
||||
var_dump(`$php -n -a -r 'echo hello;'`);
|
||||
|
@ -10,7 +10,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') {
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
$php = $_ENV['TEST_PHP_EXECUTABLE'];
|
||||
$php = getenv('TEST_PHP_EXECUTABLE');
|
||||
|
||||
$filename_txt = dirname(__FILE__)."/010.test.txt";
|
||||
|
||||
|
@ -10,7 +10,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') {
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
$php = $_ENV['TEST_PHP_EXECUTABLE'];
|
||||
$php = getenv('TEST_PHP_EXECUTABLE');
|
||||
|
||||
$filename = dirname(__FILE__)."/010.test.php";
|
||||
$filename_txt = dirname(__FILE__)."/010.test.txt";
|
||||
|
@ -5,7 +5,7 @@ syntax check
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
$php = $_ENV['TEST_PHP_EXECUTABLE'];
|
||||
$php = getenv('TEST_PHP_EXECUTABLE');
|
||||
|
||||
$filename = dirname(__FILE__)."/011.test.php";
|
||||
|
||||
|
@ -5,7 +5,7 @@ invalid arguments and error messages
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
$php = $_ENV['TEST_PHP_EXECUTABLE'];
|
||||
$php = getenv('TEST_PHP_EXECUTABLE');
|
||||
|
||||
var_dump(`"$php" -n -F some.php -F some.php`);
|
||||
var_dump(`"$php" -n -F some.php -R some.php`);
|
||||
|
@ -10,7 +10,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') {
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
$php = $_ENV['TEST_PHP_EXECUTABLE'];
|
||||
$php = getenv('TEST_PHP_EXECUTABLE');
|
||||
|
||||
$filename_txt = dirname(__FILE__)."/013.test.txt";
|
||||
file_put_contents($filename_txt, "test\nfile\ncontents\n");
|
||||
|
@ -5,7 +5,7 @@ syntax highlighting
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
$php = $_ENV['TEST_PHP_EXECUTABLE'];
|
||||
$php = getenv('TEST_PHP_EXECUTABLE');
|
||||
|
||||
$filename = dirname(__FILE__)."/014.test.php";
|
||||
$code = '
|
||||
|
Loading…
Reference in New Issue
Block a user