diff options
author | SVN Migration <svn@php.net> | 2008-12-03 20:30:45 +0000 |
---|---|---|
committer | SVN Migration <svn@php.net> | 2008-12-03 20:30:45 +0000 |
commit | 2876046398950e59c3b3c460e67e6fec7ff2ba3c (patch) | |
tree | 33b2b8b4b859960a6446ad19d0ada1c55f9cfcda /tests | |
parent | 3fb86b0b9e79e6a3312b694f30ee627e2e1b325c (diff) | |
download | php-git-php-5.3.0alpha2.tar.gz |
This commit was manufactured by cvs2svn to create tag 'php_5_3_0alpha2'.php-5.3.0alpha2
Diffstat (limited to 'tests')
60 files changed, 73 insertions, 2423 deletions
diff --git a/tests/basic/bug20539.phpt b/tests/basic/bug20539.phpt index 67cef3a4f6..2cfc00a356 100644 --- a/tests/basic/bug20539.phpt +++ b/tests/basic/bug20539.phpt @@ -1,8 +1,5 @@ --TEST-- Bug #20539 (PHP CLI Segmentation Fault) ---SKIPIF-- -<?php if (!extension_loaded("session")) die("skip session extension not available"); ?> -<?php unlink(__DIR__. '/sess_' .session_id()); ?> --INI-- session.auto_start=1 session.save_handler=files @@ -10,10 +7,7 @@ session.save_path=./tests/basic/ --FILE-- <?php print "good :)\n"; - $filename = __DIR__ . '/sess_' . session_id(); - var_dump(unlink($filename)); + unlink(dirname(__FILE__) . '/sess_' . session_id()); ?> --EXPECT-- good :) -bool(true) - diff --git a/tests/basic/bug46313-win.phpt b/tests/basic/bug46313-win.phpt deleted file mode 100644 index 276efe196f..0000000000 --- a/tests/basic/bug46313-win.phpt +++ /dev/null @@ -1,62 +0,0 @@ ---TEST-- -Bug #46313 (Magic quotes broke $_FILES) ---SKIPIF-- -<?php if(substr(PHP_OS, 0, 3) != "WIN") die("skip Windows-only test"); ?> ---INI-- -magic_quotes_gpc=1 -file_uploads=1 -register_globals=1 ---POST_RAW-- -Content-Type: multipart/form-data; boundary=---------------------------20896060251896012921717172737 ------------------------------20896060251896012921717172737 -Content-Disposition: form-data; name="o1'file"; filename="o1'file.png" -Content-Type: text/plain-file1 - -1 ------------------------------20896060251896012921717172737 -Content-Disposition: form-data; name="o2'file"; filename="o2'file2.txt" -Content-Type: text/plain-file2 - -2 ------------------------------20896060251896012921717172737-- ---FILE-- -<?php -var_dump($_FILES); -var_dump($GLOBALS["o1\'file_name"]); -var_dump($GLOBALS["o1\'file_name"] === $_FILES["o1\'file"]["name"]); -var_dump($GLOBALS["o1\'file"]); -var_dump($GLOBALS["o1\'file"] === $_FILES["o1\'file"]["tmp_name"]); -?> ---EXPECTF-- -array(2) { - ["o1\'file"]=> - array(5) { - ["name"]=> - string(12) "o1" - ["type"]=> - string(16) "text/plain-file1" - ["tmp_name"]=> - string(14) "%s" - ["error"]=> - int(0) - ["size"]=> - int(1) - } - ["o2\'file"]=> - array(5) { - ["name"]=> - string(13) "o2" - ["type"]=> - string(16) "text/plain-file2" - ["tmp_name"]=> - string(14) "%s" - ["error"]=> - int(0) - ["size"]=> - int(1) - } -} -string(12) "o1" -bool(true) -string(%d) "%s" -bool(true) diff --git a/tests/basic/bug46313.phpt b/tests/basic/bug46313.phpt deleted file mode 100644 index 275b267962..0000000000 --- a/tests/basic/bug46313.phpt +++ /dev/null @@ -1,62 +0,0 @@ ---TEST-- -Bug #46313 (Magic quotes broke $_FILES) ---SKIPIF-- -<?php if(substr(PHP_OS, 0, 3) == "WIN") die("skip non-Windows test"); ?> ---INI-- -magic_quotes_gpc=1 -file_uploads=1 -register_globals=1 ---POST_RAW-- -Content-Type: multipart/form-data; boundary=---------------------------20896060251896012921717172737 ------------------------------20896060251896012921717172737 -Content-Disposition: form-data; name="o1'file"; filename="o1'file.png" -Content-Type: text/plain-file1 - -1 ------------------------------20896060251896012921717172737 -Content-Disposition: form-data; name="o2'file"; filename="o2'file2.txt" -Content-Type: text/plain-file2 - -2 ------------------------------20896060251896012921717172737-- ---FILE-- -<?php -var_dump($_FILES); -var_dump($GLOBALS["o1\'file_name"]); -var_dump($GLOBALS["o1\'file_name"] === $_FILES["o1\'file"]["name"]); -var_dump($GLOBALS["o1\'file"]); -var_dump($GLOBALS["o1\'file"] === $_FILES["o1\'file"]["tmp_name"]); -?> ---EXPECTF-- -array(2) { - ["o1\'file"]=> - array(5) { - ["name"]=> - string(12) "o1\'file.png" - ["type"]=> - string(16) "text/plain-file1" - ["tmp_name"]=> - string(%d) "%s" - ["error"]=> - int(0) - ["size"]=> - int(1) - } - ["o2\'file"]=> - array(5) { - ["name"]=> - string(13) "o2\'file2.txt" - ["type"]=> - string(16) "text/plain-file2" - ["tmp_name"]=> - string(%d) "%s" - ["error"]=> - int(0) - ["size"]=> - int(1) - } -} -string(12) "o1\'file.png" -bool(true) -string(%d) "%s" -bool(true) diff --git a/tests/basic/rfc1867_anonymous_upload.phpt b/tests/basic/rfc1867_anonymous_upload.phpt deleted file mode 100644 index 0f58014a44..0000000000 --- a/tests/basic/rfc1867_anonymous_upload.phpt +++ /dev/null @@ -1,58 +0,0 @@ ---TEST-- -rfc1867 anonymous upload ---INI-- -file_uploads=1 -error_reporting=E_ALL&~E_NOTICE -comment=debug builds show some additional E_NOTICE errors -upload_max_filesize=1024 ---SKIPIF-- -<?php if (php_sapi_name()=='cli') die('skip'); ?> ---POST_RAW-- -Content-Type: multipart/form-data; boundary=---------------------------20896060251896012921717172737 ------------------------------20896060251896012921717172737 -Content-Disposition: form-data; filename="file1.txt" -Content-Type: text/plain-file1 - -1 ------------------------------20896060251896012921717172737 -Content-Disposition: form-data; filename="file2.txt" -Content-Type: text/plain-file2 - -2 ------------------------------20896060251896012921717172737-- ---FILE-- -<?php -var_dump($_FILES); -var_dump($_POST); -?> ---EXPECTF-- -array(2) { - [%d]=> - array(5) { - [%u|b%"name"]=> - %string|unicode%(9) "file1.txt" - [%u|b%"type"]=> - %string|unicode%(16) "text/plain-file1" - [%u|b%"tmp_name"]=> - %string|unicode%(%d) "%s" - [%u|b%"error"]=> - int(0) - [%u|b%"size"]=> - int(1) - } - [%d]=> - array(5) { - [%u|b%"name"]=> - %string|unicode%(9) "file2.txt" - [%u|b%"type"]=> - %string|unicode%(16) "text/plain-file2" - [%u|b%"tmp_name"]=> - %string|unicode%(%d) "%s" - [%u|b%"error"]=> - int(0) - [%u|b%"size"]=> - int(1) - } -} -array(0) { -} diff --git a/tests/basic/rfc1867_array_upload.phpt b/tests/basic/rfc1867_array_upload.phpt deleted file mode 100644 index 7af6700060..0000000000 --- a/tests/basic/rfc1867_array_upload.phpt +++ /dev/null @@ -1,85 +0,0 @@ ---TEST-- -rfc1867 array upload ---INI-- -file_uploads=1 -error_reporting=E_ALL&~E_NOTICE -comment=debug builds show some additional E_NOTICE errors -upload_max_filesize=1024 ---SKIPIF-- -<?php if (php_sapi_name()=='cli') die('skip'); ?> ---POST_RAW-- -Content-Type: multipart/form-data; boundary=---------------------------20896060251896012921717172737 ------------------------------20896060251896012921717172737 -Content-Disposition: form-data; name="file[]"; filename="file1.txt" -Content-Type: text/plain-file1 - -1 ------------------------------20896060251896012921717172737 -Content-Disposition: form-data; name="file[2]"; filename="file2.txt" -Content-Type: text/plain-file2 - -2 ------------------------------20896060251896012921717172737 -Content-Disposition: form-data; name="file[]"; filename="file3.txt" -Content-Type: text/plain-file3 - -3 ------------------------------20896060251896012921717172737-- ---FILE-- -<?php -var_dump($_FILES); -var_dump($_POST); -?> ---EXPECTF-- -array(1) { - [%u|b%"file"]=> - array(5) { - [%u|b%"name"]=> - array(3) { - [0]=> - %unicode|string%(9) "file1.txt" - [2]=> - %unicode|string%(9) "file2.txt" - [3]=> - %unicode|string%(9) "file3.txt" - } - [%u|b%"type"]=> - array(3) { - [0]=> - %unicode|string%(16) "text/plain-file1" - [2]=> - %unicode|string%(16) "text/plain-file2" - [3]=> - %unicode|string%(16) "text/plain-file3" - } - [%u|b%"tmp_name"]=> - array(3) { - [0]=> - %unicode|string%(%d) "%s" - [2]=> - %unicode|string%(%d) "%s" - [3]=> - %unicode|string%(%d) "%s" - } - [%u|b%"error"]=> - array(3) { - [0]=> - int(0) - [2]=> - int(0) - [3]=> - int(0) - } - [%u|b%"size"]=> - array(3) { - [0]=> - int(1) - [2]=> - int(1) - [3]=> - int(1) - } - } -} -array(0) { -} diff --git a/tests/basic/rfc1867_boundary_1.phpt b/tests/basic/rfc1867_boundary_1.phpt deleted file mode 100644 index 35fe3a3f6e..0000000000 --- a/tests/basic/rfc1867_boundary_1.phpt +++ /dev/null @@ -1,27 +0,0 @@ ---TEST-- -rfc1867 boundary 1 ---INI-- -post_max_size=1024 -error_reporting=E_ALL&~E_NOTICE -comment=debug builds show some additional E_NOTICE errors ---SKIPIF-- -<?php if (php_sapi_name()=='cli') die('skip'); ?> ---POST_RAW-- -Content-Type: multipart/form-data; boundary="------------------------------------foobar" ---------------------------------------foobar -Content-Disposition: form-data; name="foobar" - -1 ---------------------------------------foobar-- ---FILE-- -<?php -var_dump($_FILES); -var_dump($_POST); -?> ---EXPECTF-- -array(0) { -} -array(1) { - [%u|b%"foobar"]=> - %unicode|string%(1) "1" -} diff --git a/tests/basic/rfc1867_boundary_2.phpt b/tests/basic/rfc1867_boundary_2.phpt deleted file mode 100644 index 575853bb66..0000000000 --- a/tests/basic/rfc1867_boundary_2.phpt +++ /dev/null @@ -1,27 +0,0 @@ ---TEST-- -rfc1867 boundary 2 ---INI-- -post_max_size=1024 -error_reporting=E_ALL&~E_NOTICE -comment=debug builds show some additional E_NOTICE errors ---SKIPIF-- -<?php if (php_sapi_name()=='cli') die('skip'); ?> ---POST_RAW-- -Content-Type: multipart/form-data; boundary=------------------------------------foo, bar ---------------------------------------foo -Content-Disposition: form-data; name="foobar" - -1 ---------------------------------------foo-- ---FILE-- -<?php -var_dump($_FILES); -var_dump($_POST); -?> ---EXPECTF-- -array(0) { -} -array(1) { - [%u|b%"foobar"]=> - %unicode|string%(1) "1" -} diff --git a/tests/basic/rfc1867_empty_upload.phpt b/tests/basic/rfc1867_empty_upload.phpt deleted file mode 100644 index 10ed419d4d..0000000000 --- a/tests/basic/rfc1867_empty_upload.phpt +++ /dev/null @@ -1,90 +0,0 @@ ---TEST-- -rfc1867 empty upload ---INI-- -file_uploads=1 -error_reporting=E_ALL&~E_NOTICE -comment=debug builds show some additional E_NOTICE errors -upload_max_filesize=1024 ---SKIPIF-- -<?php if (php_sapi_name()=='cli') die('skip'); ?> ---POST_RAW-- -Content-Type: multipart/form-data; boundary=---------------------------20896060251896012921717172737 ------------------------------20896060251896012921717172737 -Content-Disposition: form-data; name="foo" - - ------------------------------20896060251896012921717172737 -Content-Disposition: form-data; name="file1"; filename="file1.txt" -Content-Type: text/plain-file1 - -1 ------------------------------20896060251896012921717172737 -Content-Disposition: form-data; name="file2"; filename="" -Content-Type: text/plain-file2 - - ------------------------------20896060251896012921717172737 -Content-Disposition: form-data; name="file3"; filename="file3.txt" -Content-Type: text/plain-file3 - -3 ------------------------------20896060251896012921717172737-- ---FILE-- -<?php -var_dump($_FILES); -var_dump($_POST); -if (is_uploaded_file($_FILES["file1"]["tmp_name"])) { - var_dump(file_get_contents($_FILES["file1"]["tmp_name"])); -} -if (is_uploaded_file($_FILES["file3"]["tmp_name"])) { - var_dump(file_get_contents($_FILES["file3"]["tmp_name"])); -} -?> ---EXPECTF-- -array(3) { - [%u|b%"file1"]=> - array(5) { - [%u|b%"name"]=> - %string|unicode%(9) "file1.txt" - [%u|b%"type"]=> - %string|unicode%(16) "text/plain-file1" - [%u|b%"tmp_name"]=> - %string|unicode%(%d) "%s" - [%u|b%"error"]=> - int(0) - [%u|b%"size"]=> - int(1) - } - [%u|b%"file2"]=> - array(5) { - [%u|b%"name"]=> - %string|unicode%(0) "" - [%u|b%"type"]=> - %string|unicode%(0) "" - [%u|b%"tmp_name"]=> - %string|unicode%(0) "" - [%u|b%"error"]=> - int(4) - [%u|b%"size"]=> - int(0) - } - [%u|b%"file3"]=> - array(5) { - [%u|b%"name"]=> - %string|unicode%(9) "file3.txt" - [%u|b%"type"]=> - %string|unicode%(16) "text/plain-file3" - [%u|b%"tmp_name"]=> - %string|unicode%(%d) "%s" - [%u|b%"error"]=> - int(0) - [%u|b%"size"]=> - int(1) - } -} -array(1) { - [%u|b%"foo"]=> - %unicode|string%(0) "" -} -string(1) "1" -string(1) "3" diff --git a/tests/basic/rfc1867_file_upload_disabled.phpt b/tests/basic/rfc1867_file_upload_disabled.phpt deleted file mode 100644 index a0d5271d9c..0000000000 --- a/tests/basic/rfc1867_file_upload_disabled.phpt +++ /dev/null @@ -1,38 +0,0 @@ ---TEST-- -rfc1867 file_upload disabled ---INI-- -file_uploads=0 -error_reporting=E_ALL&~E_NOTICE -comment=debug builds show some additional E_NOTICE errors ---SKIPIF-- -<?php if (php_sapi_name()=='cli') die('skip'); ?> ---POST_RAW-- -Content-Type: multipart/form-data; boundary=---------------------------20896060251896012921717172737 ------------------------------20896060251896012921717172737 -Content-Disposition: form-data; name="foo" - -bar ------------------------------20896060251896012921717172737 -Content-Disposition: form-data; name="file1"; filename="file1.txt" -Content-Type: text/plain-file1 - -1 ------------------------------20896060251896012921717172737 -Content-Disposition: form-data; name="bar" - -foo ------------------------------20896060251896012921717172737-- ---FILE-- -<?php -var_dump($_FILES); -var_dump($_POST); -?> ---EXPECTF-- -array(0) { -} -array(2) { - [%u|b%"foo"]=> - %unicode|string%(3) "bar" - [%u|b%"bar"]=> - %unicode|string%(3) "foo" -} diff --git a/tests/basic/rfc1867_garbled_mime_headers.phpt b/tests/basic/rfc1867_garbled_mime_headers.phpt deleted file mode 100644 index 9bee926d9b..0000000000 --- a/tests/basic/rfc1867_garbled_mime_headers.phpt +++ /dev/null @@ -1,27 +0,0 @@ ---TEST-- -rfc1867 garbled mime headers ---INI-- -file_uploads=1 -error_reporting=E_ALL&~E_NOTICE -comment=debug builds show some additional E_NOTICE errors -upload_max_filesize=1024 ---SKIPIF-- -<?php if (php_sapi_name()=='cli') die('skip'); ?> ---POST_RAW-- -Content-Type: multipart/form-data; boundary=---------------------------20896060251896012921717172737 ------------------------------20896060251896012921717172737 -Content-Disposition: form-data - - ------------------------------20896060251896012921717172737-- ---FILE-- -<?php -var_dump($_FILES); -var_dump($_POST); -?> ---EXPECTF-- -Warning: File Upload Mime headers garbled in %s -array(0) { -} -array(0) { -} diff --git a/tests/basic/rfc1867_invalid_boundary.phpt b/tests/basic/rfc1867_invalid_boundary.phpt deleted file mode 100644 index 3c66390162..0000000000 --- a/tests/basic/rfc1867_invalid_boundary.phpt +++ /dev/null @@ -1,26 +0,0 @@ ---TEST-- -rfc1867 invalid boundary ---INI-- -post_max_size=1024 -error_reporting=E_ALL&~E_NOTICE -comment=debug builds show some additional E_NOTICE errors ---SKIPIF-- -<?php if (php_sapi_name()=='cli') die('skip'); ?> ---POST_RAW-- -Content-Type: multipart/form-data; boundary="foobar ------------------------------20896060251896012921717172737 -Content-Disposition: form-data; name="foobar" - -1 ------------------------------20896060251896012921717172737-- ---FILE-- -<?php -var_dump($_FILES); -var_dump($_POST); -?> ---EXPECTF-- -Warning: Invalid boundary in multipart/form-data POST data in %s -array(0) { -} -array(0) { -} diff --git a/tests/basic/rfc1867_malicious_input.phpt b/tests/basic/rfc1867_malicious_input.phpt deleted file mode 100644 index 74c7ad0f7e..0000000000 --- a/tests/basic/rfc1867_malicious_input.phpt +++ /dev/null @@ -1,27 +0,0 @@ ---TEST-- -rfc1867 malicious input ---INI-- -file_uploads=1 -error_reporting=E_ALL&~E_NOTICE -comment=debug builds show some additional E_NOTICE errors -upload_max_filesize=1024 ---SKIPIF-- -<?php if (php_sapi_name()=='cli') die('skip'); ?> ---POST_RAW-- -Content-Type: multipart/form-data; boundary=---------------------------20896060251896012921717172737 ------------------------------20896060251896012921717172737 -Content-Disposition: form-data; name="foo[]bar"; filename="file1.txt" -Content-Type: text/plain-file1 - -1 ------------------------------20896060251896012921717172737-- ---FILE-- -<?php -var_dump($_FILES); -var_dump($_POST); -?> ---EXPECTF-- -array(0) { -} -array(0) { -} diff --git a/tests/basic/rfc1867_max_file_size.phpt b/tests/basic/rfc1867_max_file_size.phpt deleted file mode 100644 index 0671dc5f04..0000000000 --- a/tests/basic/rfc1867_max_file_size.phpt +++ /dev/null @@ -1,90 +0,0 @@ ---TEST-- -rfc1867 MAX_FILE_SIZE ---INI-- -file_uploads=1 -error_reporting=E_ALL&~E_NOTICE -comment=debug builds show some additional E_NOTICE errors -upload_max_filesize=1024 ---SKIPIF-- -<?php if (php_sapi_name()=='cli') die('skip'); ?> ---POST_RAW-- -Content-Type: multipart/form-data; boundary=---------------------------20896060251896012921717172737 ------------------------------20896060251896012921717172737 -Content-Disposition: form-data; name="MAX_FILE_SIZE" - -1 ------------------------------20896060251896012921717172737 -Content-Disposition: form-data; name="file1"; filename="file1.txt" -Content-Type: text/plain-file1 - -1 ------------------------------20896060251896012921717172737 -Content-Disposition: form-data; name="file2"; filename="file2.txt" -Content-Type: text/plain-file2 - -22 ------------------------------20896060251896012921717172737 -Content-Disposition: form-data; name="file3"; filename="C:\foo\bar/file3.txt" -Content-Type: text/plain-file3; - -3 ------------------------------20896060251896012921717172737-- ---FILE-- -<?php -var_dump($_FILES); -var_dump($_POST); -if (is_uploaded_file($_FILES["file1"]["tmp_name"])) { - var_dump(file_get_contents($_FILES["file1"]["tmp_name"])); -} -if (is_uploaded_file($_FILES["file3"]["tmp_name"])) { - var_dump(file_get_contents($_FILES["file3"]["tmp_name"])); -} -?> ---EXPECTF-- -array(3) { - [%u|b%"file1"]=> - array(5) { - [%u|b%"name"]=> - %string|unicode%(9) "file1.txt" - [%u|b%"type"]=> - %string|unicode%(16) "text/plain-file1" - [%u|b%"tmp_name"]=> - %string|unicode%(%d) "%s" - [%u|b%"error"]=> - int(0) - [%u|b%"size"]=> - int(1) - } - [%u|b%"file2"]=> - array(5) { - [%u|b%"name"]=> - %string|unicode%(9) "file2.txt" - [%u|b%"type"]=> - %string|unicode%(0) "" - [%u|b%"tmp_name"]=> - %string|unicode%(0) "" - [%u|b%"error"]=> - int(2) - [%u|b%"size"]=> - int(0) - } - [%u|b%"file3"]=> - array(5) { - [%u|b%"name"]=> - %string|unicode%(9) "file3.txt" - [%u|b%"type"]=> - %string|unicode%(16) "text/plain-file3" - [%u|b%"tmp_name"]=> - %string|unicode%(%d) "%s" - [%u|b%"error"]=> - int(0) - [%u|b%"size"]=> - int(1) - } -} -array(1) { - [%u|b%"MAX_FILE_SIZE"]=> - %string|unicode%(1) "1" -} -string(1) "1" -string(1) "3" diff --git a/tests/basic/rfc1867_missing_boundary.phpt b/tests/basic/rfc1867_missing_boundary.phpt deleted file mode 100644 index 9c8726cd67..0000000000 --- a/tests/basic/rfc1867_missing_boundary.phpt +++ /dev/null @@ -1,26 +0,0 @@ ---TEST-- -rfc1867 missing boundary ---INI-- -post_max_size=1024 -error_reporting=E_ALL&~E_NOTICE -comment=debug builds show some additional E_NOTICE errors ---SKIPIF-- -<?php if (php_sapi_name()=='cli') die('skip'); ?> ---POST_RAW-- -Content-Type: multipart/form-data ------------------------------20896060251896012921717172737 -Content-Disposition: form-data; name="foobar" - -1 ------------------------------20896060251896012921717172737-- ---FILE-- -<?php -var_dump($_FILES); -var_dump($_POST); -?> ---EXPECTF-- -Warning: Missing boundary in multipart/form-data POST data in %s -array(0) { -} -array(0) { -} diff --git a/tests/basic/rfc1867_missing_boundary_2.phpt b/tests/basic/rfc1867_missing_boundary_2.phpt deleted file mode 100644 index cace44383b..0000000000 --- a/tests/basic/rfc1867_missing_boundary_2.phpt +++ /dev/null @@ -1,39 +0,0 @@ ---TEST-- -rfc1867 missing boundary 2 ---INI-- -file_uploads=1 -error_reporting=E_ALL&~E_NOTICE -comment=debug builds show some additional E_NOTICE errors -upload_max_filesize=1024 ---SKIPIF-- -<?php if (php_sapi_name()=='cli') die('skip'); ?> ---POST_RAW-- -Content-Type: multipart/form-data; boundary=---------------------------20896060251896012921717172737 ------------------------------20896060251896012921717172737 -Content-Disposition: form-data; name="file1"; filename="file1.txt" -Content-Type: text/plain-file1 - -1 ---FILE-- -<?php -var_dump($_FILES); -var_dump($_POST); -?> ---EXPECTF-- -array(1) { - [%u|b%"file1"]=> - array(5) { - [%u|b%"name"]=> - %string|unicode%(9) "file1.txt" - [%u|b%"type"]=> - %string|unicode%(0) "" - [%u|b%"tmp_name"]=> - %string|unicode%(0) "" - [%u|b%"error"]=> - int(3) - [%u|b%"size"]=> - int(0) - } -} -array(0) { -} diff --git a/tests/basic/rfc1867_post_max_filesize.phpt b/tests/basic/rfc1867_post_max_filesize.phpt deleted file mode 100644 index 4276d496ba..0000000000 --- a/tests/basic/rfc1867_post_max_filesize.phpt +++ /dev/null @@ -1,84 +0,0 @@ ---TEST-- -rfc1867 post_max_filesize ---INI-- -file_uploads=1 -error_reporting=E_ALL&~E_NOTICE -comment=debug builds show some additional E_NOTICE errors -upload_max_filesize=1 ---SKIPIF-- -<?php if (php_sapi_name()=='cli') die('skip'); ?> ---POST_RAW-- -Content-Type: multipart/form-data; boundary=---------------------------20896060251896012921717172737 ------------------------------20896060251896012921717172737 -Content-Disposition: form-data; name="file1"; filename="file1.txt" -Content-Type: text/plain-file1 - -1 ------------------------------20896060251896012921717172737 -Content-Disposition: form-data; name="file2"; filename="file2.txt" -Content-Type: text/plain-file2 - -22 ------------------------------20896060251896012921717172737 -Content-Disposition: form-data; name="file3"; filename="file3.txt" -Content-Type: text/plain-file3 - -3 ------------------------------20896060251896012921717172737-- ---FILE-- -<?php -var_dump($_FILES); -var_dump($_POST); -if (is_uploaded_file($_FILES["file1"]["tmp_name"])) { - var_dump(file_get_contents($_FILES["file1"]["tmp_name"])); -} -if (is_uploaded_file($_FILES["file3"]["tmp_name"])) { - var_dump(file_get_contents($_FILES["file3"]["tmp_name"])); -} -?> ---EXPECTF-- -array(3) { - [%u|b%"file1"]=> - array(5) { - [%u|b%"name"]=> - %string|unicode%(9) "file1.txt" - [%u|b%"type"]=> - %string|unicode%(16) "text/plain-file1" - [%u|b%"tmp_name"]=> - %string|unicode%(%d) "%s" - [%u|b%"error"]=> - int(0) - [%u|b%"size"]=> - int(1) - } - [%u|b%"file2"]=> - array(5) { - [%u|b%"name"]=> - %string|unicode%(9) "file2.txt" - [%u|b%"type"]=> - %string|unicode%(0) "" - [%u|b%"tmp_name"]=> - %string|unicode%(0) "" - [%u|b%"error"]=> - int(1) - [%u|b%"size"]=> - int(0) - } - [%u|b%"file3"]=> - array(5) { - [%u|b%"name"]=> - %string|unicode%(9) "file3.txt" - [%u|b%"type"]=> - %string|unicode%(16) "text/plain-file3" - [%u|b%"tmp_name"]=> - %string|unicode%(%d) "%s" - [%u|b%"error"]=> - int(0) - [%u|b%"size"]=> - int(1) - } -} -array(0) { -} -string(1) "1" -string(1) "3" diff --git a/tests/basic/rfc1867_post_max_size.phpt b/tests/basic/rfc1867_post_max_size.phpt deleted file mode 100644 index 5e40ccaf45..0000000000 --- a/tests/basic/rfc1867_post_max_size.phpt +++ /dev/null @@ -1,26 +0,0 @@ ---TEST-- -rfc1867 post_max_size ---INI-- -post_max_size=1 -error_reporting=E_ALL&~E_NOTICE -comment=debug builds show some additional E_NOTICE errors ---SKIPIF-- -<?php if (php_sapi_name()=='cli') die('skip'); ?> ---POST_RAW-- -Content-Type: multipart/form-data; boundary=---------------------------20896060251896012921717172737 ------------------------------20896060251896012921717172737 -Content-Disposition: form-data; name="foobar" - -1 ------------------------------20896060251896012921717172737-- ---FILE-- -<?php -var_dump($_FILES); -var_dump($_POST); -?> ---EXPECTF-- -Warning: POST Content-Length of %d bytes exceeds the limit of 1 bytes in %s -array(0) { -} -array(0) { -} diff --git a/tests/classes/arrayobject_001.phpt b/tests/classes/arrayobject_001.phpt deleted file mode 100644 index 51208f8c64..0000000000 --- a/tests/classes/arrayobject_001.phpt +++ /dev/null @@ -1,14 +0,0 @@ ---TEST-- -Ensure that ArrayObject acts like an array ---SKIPIF-- ---FILE-- -<?php - -$a = new ArrayObject; -$a['foo'] = 'bar'; -echo reset($a); -echo count($a); -echo current($a); -?> ---EXPECT-- -bar1bar diff --git a/tests/lang/bug43958.phpt b/tests/lang/bug43958.phpt deleted file mode 100644 index bc88bcda0f..0000000000 --- a/tests/lang/bug43958.phpt +++ /dev/null @@ -1,17 +0,0 @@ ---TEST-- -Bug #43958 (class name added into the error message) ---FILE-- -<?php -class MyClass -{ - static public function loadCode($p) { - return include $p; - } -} - -MyClass::loadCode('file-which-does-not-exist-on-purpose.php'); ---EXPECTF-- -Warning: include(file-which-does-not-exist-on-purpose.php): failed to open stream: No such file or directory in %sbug43958.php on line 5 - -Warning: include(): Failed opening 'file-which-does-not-exist-on-purpose.php' for inclusion (include_path='%s') in %sbug43958.php on line 5 - diff --git a/tests/lang/func_get_arg.001.phpt b/tests/lang/func_get_arg.001.phpt deleted file mode 100644 index b1bbb18699..0000000000 --- a/tests/lang/func_get_arg.001.phpt +++ /dev/null @@ -1,15 +0,0 @@ ---TEST-- -func_get_arg test ---FILE-- -<?php - -function foo($a) -{ - $a=5; - echo func_get_arg(0); -} -foo(2); -echo "\n"; -?> ---EXPECT-- -2
\ No newline at end of file diff --git a/tests/lang/func_get_arg.002.phpt b/tests/lang/func_get_arg.002.phpt deleted file mode 100644 index 6ab4f95719..0000000000 --- a/tests/lang/func_get_arg.002.phpt +++ /dev/null @@ -1,19 +0,0 @@ ---TEST-- -func_get_arg with variable number of args ---FILE-- -<?php - -function foo($a) -{ - $b = func_get_arg(1); - var_dump($b); - $b++; - var_dump(func_get_arg(1)); - -} -foo(2, 3); -echo "\n"; -?> ---EXPECT-- -int(3) -int(3) diff --git a/tests/lang/func_get_arg.003.phpt b/tests/lang/func_get_arg.003.phpt deleted file mode 100644 index 4ef9967674..0000000000 --- a/tests/lang/func_get_arg.003.phpt +++ /dev/null @@ -1,11 +0,0 @@ ---TEST-- -func_get_arg outside of a function declaration ---FILE-- -<?php - -var_dump (func_get_arg(0)); - -?> ---EXPECTF-- -Warning: func_get_arg(): Called from the global scope - no function context in %s on line %d -bool(false) diff --git a/tests/lang/func_get_arg.004.phpt b/tests/lang/func_get_arg.004.phpt deleted file mode 100644 index 6931df04e6..0000000000 --- a/tests/lang/func_get_arg.004.phpt +++ /dev/null @@ -1,16 +0,0 @@ ---TEST-- -func_get_arg on non-existent arg ---FILE-- -<?php - -function foo($a) -{ - var_dump(func_get_arg(2)); -} -foo(2, 3); -echo "\n"; - -?> ---EXPECTF-- -Warning: func_get_arg(): Argument 2 not passed to function in %s on line %d -bool(false)
\ No newline at end of file diff --git a/tests/lang/func_get_arg.005.phpt b/tests/lang/func_get_arg.005.phpt deleted file mode 100644 index e1ae78e162..0000000000 --- a/tests/lang/func_get_arg.005.phpt +++ /dev/null @@ -1,19 +0,0 @@ ---TEST-- -A variable, which is referenced by another variable, is passed by value. -During the call, the original variable is updated. This should not affect func_get_arg(). ---FILE-- -<?php -function refVal($x) { - global $a; - $a = 'changed.a'; - var_dump($x); - var_dump(func_get_arg(0)); -} - -$a = "original.a"; -$ref =& $a; -refVal($a); -?> ---EXPECTF-- -string(10) "original.a" -string(10) "original.a"
\ No newline at end of file diff --git a/tests/lang/func_get_arg_variation.phpt b/tests/lang/func_get_arg_variation.phpt deleted file mode 100644 index 5dd0ed63db..0000000000 --- a/tests/lang/func_get_arg_variation.phpt +++ /dev/null @@ -1,28 +0,0 @@ ---TEST-- -func_get_arg test ---FILE-- -<?php - -function foo($a) -{ - $a=5; - echo func_get_arg(); - echo func_get_arg(2,2); - echo func_get_arg("hello"); - echo func_get_arg(-1); - echo func_get_arg(2); -} -foo(2); -echo "\n"; -?> ---EXPECTF-- -Warning: func_get_arg() expects exactly 1 parameter, 0 given in %s on line %d - -Warning: func_get_arg() expects exactly 1 parameter, 2 given in %s on line %d - -Warning: func_get_arg() expects parameter 1 to be long, string given in %s on line %d - -Warning: func_get_arg(): The argument number should be >= 0 in %s on line %d - -Warning: func_get_arg(): Argument 2 not passed to function in %s on line %d - diff --git a/tests/lang/func_get_args.001.phpt b/tests/lang/func_get_args.001.phpt deleted file mode 100644 index 740a0a2165..0000000000 --- a/tests/lang/func_get_args.001.phpt +++ /dev/null @@ -1,15 +0,0 @@ ---TEST-- -func_get_args with no args ---FILE-- -<?php - -function foo() -{ - var_dump(func_get_args()); -} -foo(); - -?> ---EXPECT-- -array(0) { -}
\ No newline at end of file diff --git a/tests/lang/func_get_args.002.phpt b/tests/lang/func_get_args.002.phpt deleted file mode 100644 index 0a886c2f04..0000000000 --- a/tests/lang/func_get_args.002.phpt +++ /dev/null @@ -1,22 +0,0 @@ ---TEST-- -func_get_args with variable number of args ---FILE-- -<?php - -function foo($a) -{ - var_dump(func_get_args()); -} -foo(1, 2, 3); - -?> ---EXPECT-- -array(3) { - [0]=> - int(1) - [1]=> - int(2) - [2]=> - int(3) -} - diff --git a/tests/lang/func_get_args.003.phpt b/tests/lang/func_get_args.003.phpt deleted file mode 100644 index 44faf7ebf8..0000000000 --- a/tests/lang/func_get_args.003.phpt +++ /dev/null @@ -1,11 +0,0 @@ ---TEST-- -func_get_args() outside of a function declaration ---FILE-- -<?php - -var_dump(func_get_args()); - -?> ---EXPECTREGEX-- -Warning\: func_get_args\(\)\: Called from the global scope - no function context in \S* on line 3 -bool\(false\) diff --git a/tests/lang/func_get_args.004.phpt b/tests/lang/func_get_args.004.phpt deleted file mode 100644 index 84e3ebe5a2..0000000000 --- a/tests/lang/func_get_args.004.phpt +++ /dev/null @@ -1,67 +0,0 @@ ---TEST-- -Pass same variable by ref and by value. ---FILE-- -<?php -function valRef($x, &$y) { - var_dump($x, $y); - var_dump(func_get_args()); - $x = 'changed.x'; - $y = 'changed.y'; - var_dump(func_get_args()); -} - -function refVal(&$x, $y) { - var_dump($x, $y); - var_dump(func_get_args()); - $x = 'changed.x'; - $y = 'changed.y'; - var_dump(func_get_args()); -} - - -echo "\n\n-- Val, Ref --\n"; -$a = 'original.a'; -valRef($a, $a); -var_dump($a); - -echo "\n\n-- Ref, Val --\n"; -$b = 'original.b'; -refVal($b, $b); -var_dump($b); -?> ---EXPECTF-- - --- Val, Ref -- -string(10) "original.a" -string(10) "original.a" -array(2) { - [0]=> - string(10) "original.a" - [1]=> - string(10) "original.a" -} -array(2) { - [0]=> - string(10) "original.a" - [1]=> - string(9) "changed.y" -} -string(9) "changed.y" - - --- Ref, Val -- -string(10) "original.b" -string(10) "original.b" -array(2) { - [0]=> - string(10) "original.b" - [1]=> - string(10) "original.b" -} -array(2) { - [0]=> - string(9) "changed.x" - [1]=> - string(10) "original.b" -} -string(9) "changed.x"
\ No newline at end of file diff --git a/tests/lang/func_num_args.001.phpt b/tests/lang/func_num_args.001.phpt deleted file mode 100644 index c281557feb..0000000000 --- a/tests/lang/func_num_args.001.phpt +++ /dev/null @@ -1,14 +0,0 @@ ---TEST-- -func_num_args with no args ---FILE-- -<?php - -function foo() -{ - var_dump(func_num_args()); -} -foo(); - -?> ---EXPECT-- -int(0)
\ No newline at end of file diff --git a/tests/lang/func_num_args.002.phpt b/tests/lang/func_num_args.002.phpt deleted file mode 100644 index bfb8f7c705..0000000000 --- a/tests/lang/func_num_args.002.phpt +++ /dev/null @@ -1,14 +0,0 @@ ---TEST-- -func_num_args with variable number of args ---FILE-- -<?php - -function foo($a) -{ - var_dump(func_num_args()); -} -foo(1, 2, 3); - -?> ---EXPECT-- -int(3)
\ No newline at end of file diff --git a/tests/lang/func_num_args.003.phpt b/tests/lang/func_num_args.003.phpt deleted file mode 100644 index 7cf1229bce..0000000000 --- a/tests/lang/func_num_args.003.phpt +++ /dev/null @@ -1,12 +0,0 @@ ---TEST-- -func_num_args() outside of a function declaration ---FILE-- -<?php - -var_dump(func_num_args()); - -?> ---EXPECTF-- - -Warning: func_num_args(): Called from the global scope - no function context in %s on line %d -int(-1)
\ No newline at end of file diff --git a/tests/lang/func_num_args.004.phpt b/tests/lang/func_num_args.004.phpt deleted file mode 100644 index 8bdc6f07f6..0000000000 --- a/tests/lang/func_num_args.004.phpt +++ /dev/null @@ -1,48 +0,0 @@ ---TEST-- -Pass same variable by ref and by value. ---FILE-- -<?php -function valRef($x, &$y) { - var_dump($x, $y); - var_dump(func_num_args()); - $x = 'changed.x'; - $y = 'changed.y'; - var_dump(func_num_args()); -} - -function refVal(&$x, $y) { - var_dump($x, $y); - var_dump(func_num_args()); - $x = 'changed.x'; - $y = 'changed.y'; - var_dump(func_num_args()); -} - - -echo "\n\n-- Val, Ref --\n"; -$a = 'original.a'; -valRef($a, $a); -var_dump($a); - -echo "\n\n-- Ref, Val --\n"; -$b = 'original.b'; -refVal($b, $b); -var_dump($b); -?> ---EXPECTF-- - - --- Val, Ref -- -string(10) "original.a" -string(10) "original.a" -int(2) -int(2) -string(9) "changed.y" - - --- Ref, Val -- -string(10) "original.b" -string(10) "original.b" -int(2) -int(2) -string(9) "changed.x" diff --git a/tests/lang/passByReference_001.phpt b/tests/lang/passByReference_001.phpt deleted file mode 100644 index c73eacc594..0000000000 --- a/tests/lang/passByReference_001.phpt +++ /dev/null @@ -1,37 +0,0 @@ ---TEST-- -passing of function parameters by reference ---FILE-- -<?php -function f($arg1, &$arg2) -{ - var_dump($arg1++); - var_dump($arg2++); -} - -function g (&$arg1, &$arg2) -{ - var_dump($arg1); - var_dump($arg2); -} -$a = 7; -$b = 15; - -f($a, $b); - -var_dump($a); -var_dump($b); - -$c=array(1); -g($c,$c[0]); - -?> ---EXPECT-- -int(7) -int(15) -int(7) -int(16) -array(1) { - [0]=> - &int(1) -} -int(1)
\ No newline at end of file diff --git a/tests/lang/passByReference_002.phpt b/tests/lang/passByReference_002.phpt deleted file mode 100644 index d1968a3528..0000000000 --- a/tests/lang/passByReference_002.phpt +++ /dev/null @@ -1,15 +0,0 @@ ---TEST-- -Attempt to pass a constant by reference ---FILE-- -<?php - -function f(&$arg1) -{ - var_dump($arg1++); -} - -f(2); - -?> ---EXPECTF-- -Fatal error: Only variables can be passed by reference in %s on line 8 diff --git a/tests/lang/passByReference_003.phpt b/tests/lang/passByReference_003.phpt deleted file mode 100644 index bbbc564654..0000000000 --- a/tests/lang/passByReference_003.phpt +++ /dev/null @@ -1,48 +0,0 @@ ---TEST-- -Implicit initialisation when passing by reference ---FILE-- -<?php -function passbyVal($val) { - echo "\nInside passbyVal call:\n"; - var_dump($val); -} - -function passbyRef(&$ref) { - echo "\nInside passbyRef call:\n"; - var_dump($ref); -} - -echo "\nPassing undefined by value\n"; -passbyVal($undef1[0]); -echo "\nAfter call\n"; -var_dump($undef1); - -echo "\nPassing undefined by reference\n"; -passbyRef($undef2[0]); -echo "\nAfter call\n"; -var_dump($undef2) -?> ---EXPECTF-- - -Passing undefined by value - -Notice: Undefined variable: undef1 in %s on line 13 - -Inside passbyVal call: -NULL - -After call - -Notice: Undefined variable: undef1 in %s on line 15 -NULL - -Passing undefined by reference - -Inside passbyRef call: -NULL - -After call -array(1) { - [0]=> - NULL -} diff --git a/tests/lang/passByReference_004.phpt b/tests/lang/passByReference_004.phpt deleted file mode 100644 index e8a7963d26..0000000000 --- a/tests/lang/passByReference_004.phpt +++ /dev/null @@ -1,21 +0,0 @@ ---TEST-- -passing the return value from a function by reference ---FILE-- -<?php - -function foo(&$ref) -{ - var_dump($ref); -} - -function bar($value) -{ - return $value; -} - -foo(bar(5)); - -?> ---EXPECTF-- -Strict Standards: Only variables should be passed by reference in %s on line 13 -int(5) diff --git a/tests/lang/passByReference_005.phpt b/tests/lang/passByReference_005.phpt deleted file mode 100644 index 52ddeebd1c..0000000000 --- a/tests/lang/passByReference_005.phpt +++ /dev/null @@ -1,261 +0,0 @@ ---TEST-- -Pass uninitialised variables by reference and by value to test implicit initialisation. ---FILE-- -<?php - -function v($val) { - $val = "Val changed"; -} - -function r(&$ref) { - $ref = "Ref changed"; -} - - -function vv($val1, $val2) { - $val1 = "Val1 changed"; - $val2 = "Val2 changed"; -} - -function vr($val, &$ref) { - $val = "Val changed"; - $ref = "Ref changed"; -} - -function rv(&$ref, $val) { - $val = "Val changed"; - $ref = "Ref changed"; -} - -function rr(&$ref1, &$ref2) { - $ref1 = "Ref1 changed"; - $ref2 = "Ref2 changed"; -} - - -class C { - - function __construct($val, &$ref) { - $val = "Val changed"; - $ref = "Ref changed"; - } - - function v($val) { - $val = "Val changed"; - } - - function r(&$ref) { - $ref = "Ref changed"; - } - - function vv($val1, $val2) { - $val1 = "Val1 changed"; - $val2 = "Val2 changed"; - } - - function vr($val, &$ref) { - $val = "Val changed"; - $ref = "Ref changed"; - } - - function rv(&$ref, $val) { - $val = "Val changed"; - $ref = "Ref changed"; - } - - function rr(&$ref1, &$ref2) { - $ref1 = "Ref1 changed"; - $ref2 = "Ref2 changed"; - } - -} - -echo "\n ---- Pass by ref / pass by val: functions ----\n"; -unset($u1, $u2); -v($u1); -r($u2); -var_dump($u1, $u2); - -unset($u1, $u2); -vv($u1, $u2); -var_dump($u1, $u2); - -unset($u1, $u2); -vr($u1, $u2); -var_dump($u1, $u2); - -unset($u1, $u2); -rv($u1, $u2); -var_dump($u1, $u2); - -unset($u1, $u2); -rr($u1, $u2); -var_dump($u1, $u2); - - -echo "\n\n ---- Pass by ref / pass by val: static method calls ----\n"; -unset($u1, $u2); -C::v($u1); -C::r($u2); -var_dump($u1, $u2); - -unset($u1, $u2); -C::vv($u1, $u2); -var_dump($u1, $u2); - -unset($u1, $u2); -C::vr($u1, $u2); -var_dump($u1, $u2); - -unset($u1, $u2); -C::rv($u1, $u2); -var_dump($u1, $u2); - -unset($u1, $u2); -C::rr($u1, $u2); -var_dump($u1, $u2); - -echo "\n\n ---- Pass by ref / pass by val: instance method calls ----\n"; -unset($u1, $u2); -$c = new C($u1, $u2); -var_dump($u1, $u2); - -unset($u1, $u2); -$c->v($u1); -$c->r($u2); -var_dump($u1, $u2); - -unset($u1, $u2); -$c->vv($u1, $u2); -var_dump($u1, $u2); - -unset($u1, $u2); -$c->vr($u1, $u2); -var_dump($u1, $u2); - -unset($u1, $u2); -$c->rv($u1, $u2); -var_dump($u1, $u2); - -unset($u1, $u2); -$c->rr($u1, $u2); -var_dump($u1, $u2); - -?> ---EXPECTF-- - - ---- Pass by ref / pass by val: functions ---- - -Notice: Undefined variable: u1 in %s on line 72 - -Notice: Undefined variable: u1 in %s on line 74 -NULL -string(11) "Ref changed" - -Notice: Undefined variable: u1 in %s on line 77 - -Notice: Undefined variable: u2 in %s on line 77 - -Notice: Undefined variable: u1 in %s on line 78 - -Notice: Undefined variable: u2 in %s on line 78 -NULL -NULL - -Notice: Undefined variable: u1 in %s on line 81 - -Notice: Undefined variable: u1 in %s on line 82 -NULL -string(11) "Ref changed" - -Notice: Undefined variable: u2 in %s on line 85 - -Notice: Undefined variable: u2 in %s on line 86 -string(11) "Ref changed" -NULL -string(12) "Ref1 changed" -string(12) "Ref2 changed" - - - ---- Pass by ref / pass by val: static method calls ---- - -Notice: Undefined variable: u1 in %s on line 95 - -Strict Standards: Non-static method C::v() should not be called statically in %s on line 95 - -Strict Standards: Non-static method C::r() should not be called statically in %s on line 96 - -Notice: Undefined variable: u1 in %s on line 97 -NULL -string(11) "Ref changed" - -Notice: Undefined variable: u1 in %s on line 100 - -Notice: Undefined variable: u2 in %s on line 100 - -Strict Standards: Non-static method C::vv() should not be called statically in %s on line 100 - -Notice: Undefined variable: u1 in %s on line 101 - -Notice: Undefined variable: u2 in %s on line 101 -NULL -NULL - -Notice: Undefined variable: u1 in %s on line 104 - -Strict Standards: Non-static method C::vr() should not be called statically in %s on line 104 - -Notice: Undefined variable: u1 in %s on line 105 -NULL -string(11) "Ref changed" - -Notice: Undefined variable: u2 in %s on line 108 - -Strict Standards: Non-static method C::rv() should not be called statically in %s on line 108 - -Notice: Undefined variable: u2 in %s on line 109 -string(11) "Ref changed" -NULL - -Strict Standards: Non-static method C::rr() should not be called statically in %s on line 112 -string(12) "Ref1 changed" -string(12) "Ref2 changed" - - - ---- Pass by ref / pass by val: instance method calls ---- - -Notice: Undefined variable: u1 in %s on line 117 - -Notice: Undefined variable: u1 in %s on line 118 -NULL -string(11) "Ref changed" - -Notice: Undefined variable: u1 in %s on line 121 - -Notice: Undefined variable: u1 in %s on line 123 -NULL -string(11) "Ref changed" - -Notice: Undefined variable: u1 in %s on line 126 - -Notice: Undefined variable: u2 in %s on line 126 - -Notice: Undefined variable: u1 in %s on line 127 - -Notice: Undefined variable: u2 in %s on line 127 -NULL -NULL - -Notice: Undefined variable: u1 in %s on line 130 - -Notice: Undefined variable: u1 in %s on line 131 -NULL -string(11) "Ref changed" - -Notice: Undefined variable: u2 in %s on line 134 - -Notice: Undefined variable: u2 in %s on line 135 -string(11) "Ref changed" -NULL -string(12) "Ref1 changed" -string(12) "Ref2 changed"
\ No newline at end of file diff --git a/tests/lang/passByReference_006.phpt b/tests/lang/passByReference_006.phpt deleted file mode 100644 index 248be88b44..0000000000 --- a/tests/lang/passByReference_006.phpt +++ /dev/null @@ -1,195 +0,0 @@ ---TEST-- -Pass uninitialised objects and arrays by reference to test implicit initialisation. ---FILE-- -<?php - -function refs(&$ref1, &$ref2, &$ref3, &$ref4, &$ref5) { - $ref1 = "Ref1 changed"; - $ref2 = "Ref2 changed"; - $ref3 = "Ref3 changed"; - $ref4 = "Ref4 changed"; - $ref5 = "Ref5 changed"; -} - - -class C { - - function __construct(&$ref1, &$ref2, &$ref3, &$ref4, &$ref5) { - $ref1 = "Ref1 changed"; - $ref2 = "Ref2 changed"; - $ref3 = "Ref3 changed"; - $ref4 = "Ref4 changed"; - $ref5 = "Ref5 changed"; - } - - function refs(&$ref1, &$ref2, &$ref3, &$ref4, &$ref5) { - $ref1 = "Ref1 changed"; - $ref2 = "Ref2 changed"; - $ref3 = "Ref3 changed"; - $ref4 = "Ref4 changed"; - $ref5 = "Ref5 changed"; - } - -} - -echo "\n ---- Pass uninitialised array & object by ref: function call ---\n"; -unset($u1, $u2, $u3, $u4, $u5); -refs($u1[0], $u2[0][1], $u3->a, $u4->a->b, $u5->a->b->c); -var_dump($u1, $u2, $u3, $u4, $u5); - -echo "\n ---- Pass uninitialised arrays & objects by ref: static method call ---\n"; -unset($u1, $u2, $u3, $u4, $u5); -C::refs($u1[0], $u2[0][1], $u3->a, $u4->a->b, $u5->a->b->c); -var_dump($u1, $u2, $u3, $u4, $u5); - -echo "\n\n---- Pass uninitialised arrays & objects by ref: constructor ---\n"; -unset($u1, $u2, $u3, $u4, $u5); -$c = new C($u1[0], $u2[0][1], $u3->a, $u4->a->b, $u5->a->b->c); -var_dump($u1, $u2, $u3, $u4, $u5); - -echo "\n ---- Pass uninitialised arrays & objects by ref: instance method call ---\n"; -unset($u1, $u2, $u3, $u4, $u5); -$c->refs($u1[0], $u2[0][1], $u3->a, $u4->a->b, $u5->a->b->c); -var_dump($u1, $u2, $u3, $u4, $u5); - -?> ---EXPECTF-- - - ---- Pass uninitialised array & object by ref: function call --- -array(1) { - [0]=> - string(12) "Ref1 changed" -} -array(1) { - [0]=> - array(1) { - [1]=> - string(12) "Ref2 changed" - } -} -object(stdClass)#%d (1) { - ["a"]=> - string(12) "Ref3 changed" -} -object(stdClass)#%d (1) { - ["a"]=> - object(stdClass)#%d (1) { - ["b"]=> - string(12) "Ref4 changed" - } -} -object(stdClass)#%d (1) { - ["a"]=> - object(stdClass)#%d (1) { - ["b"]=> - object(stdClass)#%d (1) { - ["c"]=> - string(12) "Ref5 changed" - } - } -} - - ---- Pass uninitialised arrays & objects by ref: static method call --- - -Strict Standards: Non-static method C::refs() should not be called statically in %s on line 39 -array(1) { - [0]=> - string(12) "Ref1 changed" -} -array(1) { - [0]=> - array(1) { - [1]=> - string(12) "Ref2 changed" - } -} -object(stdClass)#%d (1) { - ["a"]=> - string(12) "Ref3 changed" -} -object(stdClass)#%d (1) { - ["a"]=> - object(stdClass)#%d (1) { - ["b"]=> - string(12) "Ref4 changed" - } -} -object(stdClass)#%d (1) { - ["a"]=> - object(stdClass)#%d (1) { - ["b"]=> - object(stdClass)#%d (1) { - ["c"]=> - string(12) "Ref5 changed" - } - } -} - - ----- Pass uninitialised arrays & objects by ref: constructor --- -array(1) { - [0]=> - string(12) "Ref1 changed" -} -array(1) { - [0]=> - array(1) { - [1]=> - string(12) "Ref2 changed" - } -} -object(stdClass)#%d (1) { - ["a"]=> - string(12) "Ref3 changed" -} -object(stdClass)#%d (1) { - ["a"]=> - object(stdClass)#%d (1) { - ["b"]=> - string(12) "Ref4 changed" - } -} -object(stdClass)#%d (1) { - ["a"]=> - object(stdClass)#%d (1) { - ["b"]=> - object(stdClass)#%d (1) { - ["c"]=> - string(12) "Ref5 changed" - } - } -} - - ---- Pass uninitialised arrays & objects by ref: instance method call --- -array(1) { - [0]=> - string(12) "Ref1 changed" -} -array(1) { - [0]=> - array(1) { - [1]=> - string(12) "Ref2 changed" - } -} -object(stdClass)#%d (1) { - ["a"]=> - string(12) "Ref3 changed" -} -object(stdClass)#%d (1) { - ["a"]=> - object(stdClass)#%d (1) { - ["b"]=> - string(12) "Ref4 changed" - } -} -object(stdClass)#%d (1) { - ["a"]=> - object(stdClass)#%d (1) { - ["b"]=> - object(stdClass)#%d (1) { - ["c"]=> - string(12) "Ref5 changed" - } - } -}
\ No newline at end of file diff --git a/tests/lang/passByReference_007.phpt b/tests/lang/passByReference_007.phpt deleted file mode 100644 index 558ceae27e..0000000000 --- a/tests/lang/passByReference_007.phpt +++ /dev/null @@ -1,105 +0,0 @@ ---TEST-- -Pass function and method calls by reference and by value. ---FILE-- -<?php -class C { - static function sreturnVal() { - global $a; - return $a; - } - - static function &sreturnReference() { - global $a; - return $a; - } - - function returnVal() { - global $a; - return $a; - } - - function &returnReference() { - global $a; - return $a; - } -} - -function returnVal() { - global $a; - return $a; -} - -function &returnReference() { - global $a; - return $a; -} - - - -function foo(&$ref) { - var_dump($ref); - $ref = "changed"; -} - - -echo "Pass a function call that returns a value:\n"; -$a = "original"; -foo(returnVal()); -var_dump($a); - -echo "Pass a function call that returns a reference:\n"; -$a = "original"; -foo(returnReference()); -var_dump($a); - - -echo "\nPass a static method call that returns a value:\n"; -$a = "original"; -foo(C::sreturnVal()); -var_dump($a); - -echo "Pass a static method call that returns a reference:\n"; -$a = "original"; -foo(C::sreturnReference()); -var_dump($a); - - -$myC = new C; -echo "\nPass a method call that returns a value:\n"; -$a = "original"; -foo($myC->returnVal()); -var_dump($a); - -echo "Pass a method call that returns a reference:\n"; -$a = "original"; -foo($myC->returnReference()); -var_dump($a); - -?> ---EXPECTF-- -Pass a function call that returns a value: - -Strict Standards: Only variables should be passed by reference in %s on line 44 -string(8) "original" -string(8) "original" -Pass a function call that returns a reference: -string(8) "original" -string(7) "changed" - -Pass a static method call that returns a value: - -Strict Standards: Only variables should be passed by reference in %s on line 55 -string(8) "original" -string(8) "original" -Pass a static method call that returns a reference: -string(8) "original" -string(7) "changed" - -Pass a method call that returns a value: - -Strict Standards: Only variables should be passed by reference in %s on line 67 -string(8) "original" -string(8) "original" -Pass a method call that returns a reference: -string(8) "original" -string(7) "changed"
\ No newline at end of file diff --git a/tests/lang/passByReference_008.phpt b/tests/lang/passByReference_008.phpt deleted file mode 100644 index 36852170bf..0000000000 --- a/tests/lang/passByReference_008.phpt +++ /dev/null @@ -1,40 +0,0 @@ ---TEST-- -Pass same variable by ref and by value. ---FILE-- -<?php -function valRef($x, &$y) { - var_dump($x, $y); - $x = 'changed.x'; - $y = 'changed.y'; -} - -function refVal(&$x, $y) { - var_dump($x, $y); - $x = 'changed.x'; - $y = 'changed.y'; -} - - -echo "\n\n-- Val, Ref --\n"; -$a = 'original.a'; -valRef($a, $a); -var_dump($a); - -echo "\n\n-- Ref, Val --\n"; -$b = 'original.b'; -refVal($b, $b); -var_dump($b); -?> ---EXPECTF-- - - --- Val, Ref -- -string(10) "original.a" -string(10) "original.a" -string(9) "changed.y" - - --- Ref, Val -- -string(10) "original.b" -string(10) "original.b" -string(9) "changed.x"
\ No newline at end of file diff --git a/tests/lang/passByReference_009.phpt b/tests/lang/passByReference_009.phpt deleted file mode 100644 index 1cbd87d6c4..0000000000 --- a/tests/lang/passByReference_009.phpt +++ /dev/null @@ -1,24 +0,0 @@ ---TEST-- -Assignement as argument ---FILE-- -<?php - function foo(&$x, &$y) { $x = 1; echo $y ; } - - $x = 0; - foo($x, $x); // prints 1 .. - - - function foo2($x, &$y, $z) - { - echo $x; // 0 - echo $y; // 1 - $y = 2; - } - - $x = 0; - - foo2($x, $x, $x = 1); - echo $x; // 2 -?> ---EXPECTF-- -1012
\ No newline at end of file diff --git a/tests/lang/passByReference_010.phpt b/tests/lang/passByReference_010.phpt deleted file mode 100644 index 0393cce2d1..0000000000 --- a/tests/lang/passByReference_010.phpt +++ /dev/null @@ -1,61 +0,0 @@ ---TEST-- -Passing assignments by reference ---FILE-- -<?php - -function f(&$a) { - var_dump($a); - $a = "a.changed"; -} - -echo "\n\n---> Pass constant assignment by reference:\n"; -f($a="a.original"); -var_dump($a); - -echo "\n\n---> Pass variable assignment by reference:\n"; -unset($a); -$a = "a.original"; -f($b = $a); -var_dump($a); - -echo "\n\n---> Pass reference assignment by reference:\n"; -unset($a, $b); -$a = "a.original"; -f($b =& $a); -var_dump($a); - -echo "\n\n---> Pass concat assignment by reference:\n"; -unset($a, $b); -$b = "b.original"; -$a = "a.original"; -f($b .= $a); -var_dump($a); - -?> ---EXPECTF-- - - ----> Pass constant assignment by reference: - -Strict Standards: Only variables should be passed by reference in %s on line 9 -string(10) "a.original" -string(10) "a.original" - - ----> Pass variable assignment by reference: - -Strict Standards: Only variables should be passed by reference in %s on line 15 -string(10) "a.original" -string(10) "a.original" - - ----> Pass reference assignment by reference: -string(10) "a.original" -string(9) "a.changed" - - ----> Pass concat assignment by reference: - -Strict Standards: Only variables should be passed by reference in %s on line 28 -string(20) "b.originala.original" -string(10) "a.original" diff --git a/tests/lang/short_tags.001.phpt b/tests/lang/short_tags.001.phpt deleted file mode 100644 index 79939b01a0..0000000000 --- a/tests/lang/short_tags.001.phpt +++ /dev/null @@ -1,12 +0,0 @@ ---TEST-- -short tags ---INI-- -short_open_tag=on ---FILE-- -<? -echo "Used a short tag\n"; -?> -Finished ---EXPECT-- -Used a short tag -Finished diff --git a/tests/lang/short_tags.002.phpt b/tests/lang/short_tags.002.phpt deleted file mode 100644 index 6f0da684ec..0000000000 --- a/tests/lang/short_tags.002.phpt +++ /dev/null @@ -1,12 +0,0 @@ ---TEST-- -short tags ---INI-- -short_tags=off ---FILE-- -<? -echo "Used a short tag\n"; -?> -Finished ---EXPECT-- -Used a short tag -Finished diff --git a/tests/lang/short_tags.003.phpt b/tests/lang/short_tags.003.phpt deleted file mode 100644 index 64f97bcc29..0000000000 --- a/tests/lang/short_tags.003.phpt +++ /dev/null @@ -1,32 +0,0 @@ ---TEST-- -tags ---INI-- -short_open_tags=on -asp_tags=on ---FILE-- -<?='this should get echoed'?> - -<%= 'so should this' %> - -<?php -$a = 'This gets echoed twice'; -?> - -<?= $a?> - -<%= $a%> - -<? $b=3; ?> - -<?php - echo "{$b}"; -?> ---EXPECT-- -this should get echoed -so should this - -This gets echoed twice -This gets echoed twice - -3 - diff --git a/tests/lang/short_tags.004.phpt b/tests/lang/short_tags.004.phpt deleted file mode 100644 index be16467e2f..0000000000 --- a/tests/lang/short_tags.004.phpt +++ /dev/null @@ -1,37 +0,0 @@ ---TEST-- -tags ---INI-- -short_open_tag=off -asp_tags=off ---FILE-- -<?='this should get echoed'?> - -<%= 'so should this' %> - -<?php -$a = 'This gets echoed twice'; -?> - -<?= $a?> - -<%= $a%> - -<? $b=3; ?> - -<?php - echo "{$b}"; -?> ---EXPECTF-- -<?='this should get echoed'?> - -<%= 'so should this' %> - - -<?= $a?> - -<%= $a%> - -<? $b=3; ?> - - -Notice: Undefined variable: b in %s on line %d
\ No newline at end of file diff --git a/tests/lang/static_basic_001.phpt b/tests/lang/static_basic_001.phpt deleted file mode 100644 index 45fc1b2abe..0000000000 --- a/tests/lang/static_basic_001.phpt +++ /dev/null @@ -1,84 +0,0 @@ ---TEST-- -Static keyword - basic tests ---FILE-- -<?php - -echo "\nSame variable used as static and non static.\n"; -function staticNonStatic() { - echo "---------\n"; - $a=0; - echo "$a\n"; - static $a=10; - echo "$a\n"; - $a++; -} -staticNonStatic(); -staticNonStatic(); -staticNonStatic(); - -echo "\nLots of initialisations in the same statement.\n"; -function manyInits() { - static $counter=0; - echo "------------- Call $counter --------------\n"; - static $a, $b=10, $c=20, $d, $e=30; - echo "Unitialised : $a\n"; - echo "Initialised to 10: $b\n"; - echo "Initialised to 20: $c\n"; - echo "Unitialised : $d\n"; - echo "Initialised to 30: $e\n"; - $a++; - $b++; - $c++; - $d++; - $e++; - $counter++; -} -manyInits(); -manyInits(); -manyInits(); - -echo "\nUsing static keyword at global scope\n"; -for ($i=0; $i<3; $i++) { - static $s, $k=10; - echo "$s $k\n"; - $s++; - $k++; -} -?> ---EXPECT-- - -Same variable used as static and non static. ---------- -0 -10 ---------- -0 -11 ---------- -0 -12 - -Lots of initialisations in the same statement. -------------- Call 0 -------------- -Unitialised : -Initialised to 10: 10 -Initialised to 20: 20 -Unitialised : -Initialised to 30: 30 -------------- Call 1 -------------- -Unitialised : 1 -Initialised to 10: 11 -Initialised to 20: 21 -Unitialised : 1 -Initialised to 30: 31 -------------- Call 2 -------------- -Unitialised : 2 -Initialised to 10: 12 -Initialised to 20: 22 -Unitialised : 2 -Initialised to 30: 32 - -Using static keyword at global scope - 10 -1 11 -2 12
\ No newline at end of file diff --git a/tests/lang/static_basic_002.phpt b/tests/lang/static_basic_002.phpt deleted file mode 100644 index 06e2f724ec..0000000000 --- a/tests/lang/static_basic_002.phpt +++ /dev/null @@ -1,28 +0,0 @@ ---TEST-- -Multiple declarations of the same static variable ---FILE-- -<?php - -$a = 5; - -var_dump($a); - -static $a = 10; -static $a = 11; - -var_dump($a); - -function foo() { - static $a = 13; - static $a = 14; - - var_dump($a); -} - -foo(); - -?> ---EXPECT-- -int(5) -int(11) -int(14) diff --git a/tests/lang/static_variation_001.phpt b/tests/lang/static_variation_001.phpt deleted file mode 100644 index a27b9fadc7..0000000000 --- a/tests/lang/static_variation_001.phpt +++ /dev/null @@ -1,112 +0,0 @@ ---TEST-- -Statics in nested functions & evals. ---FILE-- -<?php - -static $a = array(7,8,9); - -function f1() { - static $a = array(1,2,3); - - function g1() { - static $a = array(4,5,6); - var_dump($a); - } - - var_dump($a); - -} - -f1(); -g1(); -var_dump($a); - -eval(' static $b = array(10,11,12); '); - -function f2() { - eval(' static $b = array(1,2,3); '); - - function g2a() { - eval(' static $b = array(4,5,6); '); - var_dump($b); - } - - eval('function g2b() { static $b = array(7, 8, 9); var_dump($b); } '); - var_dump($b); -} - -f2(); -g2a(); -g2b(); -var_dump($b); - - -eval(' function f3() { static $c = array(1,2,3); var_dump($c); }'); -f3(); - -?> ---EXPECTF-- -array(3) { - [0]=> - int(1) - [1]=> - int(2) - [2]=> - int(3) -} -array(3) { - [0]=> - int(4) - [1]=> - int(5) - [2]=> - int(6) -} -array(3) { - [0]=> - int(7) - [1]=> - int(8) - [2]=> - int(9) -} -array(3) { - [0]=> - int(1) - [1]=> - int(2) - [2]=> - int(3) -} -array(3) { - [0]=> - int(4) - [1]=> - int(5) - [2]=> - int(6) -} -array(3) { - [0]=> - int(7) - [1]=> - int(8) - [2]=> - int(9) -} -array(3) { - [0]=> - int(10) - [1]=> - int(11) - [2]=> - int(12) -} -array(3) { - [0]=> - int(1) - [1]=> - int(2) - [2]=> - int(3) -}
\ No newline at end of file diff --git a/tests/lang/static_variation_002.phpt b/tests/lang/static_variation_002.phpt deleted file mode 100644 index b8933fd26e..0000000000 --- a/tests/lang/static_variation_002.phpt +++ /dev/null @@ -1,84 +0,0 @@ ---TEST-- -Static variables in methods & nested functions & evals. ---FILE-- -<?php - -Class C { - function f() { - static $a = array(1,2,3); - eval(' static $k = array(4,5,6); '); - - function cfg() { - static $a = array(7,8,9); - eval(' static $k = array(10,11,12); '); - var_dump($a, $k); - } - var_dump($a, $k); - } -} -$c = new C; -$c->f(); -cfg(); - -Class D { - static function f() { - eval('function dfg() { static $b = array(1,2,3); var_dump($b); } '); - } -} -D::f(); -dfg(); - -eval(' Class E { function f() { static $c = array(1,2,3); var_dump($c); } }'); -$e = new E; -$e->f(); - -?> ---EXPECTF-- -array(3) { - [0]=> - int(1) - [1]=> - int(2) - [2]=> - int(3) -} -array(3) { - [0]=> - int(4) - [1]=> - int(5) - [2]=> - int(6) -} -array(3) { - [0]=> - int(7) - [1]=> - int(8) - [2]=> - int(9) -} -array(3) { - [0]=> - int(10) - [1]=> - int(11) - [2]=> - int(12) -} -array(3) { - [0]=> - int(1) - [1]=> - int(2) - [2]=> - int(3) -} -array(3) { - [0]=> - int(1) - [1]=> - int(2) - [2]=> - int(3) -}
\ No newline at end of file diff --git a/tests/security/open_basedir_copy.phpt b/tests/security/open_basedir_copy.phpt index 9faaa82ac0..8f0f7a91fd 100644 --- a/tests/security/open_basedir_copy.phpt +++ b/tests/security/open_basedir_copy.phpt @@ -36,42 +36,42 @@ bool(true) Warning: copy(): open_basedir restriction in effect. File(../bad) is not within the allowed path(s): (.) in %s on line %d -Warning: copy(../bad): failed to open stream: %s in %s on line %d +Warning: copy(../bad): failed to open stream: Operation not permitted in %s on line %d bool(false) Warning: copy(): open_basedir restriction in effect. File(../bad/bad.txt) is not within the allowed path(s): (.) in %s on line %d -Warning: copy(../bad/bad.txt): failed to open stream: %s in %s on line %d +Warning: copy(../bad/bad.txt): failed to open stream: Operation not permitted in %s on line %d bool(false) Warning: copy(): open_basedir restriction in effect. File(..) is not within the allowed path(s): (.) in %s on line %d -Warning: copy(..): failed to open stream: %s in %s on line %d +Warning: copy(..): failed to open stream: Operation not permitted in %s on line %d bool(false) Warning: copy(): open_basedir restriction in effect. File(../) is not within the allowed path(s): (.) in %s on line %d -Warning: copy(../): failed to open stream: %s in %s on line %d +Warning: copy(../): failed to open stream: Operation not permitted in %s on line %d bool(false) Warning: copy(): open_basedir restriction in effect. File(/) is not within the allowed path(s): (.) in %s on line %d -Warning: copy(/): failed to open stream: %s in %s on line %d +Warning: copy(/): failed to open stream: Operation not permitted in %s on line %d bool(false) Warning: copy(): open_basedir restriction in effect. File(../bad/.) is not within the allowed path(s): (.) in %s on line %d -Warning: copy(../bad/.): failed to open stream: %s in %s on line %d +Warning: copy(../bad/.): failed to open stream: Operation not permitted in %s on line %d bool(false) Warning: copy(): open_basedir restriction in effect. File(../bad/./bad.txt) is not within the allowed path(s): (.) in %s on line %d -Warning: copy(../bad/./bad.txt): failed to open stream: %s in %s on line %d +Warning: copy(../bad/./bad.txt): failed to open stream: Operation not permitted in %s on line %d bool(false) Warning: copy(): open_basedir restriction in effect. File(./../.) is not within the allowed path(s): (.) in %s on line %d -Warning: copy(./../.): failed to open stream: %s in %s on line %d +Warning: copy(./../.): failed to open stream: Operation not permitted in %s on line %d bool(false) bool(true) bool(true) diff --git a/tests/security/open_basedir_dir.phpt b/tests/security/open_basedir_dir.phpt index c6e331be1c..33fb6ac9be 100644 --- a/tests/security/open_basedir_dir.phpt +++ b/tests/security/open_basedir_dir.phpt @@ -29,42 +29,42 @@ bool(true) Warning: dir(): open_basedir restriction in effect. File(../bad) is not within the allowed path(s): (.) in %s on line %d -Warning: dir(../bad): failed to open dir: %s in %s on line %d +Warning: dir(../bad): failed to open dir: Operation not permitted in %s on line %d bool(false) Warning: dir(): open_basedir restriction in effect. File(../bad/bad.txt) is not within the allowed path(s): (.) in %s on line %d -Warning: dir(../bad/bad.txt): failed to open dir: %s in %s on line %d +Warning: dir(../bad/bad.txt): failed to open dir: Operation not permitted in %s on line %d bool(false) Warning: dir(): open_basedir restriction in effect. File(..) is not within the allowed path(s): (.) in %s on line %d -Warning: dir(..): failed to open dir: %s in %s on line %d +Warning: dir(..): failed to open dir: Operation not permitted in %s on line %d bool(false) Warning: dir(): open_basedir restriction in effect. File(../) is not within the allowed path(s): (.) in %s on line %d -Warning: dir(../): failed to open dir: %s in %s on line %d +Warning: dir(../): failed to open dir: Operation not permitted in %s on line %d bool(false) Warning: dir(): open_basedir restriction in effect. File(/) is not within the allowed path(s): (.) in %s on line %d -Warning: dir(/): failed to open dir: %s in %s on line %d +Warning: dir(/): failed to open dir: Operation not permitted in %s on line %d bool(false) Warning: dir(): open_basedir restriction in effect. File(../bad/.) is not within the allowed path(s): (.) in %s on line %d -Warning: dir(../bad/.): failed to open dir: %s in %s on line %d +Warning: dir(../bad/.): failed to open dir: Operation not permitted in %s on line %d bool(false) Warning: dir(): open_basedir restriction in effect. File(%s/test/bad/bad.txt) is not within the allowed path(s): (.) in %s on line %d -Warning: dir(%s/test/bad/bad.txt): failed to open dir: %s in %s on line %d +Warning: dir(%s/test/bad/bad.txt): failed to open dir: Operation not permitted in %s on line %d bool(false) Warning: dir(): open_basedir restriction in effect. File(%s/test/bad/../bad/bad.txt) is not within the allowed path(s): (.) in %s on line %d -Warning: dir(%s/test/bad/../bad/bad.txt): failed to open dir: %s in %s on line %d +Warning: dir(%s/test/bad/../bad/bad.txt): failed to open dir: Operation not permitted in %s on line %d bool(false) object(Directory)#%d (2) { ["path"]=> diff --git a/tests/security/open_basedir_error_log_variation.phpt b/tests/security/open_basedir_error_log_variation.phpt index d169a213e9..c0295f6506 100644 --- a/tests/security/open_basedir_error_log_variation.phpt +++ b/tests/security/open_basedir_error_log_variation.phpt @@ -31,17 +31,17 @@ bool(true) Warning: error_log(): open_basedir restriction in effect. File(%s/test/bad/bad.txt) is not within the allowed path(s): (.) in %s on line %d -Warning: error_log(%s/test/bad/bad.txt): failed to open stream: %s in %s on line %d +Warning: error_log(%s/test/bad/bad.txt): failed to open stream: Operation not permitted in %s on line %d bool(false) Warning: error_log(): open_basedir restriction in effect. File(%s/test/bad.txt) is not within the allowed path(s): (.) in %s on line %d -Warning: error_log(%s/test/bad.txt): failed to open stream: %s in %s on line %d +Warning: error_log(%s/test/bad.txt): failed to open stream: Operation not permitted in %s on line %d bool(false) Warning: error_log(): open_basedir restriction in effect. File(%s/bad.txt) is not within the allowed path(s): (.) in %s on line %d -Warning: error_log(%s/bad.txt): failed to open stream: %s in %s on line %d +Warning: error_log(%s/bad.txt): failed to open stream: Operation not permitted in %s on line %d bool(false) bool(true) *** Finished testing open_basedir configuration [error_log] *** diff --git a/tests/security/open_basedir_file.phpt b/tests/security/open_basedir_file.phpt index 36daa54e00..fbc841e3fe 100644 --- a/tests/security/open_basedir_file.phpt +++ b/tests/security/open_basedir_file.phpt @@ -31,42 +31,42 @@ bool(true) Warning: file(): open_basedir restriction in effect. File(../bad) is not within the allowed path(s): (.) in %s on line %d -Warning: file(../bad): failed to open stream: %s in %s on line %d +Warning: file(../bad): failed to open stream: Operation not permitted in %s on line %d bool(false) Warning: file(): open_basedir restriction in effect. File(../bad/bad.txt) is not within the allowed path(s): (.) in %s on line %d -Warning: file(../bad/bad.txt): failed to open stream: %s in %s on line %d +Warning: file(../bad/bad.txt): failed to open stream: Operation not permitted in %s on line %d bool(false) Warning: file(): open_basedir restriction in effect. File(..) is not within the allowed path(s): (.) in %s on line %d -Warning: file(..): failed to open stream: %s in %s on line %d +Warning: file(..): failed to open stream: Operation not permitted in %s on line %d bool(false) Warning: file(): open_basedir restriction in effect. File(../) is not within the allowed path(s): (.) in %s on line %d -Warning: file(../): failed to open stream: %s in %s on line %d +Warning: file(../): failed to open stream: Operation not permitted in %s on line %d bool(false) Warning: file(): open_basedir restriction in effect. File(/) is not within the allowed path(s): (.) in %s on line %d -Warning: file(/): failed to open stream: %s in %s on line %d +Warning: file(/): failed to open stream: Operation not permitted in %s on line %d bool(false) Warning: file(): open_basedir restriction in effect. File(../bad/.) is not within the allowed path(s): (.) in %s on line %d -Warning: file(../bad/.): failed to open stream: %s in %s on line %d +Warning: file(../bad/.): failed to open stream: Operation not permitted in %s on line %d bool(false) Warning: file(): open_basedir restriction in effect. File(%s/test/bad/bad.txt) is not within the allowed path(s): (.) in %s on line %d -Warning: file(%s/test/bad/bad.txt): failed to open stream: %s in %s on line %d +Warning: file(%s/test/bad/bad.txt): failed to open stream: Operation not permitted in %s on line %d bool(false) Warning: file(): open_basedir restriction in effect. File(%s/test/bad/../bad/bad.txt) is not within the allowed path(s): (.) in %s on line %d -Warning: file(%s/test/bad/../bad/bad.txt): failed to open stream: %s in %s on line %d +Warning: file(%s/test/bad/../bad/bad.txt): failed to open stream: Operation not permitted in %s on line %d bool(false) array(1) { [0]=> diff --git a/tests/security/open_basedir_file_get_contents.phpt b/tests/security/open_basedir_file_get_contents.phpt index db117e4775..637c499eae 100644 --- a/tests/security/open_basedir_file_get_contents.phpt +++ b/tests/security/open_basedir_file_get_contents.phpt @@ -31,42 +31,42 @@ bool(true) Warning: file_get_contents(): open_basedir restriction in effect. File(../bad) is not within the allowed path(s): (.) in %s on line %d -Warning: file_get_contents(../bad): failed to open stream: %s in %s on line %d +Warning: file_get_contents(../bad): failed to open stream: Operation not permitted in %s on line %d bool(false) Warning: file_get_contents(): open_basedir restriction in effect. File(../bad/bad.txt) is not within the allowed path(s): (.) in %s on line %d -Warning: file_get_contents(../bad/bad.txt): failed to open stream: %s in %s on line %d +Warning: file_get_contents(../bad/bad.txt): failed to open stream: Operation not permitted in %s on line %d bool(false) Warning: file_get_contents(): open_basedir restriction in effect. File(..) is not within the allowed path(s): (.) in %s on line %d -Warning: file_get_contents(..): failed to open stream: %s in %s on line %d +Warning: file_get_contents(..): failed to open stream: Operation not permitted in %s on line %d bool(false) Warning: file_get_contents(): open_basedir restriction in effect. File(../) is not within the allowed path(s): (.) in %s on line %d -Warning: file_get_contents(../): failed to open stream: %s in %s on line %d +Warning: file_get_contents(../): failed to open stream: Operation not permitted in %s on line %d bool(false) Warning: file_get_contents(): open_basedir restriction in effect. File(/) is not within the allowed path(s): (.) in %s on line %d -Warning: file_get_contents(/): failed to open stream: %s in %s on line %d +Warning: file_get_contents(/): failed to open stream: Operation not permitted in %s on line %d bool(false) Warning: file_get_contents(): open_basedir restriction in effect. File(../bad/.) is not within the allowed path(s): (.) in %s on line %d -Warning: file_get_contents(../bad/.): failed to open stream: %s in %s on line %d +Warning: file_get_contents(../bad/.): failed to open stream: Operation not permitted in %s on line %d bool(false) Warning: file_get_contents(): open_basedir restriction in effect. File(%s/test/bad/bad.txt) is not within the allowed path(s): (.) in %s on line %d -Warning: file_get_contents(%s/test/bad/bad.txt): failed to open stream: %s in %s on line %d +Warning: file_get_contents(%s/test/bad/bad.txt): failed to open stream: Operation not permitted in %s on line %d bool(false) Warning: file_get_contents(): open_basedir restriction in effect. File(%s/test/bad/../bad/bad.txt) is not within the allowed path(s): (.) in %s on line %d -Warning: file_get_contents(%s/test/bad/../bad/bad.txt): failed to open stream: %s in %s on line %d +Warning: file_get_contents(%s/test/bad/../bad/bad.txt): failed to open stream: Operation not permitted in %s on line %d bool(false) string(12) "Hello World!" string(12) "Hello World!" diff --git a/tests/security/open_basedir_file_put_contents.phpt b/tests/security/open_basedir_file_put_contents.phpt index 720c81dfe2..d4bd417b59 100644 --- a/tests/security/open_basedir_file_put_contents.phpt +++ b/tests/security/open_basedir_file_put_contents.phpt @@ -31,27 +31,27 @@ bool(true) Warning: file_put_contents(): open_basedir restriction in effect. File(../bad/bad.txt) is not within the allowed path(s): (.) in %s on line %d -Warning: file_put_contents(../bad/bad.txt): failed to open stream: %s in %s on line %d +Warning: file_put_contents(../bad/bad.txt): failed to open stream: Operation not permitted in %s on line %d bool(false) Warning: file_put_contents(): open_basedir restriction in effect. File(.././bad/bad.txt) is not within the allowed path(s): (.) in %s on line %d -Warning: file_put_contents(.././bad/bad.txt): failed to open stream: %s in %s on line %d +Warning: file_put_contents(.././bad/bad.txt): failed to open stream: Operation not permitted in %s on line %d bool(false) Warning: file_put_contents(): open_basedir restriction in effect. File(../bad/../bad/bad.txt) is not within the allowed path(s): (.) in %s on line %d -Warning: file_put_contents(../bad/../bad/bad.txt): failed to open stream: %s in %s on line %d +Warning: file_put_contents(../bad/../bad/bad.txt): failed to open stream: Operation not permitted in %s on line %d bool(false) Warning: file_put_contents(): open_basedir restriction in effect. File(./.././bad/bad.txt) is not within the allowed path(s): (.) in %s on line %d -Warning: file_put_contents(./.././bad/bad.txt): failed to open stream: %s in %s on line %d +Warning: file_put_contents(./.././bad/bad.txt): failed to open stream: Operation not permitted in %s on line %d bool(false) Warning: file_put_contents(): open_basedir restriction in effect. File%s/test/bad/bad.txt) is not within the allowed path(s): (.) in %s on line %d -Warning: file_put_contents%s/test/bad/bad.txt): failed to open stream: %s in %s on line %d +Warning: file_put_contents%s/test/bad/bad.txt): failed to open stream: Operation not permitted in %s on line %d bool(false) *** Finished testing open_basedir configuration [file_put_contents] *** diff --git a/tests/security/open_basedir_fopen.phpt b/tests/security/open_basedir_fopen.phpt index e90bf3e2bc..c6c9a253f2 100644 --- a/tests/security/open_basedir_fopen.phpt +++ b/tests/security/open_basedir_fopen.phpt @@ -40,42 +40,42 @@ bool(true) Warning: fopen(): open_basedir restriction in effect. File(../bad) is not within the allowed path(s): (.) in %s on line %d -Warning: fopen(../bad): failed to open stream: %s in %s on line %d +Warning: fopen(../bad): failed to open stream: Operation not permitted in %s on line %d bool(false) Warning: fopen(): open_basedir restriction in effect. File(../bad/bad.txt) is not within the allowed path(s): (.) in %s on line %d -Warning: fopen(../bad/bad.txt): failed to open stream: %s in %s on line %d +Warning: fopen(../bad/bad.txt): failed to open stream: Operation not permitted in %s on line %d bool(false) Warning: fopen(): open_basedir restriction in effect. File(..) is not within the allowed path(s): (.) in %s on line %d -Warning: fopen(..): failed to open stream: %s in %s on line %d +Warning: fopen(..): failed to open stream: Operation not permitted in %s on line %d bool(false) Warning: fopen(): open_basedir restriction in effect. File(../) is not within the allowed path(s): (.) in %s on line %d -Warning: fopen(../): failed to open stream: %s in %s on line %d +Warning: fopen(../): failed to open stream: Operation not permitted in %s on line %d bool(false) Warning: fopen(): open_basedir restriction in effect. File(/) is not within the allowed path(s): (.) in %s on line %d -Warning: fopen(/): failed to open stream: %s in %s on line %d +Warning: fopen(/): failed to open stream: Operation not permitted in %s on line %d bool(false) Warning: fopen(): open_basedir restriction in effect. File(../bad/.) is not within the allowed path(s): (.) in %s on line %d -Warning: fopen(../bad/.): failed to open stream: %s in %s on line %d +Warning: fopen(../bad/.): failed to open stream: Operation not permitted in %s on line %d bool(false) Warning: fopen(): open_basedir restriction in effect. File(../bad/./bad.txt) is not within the allowed path(s): (.) in %s on line %d -Warning: fopen(../bad/./bad.txt): failed to open stream: %s in %s on line 12 +Warning: fopen(../bad/./bad.txt): failed to open stream: Operation not permitted in %s on line 12 bool(false) Warning: fopen(): open_basedir restriction in effect. File(./../.) is not within the allowed path(s): (.) in %s on line %d -Warning: fopen(./../.): failed to open stream: %s in %s on line %d +Warning: fopen(./../.): failed to open stream: Operation not permitted in %s on line %d bool(false) resource(%d) of type (stream) resource(%d) of type (stream) diff --git a/tests/security/open_basedir_opendir.phpt b/tests/security/open_basedir_opendir.phpt index a935d5655f..077a5116b4 100644 --- a/tests/security/open_basedir_opendir.phpt +++ b/tests/security/open_basedir_opendir.phpt @@ -29,42 +29,42 @@ bool(true) Warning: opendir(): open_basedir restriction in effect. File(../bad) is not within the allowed path(s): (.) in %s on line %d -Warning: opendir(../bad): failed to open dir: %s in %s on line %d +Warning: opendir(../bad): failed to open dir: Operation not permitted in %s on line %d bool(false) Warning: opendir(): open_basedir restriction in effect. File(../bad/bad.txt) is not within the allowed path(s): (.) in %s on line %d -Warning: opendir(../bad/bad.txt): failed to open dir: %s in %s on line %d +Warning: opendir(../bad/bad.txt): failed to open dir: Operation not permitted in %s on line %d bool(false) Warning: opendir(): open_basedir restriction in effect. File(..) is not within the allowed path(s): (.) in %s on line %d -Warning: opendir(..): failed to open dir: %s in %s on line %d +Warning: opendir(..): failed to open dir: Operation not permitted in %s on line %d bool(false) Warning: opendir(): open_basedir restriction in effect. File(../) is not within the allowed path(s): (.) in %s on line %d -Warning: opendir(../): failed to open dir: %s in %s on line %d +Warning: opendir(../): failed to open dir: Operation not permitted in %s on line %d bool(false) Warning: opendir(): open_basedir restriction in effect. File(/) is not within the allowed path(s): (.) in %s on line %d -Warning: opendir(/): failed to open dir: %s in %s on line %d +Warning: opendir(/): failed to open dir: Operation not permitted in %s on line %d bool(false) Warning: opendir(): open_basedir restriction in effect. File(../bad/.) is not within the allowed path(s): (.) in %s on line %d -Warning: opendir(../bad/.): failed to open dir: %s in %s on line %d +Warning: opendir(../bad/.): failed to open dir: Operation not permitted in %s on line %d bool(false) Warning: opendir(): open_basedir restriction in effect. File(%s/test/bad/bad.txt) is not within the allowed path(s): (.) in %s on line %d -Warning: opendir(%s/test/bad/bad.txt): failed to open dir: %s in %s on line %d +Warning: opendir(%s/test/bad/bad.txt): failed to open dir: Operation not permitted in %s on line %d bool(false) Warning: opendir(): open_basedir restriction in effect. File(%s/test/bad/../bad/bad.txt) is not within the allowed path(s): (.) in %s on line %d -Warning: opendir(%s/test/bad/../bad/bad.txt): failed to open dir: %s in %s on line %d +Warning: opendir(%s/test/bad/../bad/bad.txt): failed to open dir: Operation not permitted in %s on line %d bool(false) resource(%d) of type (stream) resource(%d) of type (stream) diff --git a/tests/security/open_basedir_scandir.phpt b/tests/security/open_basedir_scandir.phpt index 77987402c6..a997bb993f 100644 --- a/tests/security/open_basedir_scandir.phpt +++ b/tests/security/open_basedir_scandir.phpt @@ -29,58 +29,58 @@ bool(true) Warning: scandir(): open_basedir restriction in effect. File(../bad) is not within the allowed path(s): (.) in %s on line %d -Warning: scandir(../bad): failed to open dir: %s in %s on line %d +Warning: scandir(../bad): failed to open dir: Operation not permitted in %s on line %d -Warning: scandir(): (errno 1): %s in %s on line %d +Warning: scandir(): (errno 1): Operation not permitted in %s on line %d bool(false) Warning: scandir(): open_basedir restriction in effect. File(../bad/bad.txt) is not within the allowed path(s): (.) in %s on line %d -Warning: scandir(../bad/bad.txt): failed to open dir: %s in %s on line %d +Warning: scandir(../bad/bad.txt): failed to open dir: Operation not permitted in %s on line %d -Warning: scandir(): (errno 1): %s in %s on line %d +Warning: scandir(): (errno 1): Operation not permitted in %s on line %d bool(false) Warning: scandir(): open_basedir restriction in effect. File(..) is not within the allowed path(s): (.) in %s on line %d -Warning: scandir(..): failed to open dir: %s in %s on line %d +Warning: scandir(..): failed to open dir: Operation not permitted in %s on line %d -Warning: scandir(): (errno 1): %s in %s on line %d +Warning: scandir(): (errno 1): Operation not permitted in %s on line %d bool(false) Warning: scandir(): open_basedir restriction in effect. File(../) is not within the allowed path(s): (.) in %s on line 80 -Warning: scandir(../): failed to open dir: %s in %s on line %d +Warning: scandir(../): failed to open dir: Operation not permitted in %s on line %d -Warning: scandir(): (errno 1): %s in %s on line %d +Warning: scandir(): (errno 1): Operation not permitted in %s on line %d bool(false) Warning: scandir(): open_basedir restriction in effect. File(/) is not within the allowed path(s): (.) in %s on line %d -Warning: scandir(/): failed to open dir: %s in %s on line %d +Warning: scandir(/): failed to open dir: Operation not permitted in %s on line %d -Warning: scandir(): (errno 1): %s in %s on line %d +Warning: scandir(): (errno 1): Operation not permitted in %s on line %d bool(false) Warning: scandir(): open_basedir restriction in effect. File(../bad/.) is not within the allowed path(s): (.) in %s on line %d -Warning: scandir(../bad/.): failed to open dir: %s in %s on line %d +Warning: scandir(../bad/.): failed to open dir: Operation not permitted in %s on line %d -Warning: scandir(): (errno 1): %s in %s on line %d +Warning: scandir(): (errno 1): Operation not permitted in %s on line %d bool(false) Warning: scandir(): open_basedir restriction in effect. File(%s/test/bad/bad.txt) is not within the allowed path(s): (.) in %s on line %d -Warning: scandir(%s/test/bad/bad.txt): failed to open dir: %s in %s on line %d +Warning: scandir(%s/test/bad/bad.txt): failed to open dir: Operation not permitted in %s on line %d -Warning: scandir(): (errno 1): %s in %s on line %d +Warning: scandir(): (errno 1): Operation not permitted in %s on line %d bool(false) Warning: scandir(): open_basedir restriction in effect. File(%s/test/bad/../bad/bad.txt) is not within the allowed path(s): (.) in %s on line %d -Warning: scandir(%s/test/bad/../bad/bad.txt): failed to open dir: %s in %s on line %d +Warning: scandir(%s/test/bad/../bad/bad.txt): failed to open dir: Operation not permitted in %s on line %d -Warning: scandir(): (errno 1): %s in %s on line %d +Warning: scandir(): (errno 1): Operation not permitted in %s on line %d bool(false) array(3) { [0]=> |