Merge branch 'PHP-7.4'

This commit is contained in:
Nikita Popov 2019-07-12 12:55:21 +02:00
commit 0146bab449
29 changed files with 18 additions and 42 deletions

View file

@ -6,36 +6,36 @@ class MyIterator extends ArrayIterator {
function __construct() { function __construct() {
$args = func_get_args(); $args = func_get_args();
echo " In " . __METHOD__ . "(" . implode($args, ',') . ")\n"; echo " In " . __METHOD__ . "(" . implode(',', $args) . ")\n";
} }
function rewind() { function rewind() {
$args = func_get_args(); $args = func_get_args();
echo " In " . __METHOD__ . "(" . implode($args, ',') . ")\n"; echo " In " . __METHOD__ . "(" . implode(',', $args) . ")\n";
return parent::rewind(); return parent::rewind();
} }
function valid() { function valid() {
$args = func_get_args(); $args = func_get_args();
echo " In " . __METHOD__ . "(" . implode($args, ',') . ")\n"; echo " In " . __METHOD__ . "(" . implode(',', $args) . ")\n";
return parent::valid(); return parent::valid();
} }
function current() { function current() {
$args = func_get_args(); $args = func_get_args();
echo " In " . __METHOD__ . "(" . implode($args, ',') . ")\n"; echo " In " . __METHOD__ . "(" . implode(',', $args) . ")\n";
return parent::current(); return parent::current();
} }
function next() { function next() {
$args = func_get_args(); $args = func_get_args();
echo " In " . __METHOD__ . "(" . implode($args, ',') . ")\n"; echo " In " . __METHOD__ . "(" . implode(',', $args) . ")\n";
return parent::next(); return parent::next();
} }
function key() { function key() {
$args = func_get_args(); $args = func_get_args();
echo " In " . __METHOD__ . "(" . implode($args, ',') . ")\n"; echo " In " . __METHOD__ . "(" . implode(',', $args) . ")\n";
return parent::key(); return parent::key();
} }
} }

View file

@ -16,19 +16,19 @@ class UsesMagic extends ArrayObject {
function __get($name) { function __get($name) {
$args = func_get_args(); $args = func_get_args();
echo "In " . __METHOD__ . "(" . implode($args, ',') . ")\n"; echo "In " . __METHOD__ . "(" . implode(',', $args) . ")\n";
} }
function __set($name, $value) { function __set($name, $value) {
$args = func_get_args(); $args = func_get_args();
echo "In " . __METHOD__ . "(" . implode($args, ',') . ")\n"; echo "In " . __METHOD__ . "(" . implode(',', $args) . ")\n";
} }
function __isset($name) { function __isset($name) {
$args = func_get_args(); $args = func_get_args();
echo "In " . __METHOD__ . "(" . implode($args, ',') . ")\n"; echo "In " . __METHOD__ . "(" . implode(',', $args) . ")\n";
} }
function __unset($name) { function __unset($name) {
$args = func_get_args(); $args = func_get_args();
echo "In " . __METHOD__ . "(" . implode($args, ',') . ")\n"; echo "In " . __METHOD__ . "(" . implode(',', $args) . ")\n";
} }
} }

View file

@ -28,7 +28,6 @@ $newpath = create_include_path();
set_include_path($newpath); set_include_path($newpath);
runtest(); runtest();
teardown_include_path(); teardown_include_path();
restore_include_path();
chdir(".."); chdir("..");
rmdir($thisTestDir); rmdir($thisTestDir);

View file

@ -29,7 +29,6 @@ $newpath = create_include_path();
set_include_path($newpath); set_include_path($newpath);
runtest(); runtest();
teardown_include_path(); teardown_include_path();
restore_include_path();
chdir(".."); chdir("..");
rmdir($thisTestDir); rmdir($thisTestDir);

View file

@ -28,7 +28,6 @@ set_include_path($newpath);
runtest(); runtest();
teardown_include_path(); teardown_include_path();
restore_include_path();
chdir(".."); chdir("..");
rmdir($thisTestDir); rmdir($thisTestDir);

View file

@ -29,7 +29,6 @@ set_include_path($newpath);
runtest(); runtest();
teardown_include_path(); teardown_include_path();
restore_include_path();
chdir(".."); chdir("..");
rmdir($thisTestDir); rmdir($thisTestDir);

View file

@ -12,7 +12,6 @@ Dave Kelsey <d_kelsey@uk.ibm.com>
set_include_path("rubbish"); set_include_path("rubbish");
testme(); testme();
restore_include_path();
function testme() { function testme() {

View file

@ -21,7 +21,6 @@ set_include_path($newpath);
runtest(); runtest();
teardown_include_path(); teardown_include_path();
restore_include_path();
function runtest() { function runtest() {

View file

@ -25,7 +25,6 @@ set_include_path($newpath);
runtest(); runtest();
teardown_include_path(); teardown_include_path();
restore_include_path();
chdir(".."); chdir("..");
rmdir($thisTestDir); rmdir($thisTestDir);

View file

@ -25,7 +25,6 @@ set_include_path($newpath);
runtest(); runtest();
teardown_include_path(); teardown_include_path();
restore_include_path();
chdir(".."); chdir("..");
rmdir($thisTestDir); rmdir($thisTestDir);

View file

@ -45,7 +45,6 @@ $modes = array("r", "r+", "rt");
foreach($modes as $mode) { foreach($modes as $mode) {
test_fopen($mode); test_fopen($mode);
} }
restore_include_path();
// remove the directory structure // remove the directory structure
chdir($baseDir); chdir($baseDir);

View file

@ -24,7 +24,6 @@ set_include_path($newpath);
runtest(); runtest();
teardown_include_path(); teardown_include_path();
restore_include_path();
chdir(".."); chdir("..");
rmdir($thisTestDir); rmdir($thisTestDir);

View file

@ -45,7 +45,6 @@ $modes = array("r", "r+", "rt");
foreach($modes as $mode) { foreach($modes as $mode) {
test_fopen($mode); test_fopen($mode);
} }
restore_include_path();
// remove the directory structure // remove the directory structure
chdir($baseDir); chdir($baseDir);

View file

@ -25,7 +25,6 @@ set_include_path($newpath);
runtest(); runtest();
teardown_relative_path(); teardown_relative_path();
restore_include_path();
chdir(".."); chdir("..");
rmdir($thisTestDir); rmdir($thisTestDir);

View file

@ -27,7 +27,6 @@ $newpath = create_include_path();
set_include_path($newpath); set_include_path($newpath);
runtest(); runtest();
teardown_include_path(); teardown_include_path();
restore_include_path();
chdir(".."); chdir("..");
rmdir($thisTestDir); rmdir($thisTestDir);

View file

@ -27,7 +27,6 @@ $newpath = create_include_path();
set_include_path($newpath); set_include_path($newpath);
runtest(); runtest();
teardown_include_path(); teardown_include_path();
restore_include_path();
chdir(".."); chdir("..");
rmdir($thisTestDir); rmdir($thisTestDir);

View file

@ -4,7 +4,6 @@ Bug #60570 (Stream context leaks when http request fails)
<?php require 'server.inc'; http_server_skipif('tcp://127.0.0.1:12342'); ?> <?php require 'server.inc'; http_server_skipif('tcp://127.0.0.1:12342'); ?>
--INI-- --INI--
allow_url_fopen=1 allow_url_fopen=1
allow_url_include=1
--FILE-- --FILE--
<?php <?php
require 'server.inc'; require 'server.inc';

View file

@ -4,7 +4,6 @@ Bug #69337 (Stream context leaks when http request fails)
<?php require 'server.inc'; http_server_skipif('tcp://127.0.0.1:22345'); ?> <?php require 'server.inc'; http_server_skipif('tcp://127.0.0.1:22345'); ?>
--INI-- --INI--
allow_url_fopen=1 allow_url_fopen=1
allow_url_include=1
--FILE-- --FILE--
<?php <?php
require 'server.inc'; require 'server.inc';

View file

@ -4,7 +4,6 @@ $http_reponse_header (no redirect)
<?php require 'server.inc'; http_server_skipif('tcp://127.0.0.1:22346'); ?> <?php require 'server.inc'; http_server_skipif('tcp://127.0.0.1:22346'); ?>
--INI-- --INI--
allow_url_fopen=1 allow_url_fopen=1
allow_url_include=1
--FILE-- --FILE--
<?php <?php
require 'server.inc'; require 'server.inc';

View file

@ -4,7 +4,6 @@ $http_reponse_header (redirect)
<?php require 'server.inc'; http_server_skipif('tcp://127.0.0.1:22347'); ?> <?php require 'server.inc'; http_server_skipif('tcp://127.0.0.1:22347'); ?>
--INI-- --INI--
allow_url_fopen=1 allow_url_fopen=1
allow_url_include=1
--FILE-- --FILE--
<?php <?php
require 'server.inc'; require 'server.inc';

View file

@ -4,7 +4,6 @@ $http_reponse_header (redirect + not found)
<?php require 'server.inc'; http_server_skipif('tcp://127.0.0.1:22348'); ?> <?php require 'server.inc'; http_server_skipif('tcp://127.0.0.1:22348'); ?>
--INI-- --INI--
allow_url_fopen=1 allow_url_fopen=1
allow_url_include=1
--FILE-- --FILE--
<?php <?php
require 'server.inc'; require 'server.inc';

View file

@ -4,7 +4,6 @@ $http_reponse_header (header with trailing whitespace)
<?php require 'server.inc'; http_server_skipif('tcp://127.0.0.1:22349'); ?> <?php require 'server.inc'; http_server_skipif('tcp://127.0.0.1:22349'); ?>
--INI-- --INI--
allow_url_fopen=1 allow_url_fopen=1
allow_url_include=1
--FILE-- --FILE--
<?php <?php
require 'server.inc'; require 'server.inc';

View file

@ -4,7 +4,6 @@ $http_reponse_header (whitespace-only "header")
<?php require 'server.inc'; http_server_skipif('tcp://127.0.0.1:22350'); ?> <?php require 'server.inc'; http_server_skipif('tcp://127.0.0.1:22350'); ?>
--INI-- --INI--
allow_url_fopen=1 allow_url_fopen=1
allow_url_include=1
--FILE-- --FILE--
<?php <?php
require 'server.inc'; require 'server.inc';

View file

@ -14,7 +14,6 @@ require_once('reading_include_path.inc');
//define the files to go into these directories, create one in dir2 //define the files to go into these directories, create one in dir2
set_include_path($newIncludePath); set_include_path($newIncludePath);
test_gzfile(); test_gzfile();
restore_include_path();
// remove the directory structure // remove the directory structure
chdir($baseDir); chdir($baseDir);

View file

@ -26,7 +26,6 @@ $modes = array("r", "r+", "rt");
foreach($modes as $mode) { foreach($modes as $mode) {
test_gzopen($mode); test_gzopen($mode);
} }
restore_include_path();
// remove the directory structure // remove the directory structure
chdir($baseDir); chdir($baseDir);

View file

@ -29,7 +29,6 @@ set_include_path($newpath);
runtest(); runtest();
teardown_relative_path(); teardown_relative_path();
restore_include_path();
chdir(".."); chdir("..");
rmdir($thisTestDir); rmdir($thisTestDir);

View file

@ -14,7 +14,6 @@ require_once('reading_include_path.inc');
//define the files to go into these directories, create one in dir2 //define the files to go into these directories, create one in dir2
set_include_path($newIncludePath); set_include_path($newIncludePath);
test_readgzfile(); test_readgzfile();
restore_include_path();
// remove the directory structure // remove the directory structure
chdir($baseDir); chdir($baseDir);

View file

@ -54,6 +54,7 @@ function normalizeOutput(string $out): string {
$out = preg_replace('/^#(\d+) \/.+\(\d+\):/m', '#$1 %s(%d):', $out); $out = preg_replace('/^#(\d+) \/.+\(\d+\):/m', '#$1 %s(%d):', $out);
$out = preg_replace('/Resource id #\d+/', 'Resource id #%d', $out); $out = preg_replace('/Resource id #\d+/', 'Resource id #%d', $out);
$out = preg_replace('/resource\(\d+\) of type/', 'resource(%d) of type', $out); $out = preg_replace('/resource\(\d+\) of type/', 'resource(%d) of type', $out);
$out = preg_replace('/string\(\d+\) "([^"]*%d)/', 'string(%d) "$1', $out);
return $out; return $out;
} }

View file

@ -13,7 +13,7 @@ ini_set('serialize_precision', -1);
echo ini_get('precision'), PHP_EOL; echo ini_get('precision'), PHP_EOL;
echo ini_get('serialize_precision'), PHP_EOL; echo ini_get('serialize_precision'), PHP_EOL;
echo "OUTPUTS".PHP_EOL; echo "OUTPUTS".PHP_EOL;
echo join($v, ' ').PHP_EOL; echo join(' ', $v).PHP_EOL;
var_dump(serialize($v)); var_dump(serialize($v));
var_export($v);echo PHP_EOL; var_export($v);echo PHP_EOL;
@ -24,7 +24,7 @@ ini_set('serialize_precision', 0);
echo ini_get('precision'), PHP_EOL; echo ini_get('precision'), PHP_EOL;
echo ini_get('serialize_precision'), PHP_EOL; echo ini_get('serialize_precision'), PHP_EOL;
echo "OUTPUTS".PHP_EOL; echo "OUTPUTS".PHP_EOL;
echo join($v, ' ').PHP_EOL; echo join(' ', $v).PHP_EOL;
var_dump(serialize($v)); var_dump(serialize($v));
var_export($v);echo PHP_EOL; var_export($v);echo PHP_EOL;
@ -34,7 +34,7 @@ ini_set('serialize_precision', 9);
echo ini_get('precision'), PHP_EOL; echo ini_get('precision'), PHP_EOL;
echo ini_get('serialize_precision'), PHP_EOL; echo ini_get('serialize_precision'), PHP_EOL;
echo "OUTPUTS".PHP_EOL; echo "OUTPUTS".PHP_EOL;
echo join($v, ' ').PHP_EOL; echo join(' ', $v).PHP_EOL;
var_dump(serialize($v)); var_dump(serialize($v));
var_export($v);echo PHP_EOL; var_export($v);echo PHP_EOL;
@ -44,7 +44,7 @@ ini_set('serialize_precision', 14);
echo ini_get('precision'), PHP_EOL; echo ini_get('precision'), PHP_EOL;
echo ini_get('serialize_precision'), PHP_EOL; echo ini_get('serialize_precision'), PHP_EOL;
echo "OUTPUTS".PHP_EOL; echo "OUTPUTS".PHP_EOL;
echo join($v, ' ').PHP_EOL; echo join(' ', $v).PHP_EOL;
var_dump(serialize($v)); var_dump(serialize($v));
var_export($v);echo PHP_EOL; var_export($v);echo PHP_EOL;
@ -54,7 +54,7 @@ ini_set('serialize_precision', 17);
echo ini_get('precision'), PHP_EOL; echo ini_get('precision'), PHP_EOL;
echo ini_get('serialize_precision'), PHP_EOL; echo ini_get('serialize_precision'), PHP_EOL;
echo "OUTPUTS".PHP_EOL; echo "OUTPUTS".PHP_EOL;
echo join($v, ' ').PHP_EOL; echo join(' ', $v).PHP_EOL;
var_dump(serialize($v)); var_dump(serialize($v));
var_export($v);echo PHP_EOL; var_export($v);echo PHP_EOL;
@ -64,7 +64,7 @@ ini_set('serialize_precision', 25);
echo ini_get('precision'), PHP_EOL; echo ini_get('precision'), PHP_EOL;
echo ini_get('serialize_precision'), PHP_EOL; echo ini_get('serialize_precision'), PHP_EOL;
echo "OUTPUTS".PHP_EOL; echo "OUTPUTS".PHP_EOL;
echo join($v, ' ').PHP_EOL; echo join(' ', $v).PHP_EOL;
var_dump(serialize($v)); var_dump(serialize($v));
var_export($v);echo PHP_EOL; var_export($v);echo PHP_EOL;
@ -74,7 +74,7 @@ ini_set('serialize_precision', 100);
echo ini_get('precision'), PHP_EOL; echo ini_get('precision'), PHP_EOL;
echo ini_get('serialize_precision'), PHP_EOL; echo ini_get('serialize_precision'), PHP_EOL;
echo "OUTPUTS".PHP_EOL; echo "OUTPUTS".PHP_EOL;
echo join($v, ' ').PHP_EOL; echo join(' ', $v).PHP_EOL;
var_dump(serialize($v)); var_dump(serialize($v));
var_export($v);echo PHP_EOL; var_export($v);echo PHP_EOL;
--EXPECT-- --EXPECT--