Merge branch 'PHP-5.4' into PHP-5.5

Conflicts:
	ext/spl/tests/SplFileObject_rewind_error001.phpt
This commit is contained in:
Ferenc Kovacs 2013-11-06 10:46:34 +01:00
commit 91108818e1
84 changed files with 227 additions and 124 deletions

View File

@ -16,7 +16,7 @@ ftp_login($ftp, 'user', 'pass');
if (!$ftp) die("Couldn't connect to the server");
ftp_set_option($ftp, FTP_AUTOSEEK, false);
$local_file = dirname(__FILE__) . DIRECTORY_SEPARATOR . "localfile.txt";
$local_file = dirname(__FILE__) . DIRECTORY_SEPARATOR . "ftp_fget_basic1.txt";
$handle = fopen($local_file, 'w');
var_dump(ftp_fget($ftp, $handle, 'fget.txt', FTP_ASCII, FTP_AUTORESUME));
@ -24,7 +24,7 @@ var_dump(file_get_contents($local_file));
?>
--CLEAN--
<?php
@unlink(dirname(__FILE__) . DIRECTORY_SEPARATOR . "localfile.txt");
@unlink(dirname(__FILE__) . DIRECTORY_SEPARATOR . "ftp_fget_basic1.txt");
?>
--EXPECT--
bool(true)

View File

@ -15,7 +15,7 @@ $ftp = ftp_connect('127.0.0.1', $port);
ftp_login($ftp, 'user', 'pass');
if (!$ftp) die("Couldn't connect to the server");
$local_file = dirname(__FILE__) . DIRECTORY_SEPARATOR . "localfile.txt";
$local_file = dirname(__FILE__) . DIRECTORY_SEPARATOR . "ftp_fget_basic2.txt";
file_put_contents($local_file, 'ASCIIFoo');
$handle = fopen($local_file, 'a');
@ -24,7 +24,7 @@ var_dump(file_get_contents($local_file));
?>
--CLEAN--
<?php
@unlink(dirname(__FILE__) . DIRECTORY_SEPARATOR . "localfile.txt");
@unlink(dirname(__FILE__) . DIRECTORY_SEPARATOR . "ftp_fget_basic2.txt");
?>
--EXPECT--
bool(true)

View File

@ -15,7 +15,7 @@ $ftp = ftp_connect('127.0.0.1', $port);
ftp_login($ftp, 'user', 'pass');
if (!$ftp) die("Couldn't connect to the server");
$local_file = dirname(__FILE__) . DIRECTORY_SEPARATOR . "localfile.txt";
$local_file = dirname(__FILE__) . DIRECTORY_SEPARATOR . "ftp_fget_basic3.txt";
file_put_contents($local_file, 'ASCIIFoo');
$handle = fopen($local_file, 'a');
@ -24,7 +24,7 @@ var_dump(file_get_contents($local_file));
?>
--CLEAN--
<?php
@unlink(dirname(__FILE__) . DIRECTORY_SEPARATOR . "localfile.txt");
@unlink(dirname(__FILE__) . DIRECTORY_SEPARATOR . "ftp_fget_basic3.txt");
?>
--EXPECT--
bool(true)

View File

@ -16,7 +16,7 @@ ftp_login($ftp, 'user', 'pass');
if (!$ftp) die("Couldn't connect to the server");
ftp_set_option($ftp, FTP_AUTOSEEK, false);
$local_file = dirname(__FILE__) . DIRECTORY_SEPARATOR . "localfile.txt";
$local_file = dirname(__FILE__) . DIRECTORY_SEPARATOR . "ftp_nb_fget_basic1.txt";
$handle = fopen($local_file, 'w');
var_dump(ftp_nb_fget($ftp, $handle, 'fget.txt', FTP_ASCII, FTP_AUTORESUME));
@ -24,7 +24,7 @@ var_dump(file_get_contents($local_file));
?>
--CLEAN--
<?php
@unlink(dirname(__FILE__) . DIRECTORY_SEPARATOR . "localfile.txt");
@unlink(dirname(__FILE__) . DIRECTORY_SEPARATOR . "ftp_nb_fget_basic1.txt");
?>
--EXPECT--
int(2)

View File

@ -15,7 +15,7 @@ $ftp = ftp_connect('127.0.0.1', $port);
ftp_login($ftp, 'user', 'pass');
if (!$ftp) die("Couldn't connect to the server");
$local_file = dirname(__FILE__) . DIRECTORY_SEPARATOR . "localfile.txt";
$local_file = dirname(__FILE__) . DIRECTORY_SEPARATOR . "ftp_nb_fget_basic2.txt";
file_put_contents($local_file, 'ASCIIFoo');
$handle = fopen($local_file, 'a');
@ -24,7 +24,7 @@ var_dump(file_get_contents($local_file));
?>
--CLEAN--
<?php
@unlink(dirname(__FILE__) . DIRECTORY_SEPARATOR . "localfile.txt");
@unlink(dirname(__FILE__) . DIRECTORY_SEPARATOR . "ftp_nb_fget_basic2.txt");
?>
--EXPECT--
int(2)

View File

@ -15,7 +15,7 @@ $ftp = ftp_connect('127.0.0.1', $port);
ftp_login($ftp, 'user', 'pass');
if (!$ftp) die("Couldn't connect to the server");
$local_file = dirname(__FILE__) . DIRECTORY_SEPARATOR . "localfile.txt";
$local_file = dirname(__FILE__) . DIRECTORY_SEPARATOR . "ftp_nb_fget_basic3.txt";
file_put_contents($local_file, 'ASCIIFoo');
$handle = fopen($local_file, 'a');
@ -24,7 +24,7 @@ var_dump(file_get_contents($local_file));
?>
--CLEAN--
<?php
@unlink(dirname(__FILE__) . DIRECTORY_SEPARATOR . "localfile.txt");
@unlink(dirname(__FILE__) . DIRECTORY_SEPARATOR . "ftp_nb_fget_basic3.txt");
?>
--EXPECT--
int(2)

View File

@ -18,7 +18,7 @@ $ftp = ftp_connect('127.0.0.1', $port);
ftp_login($ftp, 'user', 'pass');
if (!$ftp) die("Couldn't connect to the server");
$local_file = dirname(__FILE__) . DIRECTORY_SEPARATOR . "localfile.txt";
$local_file = dirname(__FILE__) . DIRECTORY_SEPARATOR . "ftp_nb_get_large.txt";
touch($local_file);
ftp_nb_get($ftp, $local_file, 'fget_large.txt', FTP_BINARY, 5368709119);
$fp = fopen($local_file, 'r');
@ -29,7 +29,7 @@ fclose($fp);
?>
--CLEAN--
<?php
@unlink(dirname(__FILE__) . DIRECTORY_SEPARATOR . "localfile.txt");
@unlink(dirname(__FILE__) . DIRECTORY_SEPARATOR . "ftp_nb_get_large.txt");
?>
--EXPECT--
string(1) "X"

View File

@ -7,16 +7,16 @@ Erwin Poeze <erwin.poeze@gmail.com>
--FILE--
<?php
file_put_contents('testdata.csv', 'eerste;tweede;derde');
file_put_contents('SplFileObject_getflags_basic.csv', 'eerste;tweede;derde');
$fo = new SplFileObject('testdata.csv');
$fo = new SplFileObject('SplFileObject_getflags_basic.csv');
$fo->setFlags(SplFileObject::DROP_NEW_LINE);
var_dump($fo->getFlags());
?>
--CLEAN--
<?php
unlink('testdata.csv');
unlink('SplFileObject_getflags_basic.csv');
?>
--EXPECT--
int(1)

View File

@ -7,10 +7,10 @@ Erwin Poeze <erwin.poeze@gmail.com>
--FILE--
<?php
file_put_contents('testdata.csv', 'eerste;tweede;derde');
file_put_contents('SplFileObject_getflags_error001.csv', 'eerste;tweede;derde');
$fo = new SplFileObject('testdata.csv');
$fo = new SplFileObject('SplFileObject_getflags_error001.csv');
$fo->setFlags(SplFileObject::READ_CSV);
$fo->setFlags(SplFileObject::DROP_NEW_LINE);
@ -20,7 +20,7 @@ var_dump($fo->getFlags());
?>
--CLEAN--
<?php
unlink('testdata.csv');
unlink('SplFileObject_getflags_error001.csv');
?>
--EXPECT--
int(1)

View File

@ -5,9 +5,9 @@ Erwin Poeze <erwin.poeze@gmail.com>
--FILE--
<?php
file_put_contents('testdata.csv', 'eerste;tweede;derde');
file_put_contents('SplFileObject_getflags_error002.csv', 'eerste;tweede;derde');
$fo = new SplFileObject('testdata.csv');
$fo = new SplFileObject('SplFileObject_getflags_error002.csv');
$fo->setFlags(SplFileObject::READ_CSV);
$fo->getFlags('fake');
@ -15,7 +15,7 @@ $fo->getFlags('fake');
?>
--CLEAN--
<?php
unlink('testdata.csv');
unlink('SplFileObject_getflags_error002.csv');
?>
--EXPECTF--
Warning: SplFileObject::getFlags() expects exactly 0 parameters, 1 given in %s on line %d

View File

@ -7,16 +7,16 @@ Erwin Poeze <erwin.poeze@gmail.com>
--FILE--
<?php
file_put_contents('testdata.csv', 'eerste;tweede;derde');
file_put_contents('SplFileObject_rewind_error001.csv', 'eerste;tweede;derde');
$fo = new SplFileObject('testdata.csv');
$fo = new SplFileObject('SplFileObject_rewind_error001.csv');
$fo->rewind( "invalid" );
?>
--CLEAN--
<?php
unlink('testdata.csv');
unlink('SplFileObject_rewind_error001.csv');
?>
--EXPECTF--
Warning: SplFileObject::rewind() expects exactly 0 parameters, 1 given in %s on line %d

View File

@ -5,11 +5,17 @@ Dave Kelsey <d_kelsey@uk.ibm.com>
--FILE--
<?php
/* Setup socket server */
$server = stream_socket_server('tcp://127.0.0.1:31337');
for ($i=0; $i<100; $i++) {
$port = rand(10000, 65000);
/* Setup socket server */
$server = @stream_socket_server("tcp://127.0.0.1:$port");
if ($server) {
break;
}
}
/* Connect to it */
$client = fsockopen('tcp://127.0.0.1:31337');
$client = fsockopen("tcp://127.0.0.1:$port");
if (!$client) {
die("Unable to create socket");

View File

@ -16,11 +16,17 @@ for ($i = 0; $i < 1000; $i++) {
}
fclose($fd);
/* Setup socket server */
$server = stream_socket_server('tcp://127.0.0.1:31337');
for ($i=0; $i<100; $i++) {
$port = rand(10000, 65000);
/* Setup socket server */
$server = @stream_socket_server("tcp://127.0.0.1:$port");
if ($server) {
break;
}
}
/* Connect to it */
$client = fsockopen('tcp://127.0.0.1:31337');
$client = fsockopen("tcp://127.0.0.1:$port");
if (!$client) {
die("Unable to create socket");

View File

@ -17,10 +17,10 @@ if(substr(PHP_OS, 0, 3) == "WIN")
echo "*** Testing file_put_contents() : usage variation ***\n";
$filename = dirname(__FILE__).'/fileGetContentsVar9.tmp';
$softlink = dirname(__FILE__).'/fileGetContentsVar9.SoftLink';
$hardlink = dirname(__FILE__).'/fileGetContentsVar9.HardLink';
$chainlink = dirname(__FILE__).'/fileGetContentsVar9.ChainLink';
$filename = dirname(__FILE__).'/filePutContentsVar9.tmp';
$softlink = dirname(__FILE__).'/filePutContentsVar9.SoftLink';
$hardlink = dirname(__FILE__).'/filePutContentsVar9.HardLink';
$chainlink = dirname(__FILE__).'/filePutContentsVar9.ChainLink';
// link files even though it original file doesn't exist yet

View File

@ -3,13 +3,20 @@ Testing fread() on a TCP server socket
--FILE--
<?php
$tcp_socket = stream_socket_server('tcp://127.0.0.1:31337');
for ($i=0; $i<100; $i++) {
$port = rand(10000, 65000);
/* Setup socket server */
$server = @stream_socket_server("tcp://127.0.0.1:$port");
if ($server) {
break;
}
}
socket_set_timeout($tcp_socket, 0, 1000);
socket_set_timeout($server, 0, 1000);
var_dump(fread($tcp_socket, 1));
var_dump(fread($server, 1));
fclose($tcp_socket);
fclose($server);
?>
--EXPECT--

View File

@ -3,7 +3,7 @@ Bug #41445 (parse_ini_file() function parses octal numbers in section names) - 2
--FILE--
<?php
$file = dirname(__FILE__)."/bug41445.ini";
$file = dirname(__FILE__)."/bug41445_1.ini";
$data = <<<DATA
[2454.33]

View File

@ -11,12 +11,18 @@ Test fsockopen() function : basic functionality
echo "*** Testing fsockopen() : basic functionality ***\n";
echo "Open a server socket\n";
$server = stream_socket_server('tcp://127.0.0.1:31337');
for ($i=0; $i<100; $i++) {
$port = rand(10000, 65000);
/* Setup socket server */
$server = @stream_socket_server("tcp://127.0.0.1:$port");
if ($server) {
break;
}
}
// Initialise all required variables
$hostname = 'tcp://127.0.0.1'; // loopback address
$port = 31337;
$errno = null;
$errstr = null;
$timeout = 1.5;

View File

@ -4,11 +4,17 @@ testing fsockopen without a protocol string
<?php
echo "Open a server socket\n";
$server = stream_socket_server('tcp://127.0.0.1:31337');
for ($i=0; $i<100; $i++) {
$port = rand(10000, 65000);
/* Setup socket server */
$server = @stream_socket_server("tcp://127.0.0.1:$port");
if ($server) {
break;
}
}
echo "\nCalling fsockopen() without a protocol in the hostname string:\n";
$hostname = '127.0.0.1';
$port = '31337';
$client = fsockopen($hostname, $port);
var_dump($client);
fclose($client);

View File

@ -6,14 +6,22 @@ stream_socket_shutdown() test on IPv4 TCP Loopback
?>
--FILE--
<?php
/* Setup socket server */
$server = stream_socket_server('tcp://127.0.0.1:31337');
if (!$server) {
for ($i=0; $i<100; $i++) {
$port = rand(10000, 65000);
/* Setup socket server */
$server = @stream_socket_server("tcp://127.0.0.1:$port");
if ($server) {
break;
}
}
if (!$server) {
die('Unable to create AF_INET socket [server]');
}
/* Connect and send request 1 */
$client1 = stream_socket_client('tcp://127.0.0.1:31337');
$client1 = stream_socket_client("tcp://127.0.0.1:$port");
if (!$client1) {
die('Unable to create AF_INET socket [client]');
}
@ -22,7 +30,7 @@ stream_socket_shutdown() test on IPv4 TCP Loopback
@fwrite($client1, "Error 1\n");
/* Connect and send request 2 */
$client2 = stream_socket_client('tcp://127.0.0.1:31337');
$client2 = stream_socket_client("tcp://127.0.0.1:$port");
if (!$client2) {
die('Unable to create AF_INET socket [client]');
}

View File

@ -3,9 +3,17 @@ Testing socket_get_status()
--FILE--
<?php
$tcp_socket = stream_socket_server('tcp://127.0.0.1:31337');
var_dump(socket_get_status($tcp_socket));
fclose($tcp_socket);
for ($i=0; $i<100; $i++) {
$port = rand(10000, 65000);
/* Setup socket server */
$server = @stream_socket_server("tcp://127.0.0.1:$port");
if ($server) {
break;
}
}
var_dump(socket_get_status($server));
fclose($server);
?>
--EXPECTF--

View File

@ -2,14 +2,21 @@
Streams Based IPv4 TCP Loopback test
--FILE--
<?php # vim:ft=php:
/* Setup socket server */
$server = stream_socket_server('tcp://127.0.0.1:31337');
for ($i=0; $i<100; $i++) {
$port = rand(10000, 65000);
/* Setup socket server */
$server = @stream_socket_server("tcp://127.0.0.1:$port");
if ($server) {
break;
}
}
if (!$server) {
die('Unable to create AF_INET socket [server]');
}
/* Connect to it */
$client = stream_socket_client('tcp://127.0.0.1:31337');
$client = stream_socket_client("tcp://127.0.0.1:$port");
if (!$client) {
die('Unable to create AF_INET socket [client]');
}

View File

@ -10,14 +10,22 @@ Streams Based IPv6 TCP Loopback test
?>
--FILE--
<?php
/* Setup socket server */
$server = stream_socket_server('tcp://[::1]:31337');
for ($i=0; $i<100; $i++) {
$port = rand(10000, 65000);
/* Setup socket server */
$server = @stream_socket_server("tcp://[::1]:$port");
if ($server) {
break;
}
}
if (!$server) {
die('Unable to create AF_INET6 socket [server]');
}
/* Connect to it */
$client = stream_socket_client('tcp://[::1]:31337');
$client = stream_socket_client("tcp://[::1]:$port");
if (!$client) {
die('Unable to create AF_INET6 socket [client]');
}

View File

@ -16,14 +16,22 @@ Streams Based IPv6 UDP Loopback test
?>
--FILE--
<?php
/* Setup socket server */
$server = stream_socket_server('udp://[::1]:31337', $errno, $errstr, STREAM_SERVER_BIND);
for ($i=0; $i<100; $i++) {
$port = rand(10000, 65000);
/* Setup socket server */
$server = @stream_socket_server("udp://[::1]:$port", $errno, $errstr, STREAM_SERVER_BIND);
if ($server) {
break;
}
}
if (!$server) {
die('Unable to create AF_INET6 socket [server]');
}
/* Connect to it */
$client = stream_socket_client('udp://[::1]:31337');
$client = stream_socket_client("udp://[::1]:$port");
if (!$client) {
die('Unable to create AF_INET6 socket [client]');
}

View File

@ -13,10 +13,16 @@ echo "*** Testing stream_set_timeout() : error conditions ***\n";
//Test stream_set_timeout with one more than the expected number of arguments
echo "\n-- Testing stream_set_timeout() function with more than expected no. of arguments --\n";
/* Setup socket server */
$server = stream_socket_server('tcp://127.0.0.1:31337');
for ($i=0; $i<100; $i++) {
$port = rand(10000, 65000);
/* Setup socket server */
$server = @stream_socket_server("tcp://127.0.0.1:$port");
if ($server) {
break;
}
}
/* Connect to it */
$client = fsockopen('tcp://127.0.0.1:31337');
$client = fsockopen("tcp://127.0.0.1:$port");
$seconds = 10;
$microseconds = 10;

View File

@ -20,7 +20,7 @@ $arg3 = array("one","two","three");
/* creating dumping file */
$data_file = dirname(__FILE__) . '/dump.txt';
$data_file = dirname(__FILE__) . '/vfprintf_basic1.txt';
if (!($fp = fopen($data_file, 'wt')))
return;

View File

@ -23,7 +23,7 @@ $arg2 = array(111,222);
$arg3 = array(111,222,333);
/* creating dumping file */
$data_file = dirname(__FILE__) . '/dump.txt';
$data_file = dirname(__FILE__) . '/vfprintf_basic2.txt';
if (!($fp = fopen($data_file, 'wt')))
return;

View File

@ -24,7 +24,7 @@ $arg2 = array(11.11,22.22);
$arg3 = array(11.11,22.22,33.33);
/* creating dumping file */
$data_file = dirname(__FILE__) . '/dump.txt';
$data_file = dirname(__FILE__) . '/vfprintf_basic3.txt';
if (!($fp = fopen($data_file, 'wt')))
return;

View File

@ -19,7 +19,7 @@ $arg2 = array(TRUE,FALSE);
$arg3 = array(TRUE,FALSE,TRUE);
/* creating dumping file */
$data_file = dirname(__FILE__) . '/dump.txt';
$data_file = dirname(__FILE__) . '/vfprintf_basic4.txt';
if (!($fp = fopen($data_file, 'wt')))
return;

View File

@ -19,7 +19,7 @@ $arg2 = array(65,66);
$arg3 = array(65,66,67);
/* creating dumping file */
$data_file = dirname(__FILE__) . '/dump.txt';
$data_file = dirname(__FILE__) . '/vfprintf_basic5.txt';
if (!($fp = fopen($data_file, 'wt')))
return;

View File

@ -20,7 +20,7 @@ $arg2 = array(1000,2000);
$arg3 = array(1000,2000,3000);
/* creating dumping file */
$data_file = dirname(__FILE__) . '/dump.txt';
$data_file = dirname(__FILE__) . '/vfprintf_basic6.txt';
if (!($fp = fopen($data_file, 'wt')))
return;

View File

@ -23,7 +23,7 @@ $arg2 = array(-1111,-1234567);
$arg3 = array(-1111,-1234567,-2345432);
/* creating dumping file */
$data_file = dirname(__FILE__) . '/dump.txt';
$data_file = dirname(__FILE__) . '/vfprintf_basic7.txt';
if (!($fp = fopen($data_file, 'wt')))
return;

View File

@ -23,7 +23,7 @@ $arg2 = array(-1111,-1234567);
$arg3 = array(-1111,-1234567,-2345432);
/* creating dumping file */
$data_file = dirname(__FILE__) . '/dump.txt';
$data_file = dirname(__FILE__) . '/vfprintf_basic7_64bit.txt';
if (!($fp = fopen($data_file, 'wt')))
return;

View File

@ -19,7 +19,7 @@ $arg2 = array(021,0347);
$arg3 = array(021,0347,05678);
/* creating dumping file */
$data_file = dirname(__FILE__) . '/dump.txt';
$data_file = dirname(__FILE__) . '/vfprintf_basic8.txt';
if (!($fp = fopen($data_file, 'wt')))
return;

View File

@ -24,7 +24,7 @@ $arg2 = array(11,132);
$arg3 = array(11,132,177);
/* creating dumping file */
$data_file = dirname(__FILE__) . '/dump.txt';
$data_file = dirname(__FILE__) . '/vfprintf_basic9.txt';
if (!($fp = fopen($data_file, 'wt')))
return;

View File

@ -45,7 +45,7 @@ $args_array = array(
);
/* creating dumping file */
$data_file = dirname(__FILE__) . '/dump.txt';
$data_file = dirname(__FILE__) . '/vfprintf_variation11.txt';
if (!($fp = fopen($data_file, 'wt')))
return;

View File

@ -45,7 +45,7 @@ $args_array = array(
);
/* creating dumping file */
$data_file = dirname(__FILE__) . '/dump.txt';
$data_file = dirname(__FILE__) . '/vfprintf_variation11_64bit.txt';
if (!($fp = fopen($data_file, 'wt')))
return;

View File

@ -68,7 +68,7 @@ $args_array = array(
);
/* creating dumping file */
$data_file = dirname(__FILE__) . '/dump.txt';
$data_file = dirname(__FILE__) . '/vfprintf_variation12.txt';
if (!($fp = fopen($data_file, 'wt')))
return;

View File

@ -68,7 +68,7 @@ $args_array = array(
);
/* creating dumping file */
$data_file = dirname(__FILE__) . '/dump.txt';
$data_file = dirname(__FILE__) . '/vfprintf_variation12_64bit.txt';
if (!($fp = fopen($data_file, 'wt')))
return;

View File

@ -45,7 +45,7 @@ $args_array = array(
);
/* creating dumping file */
$data_file = dirname(__FILE__) . '/dump.txt';
$data_file = dirname(__FILE__) . '/vfprintf_variation13.txt';
if (!($fp = fopen($data_file, 'wt')))
return;

View File

@ -45,7 +45,7 @@ $args_array = array(
);
/* creating dumping file */
$data_file = dirname(__FILE__) . '/dump.txt';
$data_file = dirname(__FILE__) . '/vfprintf_variation13_64bit.txt';
if (!($fp = fopen($data_file, 'wt')))
return;

View File

@ -68,7 +68,7 @@ $args_array = array(
);
/* creating dumping file */
$data_file = dirname(__FILE__) . '/dump.txt';
$data_file = dirname(__FILE__) . '/vfprintf_variation14.txt';
if (!($fp = fopen($data_file, 'wt')))
return;

View File

@ -68,7 +68,7 @@ $args_array = array(
);
/* creating dumping file */
$data_file = dirname(__FILE__) . '/dump.txt';
$data_file = dirname(__FILE__) . '/vfprintf_variation14_64bit.txt';
if (!($fp = fopen($data_file, 'wt')))
return;

View File

@ -38,7 +38,7 @@ $args_array = array(
);
/* creating dumping file */
$data_file = dirname(__FILE__) . '/dump.txt';
$data_file = dirname(__FILE__) . '/vfprintf_variation15.txt';
if (!($fp = fopen($data_file, 'wt')))
return;

View File

@ -38,7 +38,7 @@ $args_array = array(
);
/* creating dumping file */
$data_file = dirname(__FILE__) . '/dump.txt';
$data_file = dirname(__FILE__) . '/vfprintf_variation15_64bit.txt';
if (!($fp = fopen($data_file, 'wt')))
return;

View File

@ -61,7 +61,7 @@ $args_array = array(
);
/* creating dumping file */
$data_file = dirname(__FILE__) . '/dump.txt';
$data_file = dirname(__FILE__) . '/vfprintf_variation16.txt';
if (!($fp = fopen($data_file, 'wt')))
return;

View File

@ -61,7 +61,7 @@ $args_array = array(
);
/* creating dumping file */
$data_file = dirname(__FILE__) . '/dump.txt';
$data_file = dirname(__FILE__) . '/vfprintf_variation16_64bit.txt';
if (!($fp = fopen($data_file, 'wt')))
return;

View File

@ -34,7 +34,7 @@ $args_array = array(
);
/* creating dumping file */
$data_file = dirname(__FILE__) . '/dump.txt';
$data_file = dirname(__FILE__) . '/vfprintf_variation17.txt';
if (!($fp = fopen($data_file, 'wt')))
return;

View File

@ -57,7 +57,7 @@ $args_array = array(
);
/* creating dumping file */
$data_file = dirname(__FILE__) . '/dump.txt';
$data_file = dirname(__FILE__) . '/vfprintf_variation18.txt';
if (!($fp = fopen($data_file, 'wt')))
return;

View File

@ -46,7 +46,7 @@ $args_array = array(
/* creating dumping file */
$data_file = dirname(__FILE__) . '/dump.txt';
$data_file = dirname(__FILE__) . '/vfprintf_variation19.txt';
if (!($fp = fopen($data_file, 'wt')))
return;

View File

@ -46,7 +46,7 @@ $args_array = array(
/* creating dumping file */
$data_file = dirname(__FILE__) . '/dump.txt';
$data_file = dirname(__FILE__) . '/vfprintf_variation19_64bit.txt';
if (!($fp = fopen($data_file, 'wt')))
return;

View File

@ -84,7 +84,7 @@ $values = array(
);
/* creating dumping file */
$data_file = dirname(__FILE__) . '/dump.txt';
$data_file = dirname(__FILE__) . '/vfprintf_variation20.txt';
if (!($fp = fopen($data_file, 'wt')))
return;

View File

@ -81,7 +81,7 @@ $values = array(
);
/* creating dumping file */
$data_file = dirname(__FILE__) . '/dump.txt';
$data_file = dirname(__FILE__) . '/vfprintf_variation21.txt';
if (!($fp = fopen($data_file, 'wt')))
return;

View File

@ -45,7 +45,7 @@ $args_array = array(
// and with int values from the above $args_array array
/* creating dumping file */
$data_file = dirname(__FILE__) . '/dump.txt';
$data_file = dirname(__FILE__) . '/vfprintf_variation3.txt';
if (!($fp = fopen($data_file, 'wt')))
return;

View File

@ -62,7 +62,7 @@ $args_array = array(
/* creating dumping file */
$data_file = dirname(__FILE__) . '/dump.txt';
$data_file = dirname(__FILE__) . '/vfprintf_variation4.txt';
if (!($fp = fopen($data_file, 'wt')))
return;

View File

@ -62,7 +62,7 @@ $args_array = array(
/* creating dumping file */
$data_file = dirname(__FILE__) . '/dump.txt';
$data_file = dirname(__FILE__) . '/vfprintf_variation4_64bit.txt';
if (!($fp = fopen($data_file, 'wt')))
return;

View File

@ -42,7 +42,7 @@ $args_array = array(
);
/* creating dumping file */
$data_file = dirname(__FILE__) . '/dump.txt';
$data_file = dirname(__FILE__) . '/vfprintf_variation5.txt';
if (!($fp = fopen($data_file, 'wt')))
return;

View File

@ -57,7 +57,7 @@ $args_array = array(
);
/* creating dumping file */
$data_file = dirname(__FILE__) . '/dump.txt';
$data_file = dirname(__FILE__) . '/vfprintf_variation6.txt';
if (!($fp = fopen($data_file, 'wt')))
return;

View File

@ -60,7 +60,7 @@ $args_array = array(
);
/* creating dumping file */
$data_file = dirname(__FILE__) . '/dump.txt';
$data_file = dirname(__FILE__) . '/vfprintf_variation8.txt';
if (!($fp = fopen($data_file, 'wt')))
return;

View File

@ -743,6 +743,13 @@ echo "Done";
string(1) ":"
}
--> http://::#: array(2) {
["scheme"]=>
string(4) "http"
["host"]=>
string(1) ":"
}
--> x://::6.5: array(3) {
["scheme"]=>
string(1) "x"
@ -856,6 +863,8 @@ echo "Done";
--> http://?: bool(false)
--> http://#: bool(false)
--> http://?:: bool(false)
--> http://:?: bool(false)
@ -863,4 +872,4 @@ echo "Done";
--> http://blah.com:123456: bool(false)
--> http://blah.com:abcdef: bool(false)
Done
Done

View File

@ -96,6 +96,7 @@ echo "Done";
--> x:/blah.com : string(1) "x"
--> x://::abc/? : bool(false)
--> http://::? : string(4) "http"
--> http://::# : string(4) "http"
--> x://::6.5 : string(1) "x"
--> http://?:/ : string(4) "http"
--> http://@?:/ : string(4) "http"
@ -118,8 +119,9 @@ echo "Done";
--> http://@:/ : bool(false)
--> http://:/ : bool(false)
--> http://? : bool(false)
--> http://# : bool(false)
--> http://?: : bool(false)
--> http://:? : bool(false)
--> http://blah.com:123456 : bool(false)
--> http://blah.com:abcdef : bool(false)
Done
Done

View File

@ -95,6 +95,7 @@ echo "Done";
--> x:/blah.com : NULL
--> x://::abc/? : bool(false)
--> http://::? : string(1) ":"
--> http://::# : string(1) ":"
--> x://::6.5 : string(1) ":"
--> http://?:/ : string(1) "?"
--> http://@?:/ : string(1) "?"
@ -117,8 +118,9 @@ echo "Done";
--> http://@:/ : bool(false)
--> http://:/ : bool(false)
--> http://? : bool(false)
--> http://# : bool(false)
--> http://?: : bool(false)
--> http://:? : bool(false)
--> http://blah.com:123456 : bool(false)
--> http://blah.com:abcdef : bool(false)
Done
Done

View File

@ -95,6 +95,7 @@ echo "Done";
--> x:/blah.com : NULL
--> x://::abc/? : bool(false)
--> http://::? : NULL
--> http://::# : NULL
--> x://::6.5 : int(6)
--> http://?:/ : NULL
--> http://@?:/ : NULL
@ -117,8 +118,9 @@ echo "Done";
--> http://@:/ : bool(false)
--> http://:/ : bool(false)
--> http://? : bool(false)
--> http://# : bool(false)
--> http://?: : bool(false)
--> http://:? : bool(false)
--> http://blah.com:123456 : bool(false)
--> http://blah.com:abcdef : bool(false)
Done
Done

View File

@ -95,6 +95,7 @@ echo "Done";
--> x:/blah.com : NULL
--> x://::abc/? : bool(false)
--> http://::? : NULL
--> http://::# : NULL
--> x://::6.5 : NULL
--> http://?:/ : NULL
--> http://@?:/ : string(0) ""
@ -117,8 +118,9 @@ echo "Done";
--> http://@:/ : bool(false)
--> http://:/ : bool(false)
--> http://? : bool(false)
--> http://# : bool(false)
--> http://?: : bool(false)
--> http://:? : bool(false)
--> http://blah.com:123456 : bool(false)
--> http://blah.com:abcdef : bool(false)
Done
Done

View File

@ -95,6 +95,7 @@ echo "Done";
--> x:/blah.com : NULL
--> x://::abc/? : bool(false)
--> http://::? : NULL
--> http://::# : NULL
--> x://::6.5 : NULL
--> http://?:/ : NULL
--> http://@?:/ : NULL
@ -117,8 +118,9 @@ echo "Done";
--> http://@:/ : bool(false)
--> http://:/ : bool(false)
--> http://? : bool(false)
--> http://# : bool(false)
--> http://?: : bool(false)
--> http://:? : bool(false)
--> http://blah.com:123456 : bool(false)
--> http://blah.com:abcdef : bool(false)
Done
Done

View File

@ -95,6 +95,7 @@ echo "Done";
--> x:/blah.com : string(9) "/blah.com"
--> x://::abc/? : bool(false)
--> http://::? : NULL
--> http://::# : NULL
--> x://::6.5 : NULL
--> http://?:/ : string(1) "/"
--> http://@?:/ : string(1) "/"
@ -117,8 +118,9 @@ echo "Done";
--> http://@:/ : bool(false)
--> http://:/ : bool(false)
--> http://? : bool(false)
--> http://# : bool(false)
--> http://?: : bool(false)
--> http://:? : bool(false)
--> http://blah.com:123456 : bool(false)
--> http://blah.com:abcdef : bool(false)
Done
Done

View File

@ -95,6 +95,7 @@ echo "Done";
--> x:/blah.com : NULL
--> x://::abc/? : bool(false)
--> http://::? : NULL
--> http://::# : NULL
--> x://::6.5 : NULL
--> http://?:/ : NULL
--> http://@?:/ : NULL
@ -117,8 +118,9 @@ echo "Done";
--> http://@:/ : bool(false)
--> http://:/ : bool(false)
--> http://? : bool(false)
--> http://# : bool(false)
--> http://?: : bool(false)
--> http://:? : bool(false)
--> http://blah.com:123456 : bool(false)
--> http://blah.com:abcdef : bool(false)
Done
Done

View File

@ -95,6 +95,7 @@ echo "Done";
--> x:/blah.com : NULL
--> x://::abc/? : bool(false)
--> http://::? : NULL
--> http://::# : NULL
--> x://::6.5 : NULL
--> http://?:/ : NULL
--> http://@?:/ : NULL
@ -117,8 +118,9 @@ echo "Done";
--> http://@:/ : bool(false)
--> http://:/ : bool(false)
--> http://? : bool(false)
--> http://# : bool(false)
--> http://?: : bool(false)
--> http://:? : bool(false)
--> http://blah.com:123456 : bool(false)
--> http://blah.com:abcdef : bool(false)
Done
Done

View File

@ -75,6 +75,7 @@ $urls = array(
'x:/blah.com',
'x://::abc/?',
'http://::?',
'http://::#',
'x://::6.5',
'http://?:/',
'http://@?:/',
@ -99,6 +100,7 @@ $urls = array(
'http://@:/',
'http://:/',
'http://?',
'http://#',
'http://?:',
'http://:?',
'http://blah.com:123456',
@ -106,4 +108,4 @@ $urls = array(
);
?>
?>

View File

@ -9,7 +9,7 @@ if (!extension_loaded("zlib")) {
--FILE--
<?php
$filename = dirname(__FILE__)."/temp.txt.gz";
$filename = dirname(__FILE__)."/gzeof_variation1.txt.gz";
$h = gzopen($filename, 'w');
$str = "Here is the string to be written. ";
$length = 10;

View File

@ -12,7 +12,7 @@ is a very common test
for all languages
EOT;
$dirname = 'gzfile_temp';
$filename = $dirname.'/plainfile.txt.gz';
$filename = $dirname.'/gzfile_basic.txt.gz';
mkdir($dirname);
$h = gzopen($filename, 'w');
gzwrite($h, $plaintxt);
@ -36,4 +36,4 @@ array(3) {
[2]=>
string(17) "for all languages"
}
===DONE===
===DONE===

View File

@ -12,7 +12,7 @@ is a very common test
for all languages
EOT;
$dirname = 'gzfile_temp';
$filename = $dirname.'/plainfile.txt';
$filename = $dirname.'/gzfile_basic2.txt';
mkdir($dirname);
$h = fopen($filename, 'w');
fwrite($h, $plaintxt);
@ -36,4 +36,4 @@ array(3) {
[2]=>
string(17) "for all languages"
}
===DONE===
===DONE===

View File

@ -18,7 +18,7 @@ echo "*** Testing gzopen() : basic functionality ***\n";
// Initialise all required variables
$filename = "temp.txt.gz";
$filename = "gzopen_basic2.txt.gz";
$modes = array('w', 'w+');
$data = "This was the information that was written";

View File

@ -9,7 +9,7 @@ if (!extension_loaded("zlib")) {
--FILE--
<?php
$filename = dirname(__FILE__)."/temp.txt.gz";
$filename = dirname(__FILE__)."/gzputs_basic.txt.gz";
$h = gzopen($filename, 'w');
$str = "Here is the string to be written. ";
$length = 10;

View File

@ -9,7 +9,7 @@ if (!extension_loaded("zlib")) {
--FILE--
<?php
$filename = "temp.txt.gz";
$filename = "gzread_variation1.txt.gz";
$h = gzopen($filename, 'w');
$str = "Here is the string to be written. ";
var_dump(gzread($h, 100));

View File

@ -9,7 +9,7 @@ if (!extension_loaded("zlib")) {
--FILE--
<?php
$filename = "temp.txt.gz";
$filename = "gzwrite_basic.txt.gz";
$h = gzopen($filename, 'w');
$str = "Here is the string to be written. ";
$length = 10;

View File

@ -8,7 +8,7 @@ if (!extension_loaded("zlib")) {
?>
--FILE--
<?php
$filename = "temp.txt.gz";
$filename = "gzwrite_error.txt.gz";
$h = gzopen($filename, 'w');
$str = "Here is the string to be written. ";
$length = 10;

View File

@ -9,7 +9,7 @@ if (!extension_loaded("zlib")) {
--FILE--
<?php
$filename = "temp.txt.gz";
$filename = "gzwrite_error2.txt.gz";
$h = gzopen($filename, 'w');
$str = "Here is the string to be written. ";
var_dump(gzwrite( $h, $str, 0 ) );

View File

@ -13,7 +13,7 @@ for all languages
EOT;
$dirname = 'readgzfile_temp';
$filename = $dirname.'/plainfile.txt.gz';
$filename = $dirname.'/readgzfile_basic.txt.gz';
mkdir($dirname);
$h = gzopen($filename, 'w');
gzwrite($h, $plaintxt);

View File

@ -13,7 +13,7 @@ for all languages
EOT;
$dirname = 'readgzfile_temp';
$filename = $dirname.'/plainfile.txt';
$filename = $dirname.'/readgzfile_basic2.txt';
mkdir($dirname);
$h = fopen($filename, 'w');
fwrite($h, $plaintxt);

View File

@ -9,7 +9,7 @@ if (!extension_loaded("zlib")) {
--FILE--
<?php
$filename = "temp.txt.gz";
$filename = "zlib_wrapper_fflush_basic.txt.gz";
$h = gzopen($filename, 'w');
$str = "Here is the string to be written.";
$length = 10;

View File

@ -9,7 +9,7 @@ if (!extension_loaded("zlib")) {
--FILE--
<?php
$f = dirname(__FILE__)."/004.txt.gz";
$f2 = "temp.txt.gz";
$f2 = "zlib_wrapper_ftruncate_basic.txt.gz";
copy($f, $f2);
$h = gzopen($f2, "r");