summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/basic/bug55500.phpt18
-rw-r--r--tests/basic/req60524-win.phpt2
-rw-r--r--tests/basic/req60524.phpt2
-rw-r--r--tests/basic/rfc1867_anonymous_upload.phpt20
-rw-r--r--tests/basic/rfc1867_array_upload.phpt30
-rw-r--r--tests/basic/rfc1867_boundary_1.phpt4
-rw-r--r--tests/basic/rfc1867_boundary_2.phpt4
-rw-r--r--tests/basic/rfc1867_empty_upload.phpt40
-rw-r--r--tests/basic/rfc1867_file_upload_disabled.phpt8
-rw-r--r--tests/basic/rfc1867_max_file_size.phpt38
-rw-r--r--tests/basic/rfc1867_missing_boundary_2.phpt12
-rw-r--r--tests/basic/rfc1867_post_max_filesize.phpt36
-rw-r--r--tests/classes/__call_001.phpt2
-rw-r--r--tests/classes/__call_002.phpt2
-rw-r--r--tests/classes/__set__get_001.phpt2
-rw-r--r--tests/classes/__set__get_002.phpt2
-rw-r--r--tests/classes/__set__get_003.phpt2
-rw-r--r--tests/classes/__set__get_004.phpt2
-rw-r--r--tests/classes/__set__get_005.phpt2
-rw-r--r--tests/classes/__set_data_corrupt.phpt2
-rw-r--r--tests/classes/abstract.phpt2
-rw-r--r--tests/classes/abstract_class.phpt2
-rw-r--r--tests/classes/abstract_derived.phpt2
-rw-r--r--tests/classes/abstract_final.phpt2
-rw-r--r--tests/classes/abstract_inherit.phpt2
-rw-r--r--tests/classes/abstract_not_declared.phpt2
-rw-r--r--tests/classes/abstract_redeclare.phpt2
-rw-r--r--tests/classes/array_access_001.phpt80
-rw-r--r--tests/classes/array_access_002.phpt80
-rw-r--r--tests/classes/array_access_003.phpt14
-rw-r--r--tests/classes/array_access_004.phpt14
-rw-r--r--tests/classes/autoload_001.phpt10
-rw-r--r--tests/classes/autoload_002.phpt10
-rw-r--r--tests/classes/autoload_003.phpt12
-rw-r--r--tests/classes/autoload_004.phpt12
-rw-r--r--tests/classes/autoload_005.phpt12
-rw-r--r--tests/classes/autoload_006.phpt12
-rw-r--r--tests/classes/autoload_007.phpt15
-rw-r--r--tests/classes/autoload_008.phpt37
-rw-r--r--tests/classes/autoload_009.phpt19
-rw-r--r--tests/classes/autoload_010.phpt17
-rw-r--r--tests/classes/autoload_011.phpt17
-rw-r--r--tests/classes/autoload_012.phpt11
-rw-r--r--tests/classes/autoload_013.phpt23
-rw-r--r--tests/classes/autoload_014.phpt23
-rw-r--r--tests/classes/autoload_015.phpt23
-rw-r--r--tests/classes/autoload_016.phpt23
-rw-r--r--tests/classes/autoload_017.phpt23
-rw-r--r--tests/classes/autoload_018.phpt73
-rw-r--r--tests/classes/autoload_019.phpt15
-rw-r--r--tests/classes/autoload_020.phpt11
-rw-r--r--tests/classes/autoload_021.phpt4
-rw-r--r--tests/classes/class_abstract.phpt2
-rw-r--r--tests/classes/class_final.phpt2
-rw-r--r--tests/classes/clone_001.phpt2
-rw-r--r--tests/classes/clone_002.phpt2
-rw-r--r--tests/classes/clone_003.phpt2
-rw-r--r--tests/classes/clone_006.phpt2
-rw-r--r--tests/classes/constants_basic_001.phpt2
-rw-r--r--tests/classes/constants_basic_003.inc2
-rw-r--r--tests/classes/constants_scope_001.phpt4
-rw-r--r--tests/classes/ctor_dtor.phpt2
-rw-r--r--tests/classes/ctor_dtor_inheritance.phpt2
-rw-r--r--tests/classes/dereferencing_001.phpt2
-rw-r--r--tests/classes/destructor_inheritance.phpt2
-rw-r--r--tests/classes/destructor_visibility_001.phpt2
-rw-r--r--tests/classes/destructor_visibility_002.phpt2
-rw-r--r--tests/classes/destructor_visibility_003.phpt2
-rw-r--r--tests/classes/factory_001.phpt2
-rw-r--r--tests/classes/factory_and_singleton_001.phpt2
-rw-r--r--tests/classes/factory_and_singleton_002.phpt2
-rw-r--r--tests/classes/factory_and_singleton_003.phpt2
-rw-r--r--tests/classes/factory_and_singleton_004.phpt2
-rw-r--r--tests/classes/factory_and_singleton_005.phpt2
-rw-r--r--tests/classes/factory_and_singleton_006.phpt2
-rw-r--r--tests/classes/factory_and_singleton_007.phpt2
-rw-r--r--tests/classes/factory_and_singleton_008.phpt2
-rw-r--r--tests/classes/factory_and_singleton_009.phpt2
-rw-r--r--tests/classes/factory_and_singleton_010.phpt2
-rw-r--r--tests/classes/final.phpt2
-rw-r--r--tests/classes/final_abstract.phpt2
-rw-r--r--tests/classes/final_redeclare.phpt2
-rw-r--r--tests/classes/implicit_instantiation_001.phpt44
-rw-r--r--tests/classes/inheritance_002.phpt2
-rw-r--r--tests/classes/inheritance_006.phpt4
-rw-r--r--tests/classes/interface_and_extends.phpt2
-rw-r--r--tests/classes/interface_class.phpt2
-rw-r--r--tests/classes/interface_doubled.phpt2
-rw-r--r--tests/classes/interface_implemented.phpt2
-rw-r--r--tests/classes/interface_instantiate.phpt2
-rw-r--r--tests/classes/interface_member.phpt2
-rw-r--r--tests/classes/interface_method.phpt2
-rw-r--r--tests/classes/interface_method_final.phpt2
-rw-r--r--tests/classes/interface_method_private.phpt2
-rw-r--r--tests/classes/interface_must_be_implemented.phpt2
-rw-r--r--tests/classes/interface_optional_arg.phpt2
-rw-r--r--tests/classes/interface_optional_arg_002.phpt2
-rw-r--r--tests/classes/interface_optional_arg_003.inc2
-rw-r--r--tests/classes/interfaces_001.phpt2
-rw-r--r--tests/classes/interfaces_002.phpt2
-rw-r--r--tests/classes/iterators_001.phpt2
-rw-r--r--tests/classes/iterators_002.phpt2
-rw-r--r--tests/classes/iterators_003.phpt2
-rw-r--r--tests/classes/iterators_004.phpt2
-rw-r--r--tests/classes/iterators_005.phpt2
-rw-r--r--tests/classes/iterators_006.phpt9
-rw-r--r--tests/classes/method_override_optional_arg_001.phpt2
-rw-r--r--tests/classes/object_reference_001.phpt2
-rw-r--r--tests/classes/private_001.phpt2
-rw-r--r--tests/classes/private_002.phpt2
-rw-r--r--tests/classes/private_003.phpt2
-rw-r--r--tests/classes/private_003b.phpt2
-rw-r--r--tests/classes/private_004.phpt2
-rw-r--r--tests/classes/private_004b.phpt2
-rw-r--r--tests/classes/private_005.phpt2
-rw-r--r--tests/classes/private_005b.phpt2
-rw-r--r--tests/classes/private_006.phpt2
-rw-r--r--tests/classes/private_006b.phpt2
-rw-r--r--tests/classes/private_007.phpt2
-rw-r--r--tests/classes/private_007b.phpt2
-rw-r--r--tests/classes/private_members.phpt2
-rw-r--r--tests/classes/property_recreate_private.phpt16
-rw-r--r--tests/classes/property_recreate_protected.phpt8
-rw-r--r--tests/classes/protected_001.phpt2
-rw-r--r--tests/classes/protected_001b.phpt2
-rw-r--r--tests/classes/protected_002.phpt2
-rw-r--r--tests/classes/serialize_001.phpt10
-rw-r--r--tests/classes/singleton_001.phpt2
-rw-r--r--tests/classes/static_mix_1.phpt2
-rw-r--r--tests/classes/static_mix_2.phpt2
-rw-r--r--tests/classes/static_properties_001.phpt2
-rw-r--r--tests/classes/static_properties_003.phpt4
-rw-r--r--tests/classes/static_properties_004.phpt18
-rw-r--r--tests/classes/this.phpt2
-rw-r--r--tests/classes/tostring_002.phpt2
-rw-r--r--tests/classes/type_hinting_001.phpt2
-rw-r--r--tests/classes/type_hinting_002.phpt2
-rw-r--r--tests/classes/type_hinting_005b.phpt14
-rw-r--r--tests/classes/visibility_000a.phpt2
-rw-r--r--tests/classes/visibility_000b.phpt2
-rw-r--r--tests/classes/visibility_000c.phpt2
-rw-r--r--tests/classes/visibility_001a.phpt2
-rw-r--r--tests/classes/visibility_001b.phpt2
-rw-r--r--tests/classes/visibility_001c.phpt2
-rw-r--r--tests/classes/visibility_002a.phpt2
-rw-r--r--tests/classes/visibility_002b.phpt2
-rw-r--r--tests/classes/visibility_002c.phpt2
-rw-r--r--tests/classes/visibility_003a.phpt2
-rw-r--r--tests/classes/visibility_003b.phpt2
-rw-r--r--tests/classes/visibility_003c.phpt2
-rw-r--r--tests/classes/visibility_004a.phpt2
-rw-r--r--tests/classes/visibility_004b.phpt2
-rw-r--r--tests/classes/visibility_004c.phpt2
-rw-r--r--tests/lang/015.inc2
-rw-r--r--tests/lang/016.inc2
-rw-r--r--tests/lang/023-1.inc34
-rw-r--r--tests/lang/023-2.inc2
-rw-r--r--tests/lang/031.phpt4
-rw-r--r--tests/lang/035.phpt2
-rw-r--r--tests/lang/bug17115.phpt3
-rw-r--r--tests/lang/bug21961.phpt2
-rw-r--r--tests/lang/bug22690.phpt4
-rw-r--r--tests/lang/bug23922.phpt3
-rw-r--r--tests/lang/bug24926.phpt3
-rw-r--r--tests/lang/bug38579.phpt2
-rw-r--r--tests/lang/bug7515.phpt2
-rw-r--r--tests/lang/each_binary_safety.phpt4
-rw-r--r--tests/lang/engine_assignExecutionOrder_001.phpt16
-rw-r--r--tests/lang/error_2_exception_001.phpt2
-rw-r--r--tests/lang/type_hints_001.phpt2
-rw-r--r--tests/lang/type_hints_002.phpt2
-rw-r--r--tests/lang/type_hints_003.phpt2
-rw-r--r--tests/output/bug74815.phpt15
-rw-r--r--tests/output/ob_clean_error_001.phpt2
-rw-r--r--tests/output/ob_end_flush_error_001.phpt2
-rw-r--r--tests/output/ob_flush_error_001.phpt2
-rw-r--r--tests/output/ob_get_level_error_001.phpt2
-rw-r--r--tests/output/ob_implicit_flush_variation_001.phpt12
-rw-r--r--tests/output/sapi_windows_vt100_support.inc65
-rw-r--r--tests/output/sapi_windows_vt100_support_notwindows.phpt14
-rw-r--r--tests/output/sapi_windows_vt100_support_winko_err.phpt148
-rw-r--r--tests/output/sapi_windows_vt100_support_winko_in-err.phpt148
-rw-r--r--tests/output/sapi_windows_vt100_support_winko_in-out-err.phpt148
-rw-r--r--tests/output/sapi_windows_vt100_support_winko_in-out.phpt148
-rw-r--r--tests/output/sapi_windows_vt100_support_winko_out-err.phpt148
-rw-r--r--tests/output/sapi_windows_vt100_support_winko_out.phpt148
-rw-r--r--tests/output/sapi_windows_vt100_support_winok_err.phpt148
-rw-r--r--tests/output/sapi_windows_vt100_support_winok_in-err.phpt148
-rw-r--r--tests/output/sapi_windows_vt100_support_winok_in-out-err.phpt148
-rw-r--r--tests/output/sapi_windows_vt100_support_winok_in-out.phpt148
-rw-r--r--tests/output/sapi_windows_vt100_support_winok_out-err.phpt148
-rw-r--r--tests/output/sapi_windows_vt100_support_winok_out.phpt148
-rw-r--r--tests/output/stream_isatty.inc36
-rw-r--r--tests/output/stream_isatty_err.phpt32
-rw-r--r--tests/output/stream_isatty_in-err.phpt32
-rw-r--r--tests/output/stream_isatty_in-out-err.phpt32
-rw-r--r--tests/output/stream_isatty_in-out.phpt32
-rw-r--r--tests/output/stream_isatty_out-err.phpt32
-rw-r--r--tests/output/stream_isatty_out.phpt32
-rw-r--r--tests/quicktester.inc4
-rw-r--r--tests/run-test/test005.phpt3
-rw-r--r--tests/run-test/test008.phpt3
-rw-r--r--tests/run-test/test008a.phpt3
-rw-r--r--tests/security/open_basedir.inc8
-rw-r--r--tests/security/open_basedir_001.phpt2
-rw-r--r--tests/security/open_basedir_link.phpt2
-rw-r--r--tests/security/open_basedir_linkinfo.phpt2
-rw-r--r--tests/security/open_basedir_mkdir.phpt2
-rw-r--r--tests/security/open_basedir_parse_ini_file.phpt2
-rw-r--r--tests/security/open_basedir_readlink.phpt4
-rw-r--r--tests/security/open_basedir_realpath.phpt2
-rw-r--r--tests/security/open_basedir_symlink.phpt4
212 files changed, 2625 insertions, 774 deletions
diff --git a/tests/basic/bug55500.phpt b/tests/basic/bug55500.phpt
index 97eeea2c8c..2f9e393348 100644
--- a/tests/basic/bug55500.phpt
+++ b/tests/basic/bug55500.phpt
@@ -35,29 +35,29 @@ var_dump($_POST);
?>
--EXPECTF--
array(1) {
- [%u|b%"file"]=>
+ ["file"]=>
array(5) {
- [%u|b%"name"]=>
+ ["name"]=>
array(1) {
[0]=>
- %unicode|string%(9) "file1.txt"
+ string(9) "file1.txt"
}
- [%u|b%"type"]=>
+ ["type"]=>
array(1) {
[0]=>
- %unicode|string%(16) "text/plain-file1"
+ string(16) "text/plain-file1"
}
- [%u|b%"tmp_name"]=>
+ ["tmp_name"]=>
array(1) {
[0]=>
- %unicode|string%(%d) "%s"
+ string(%d) "%s"
}
- [%u|b%"error"]=>
+ ["error"]=>
array(1) {
[0]=>
int(0)
}
- [%u|b%"size"]=>
+ ["size"]=>
array(1) {
[0]=>
int(1)
diff --git a/tests/basic/req60524-win.phpt b/tests/basic/req60524-win.phpt
index b2e7cfdab4..26fa9d9c5c 100644
--- a/tests/basic/req60524-win.phpt
+++ b/tests/basic/req60524-win.phpt
@@ -4,7 +4,7 @@ Req #60524 (Specify temporary directory)
sys_temp_dir=C:\Windows
--SKIPIF--
<?php
-if( substr(PHP_OS, 0, 3) != "WIN" )
+if(PHP_OS_FAMILY !== "Windows")
die('skip Run only on Windows');
?>
--FILE--
diff --git a/tests/basic/req60524.phpt b/tests/basic/req60524.phpt
index 7cc3edfabf..670940598a 100644
--- a/tests/basic/req60524.phpt
+++ b/tests/basic/req60524.phpt
@@ -4,7 +4,7 @@ Req #60524 (Specify temporary directory)
sys_temp_dir=/path/to/temp/dir
--SKIPIF--
<?php
-if (substr(PHP_OS, 0, 3) == 'WIN') {
+if(PHP_OS_FAMILY === "Windows") {
die('skip non-windows only test');
}
?>
diff --git a/tests/basic/rfc1867_anonymous_upload.phpt b/tests/basic/rfc1867_anonymous_upload.phpt
index 361bbbcca7..1612d554cf 100644
--- a/tests/basic/rfc1867_anonymous_upload.phpt
+++ b/tests/basic/rfc1867_anonymous_upload.phpt
@@ -26,28 +26,28 @@ var_dump($_POST);
array(2) {
[%d]=>
array(5) {
- [%u|b%"name"]=>
+ ["name"]=>
%string|unicode%(9) "file1.txt"
- [%u|b%"type"]=>
+ ["type"]=>
%string|unicode%(16) "text/plain-file1"
- [%u|b%"tmp_name"]=>
+ ["tmp_name"]=>
%string|unicode%(%d) "%s"
- [%u|b%"error"]=>
+ ["error"]=>
int(0)
- [%u|b%"size"]=>
+ ["size"]=>
int(1)
}
[%d]=>
array(5) {
- [%u|b%"name"]=>
+ ["name"]=>
%string|unicode%(9) "file2.txt"
- [%u|b%"type"]=>
+ ["type"]=>
%string|unicode%(16) "text/plain-file2"
- [%u|b%"tmp_name"]=>
+ ["tmp_name"]=>
%string|unicode%(%d) "%s"
- [%u|b%"error"]=>
+ ["error"]=>
int(0)
- [%u|b%"size"]=>
+ ["size"]=>
int(1)
}
}
diff --git a/tests/basic/rfc1867_array_upload.phpt b/tests/basic/rfc1867_array_upload.phpt
index bbaa5c82ef..90ed0c36e0 100644
--- a/tests/basic/rfc1867_array_upload.phpt
+++ b/tests/basic/rfc1867_array_upload.phpt
@@ -29,36 +29,36 @@ var_dump($_POST);
?>
--EXPECTF--
array(1) {
- [%u|b%"file"]=>
+ ["file"]=>
array(5) {
- [%u|b%"name"]=>
+ ["name"]=>
array(3) {
[0]=>
- %unicode|string%(9) "file1.txt"
+ string(9) "file1.txt"
[2]=>
- %unicode|string%(9) "file2.txt"
+ string(9) "file2.txt"
[3]=>
- %unicode|string%(9) "file3.txt"
+ string(9) "file3.txt"
}
- [%u|b%"type"]=>
+ ["type"]=>
array(3) {
[0]=>
- %unicode|string%(16) "text/plain-file1"
+ string(16) "text/plain-file1"
[2]=>
- %unicode|string%(16) "text/plain-file2"
+ string(16) "text/plain-file2"
[3]=>
- %unicode|string%(16) "text/plain-file3"
+ string(16) "text/plain-file3"
}
- [%u|b%"tmp_name"]=>
+ ["tmp_name"]=>
array(3) {
[0]=>
- %unicode|string%(%d) "%s"
+ string(%d) "%s"
[2]=>
- %unicode|string%(%d) "%s"
+ string(%d) "%s"
[3]=>
- %unicode|string%(%d) "%s"
+ string(%d) "%s"
}
- [%u|b%"error"]=>
+ ["error"]=>
array(3) {
[0]=>
int(0)
@@ -67,7 +67,7 @@ array(1) {
[3]=>
int(0)
}
- [%u|b%"size"]=>
+ ["size"]=>
array(3) {
[0]=>
int(1)
diff --git a/tests/basic/rfc1867_boundary_1.phpt b/tests/basic/rfc1867_boundary_1.phpt
index e5321201a5..bea825e797 100644
--- a/tests/basic/rfc1867_boundary_1.phpt
+++ b/tests/basic/rfc1867_boundary_1.phpt
@@ -18,6 +18,6 @@ var_dump($_POST);
array(0) {
}
array(1) {
- [%u|b%"foobar"]=>
- %unicode|string%(1) "1"
+ ["foobar"]=>
+ string(1) "1"
}
diff --git a/tests/basic/rfc1867_boundary_2.phpt b/tests/basic/rfc1867_boundary_2.phpt
index 88f213fffa..b59fc6db98 100644
--- a/tests/basic/rfc1867_boundary_2.phpt
+++ b/tests/basic/rfc1867_boundary_2.phpt
@@ -18,6 +18,6 @@ var_dump($_POST);
array(0) {
}
array(1) {
- [%u|b%"foobar"]=>
- %unicode|string%(1) "1"
+ ["foobar"]=>
+ string(1) "1"
}
diff --git a/tests/basic/rfc1867_empty_upload.phpt b/tests/basic/rfc1867_empty_upload.phpt
index 039d994c50..bb6ccee896 100644
--- a/tests/basic/rfc1867_empty_upload.phpt
+++ b/tests/basic/rfc1867_empty_upload.phpt
@@ -39,49 +39,49 @@ if (is_uploaded_file($_FILES["file3"]["tmp_name"])) {
?>
--EXPECTF--
array(3) {
- [%u|b%"file1"]=>
+ ["file1"]=>
array(5) {
- [%u|b%"name"]=>
+ ["name"]=>
%string|unicode%(9) "file1.txt"
- [%u|b%"type"]=>
+ ["type"]=>
%string|unicode%(16) "text/plain-file1"
- [%u|b%"tmp_name"]=>
+ ["tmp_name"]=>
%string|unicode%(%d) "%s"
- [%u|b%"error"]=>
+ ["error"]=>
int(0)
- [%u|b%"size"]=>
+ ["size"]=>
int(1)
}
- [%u|b%"file2"]=>
+ ["file2"]=>
array(5) {
- [%u|b%"name"]=>
+ ["name"]=>
%string|unicode%(0) ""
- [%u|b%"type"]=>
+ ["type"]=>
%string|unicode%(0) ""
- [%u|b%"tmp_name"]=>
+ ["tmp_name"]=>
%string|unicode%(0) ""
- [%u|b%"error"]=>
+ ["error"]=>
int(4)
- [%u|b%"size"]=>
+ ["size"]=>
int(0)
}
- [%u|b%"file3"]=>
+ ["file3"]=>
array(5) {
- [%u|b%"name"]=>
+ ["name"]=>
%string|unicode%(9) "file3.txt"
- [%u|b%"type"]=>
+ ["type"]=>
%string|unicode%(16) "text/plain-file3"
- [%u|b%"tmp_name"]=>
+ ["tmp_name"]=>
%string|unicode%(%d) "%s"
- [%u|b%"error"]=>
+ ["error"]=>
int(0)
- [%u|b%"size"]=>
+ ["size"]=>
int(1)
}
}
array(1) {
- [%u|b%"foo"]=>
- %unicode|string%(0) ""
+ ["foo"]=>
+ 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
index aa4b5ee0f1..1e1a747372 100644
--- a/tests/basic/rfc1867_file_upload_disabled.phpt
+++ b/tests/basic/rfc1867_file_upload_disabled.phpt
@@ -27,8 +27,8 @@ var_dump($_POST);
array(0) {
}
array(2) {
- [%u|b%"foo"]=>
- %unicode|string%(3) "bar"
- [%u|b%"bar"]=>
- %unicode|string%(3) "foo"
+ ["foo"]=>
+ string(3) "bar"
+ ["bar"]=>
+ string(3) "foo"
}
diff --git a/tests/basic/rfc1867_max_file_size.phpt b/tests/basic/rfc1867_max_file_size.phpt
index 1b7b9aabee..61fd89f3d2 100644
--- a/tests/basic/rfc1867_max_file_size.phpt
+++ b/tests/basic/rfc1867_max_file_size.phpt
@@ -39,48 +39,48 @@ if (is_uploaded_file($_FILES["file3"]["tmp_name"])) {
?>
--EXPECTF--
array(3) {
- [%u|b%"file1"]=>
+ ["file1"]=>
array(5) {
- [%u|b%"name"]=>
+ ["name"]=>
%string|unicode%(9) "file1.txt"
- [%u|b%"type"]=>
+ ["type"]=>
%string|unicode%(16) "text/plain-file1"
- [%u|b%"tmp_name"]=>
+ ["tmp_name"]=>
%string|unicode%(%d) "%s"
- [%u|b%"error"]=>
+ ["error"]=>
int(0)
- [%u|b%"size"]=>
+ ["size"]=>
int(1)
}
- [%u|b%"file2"]=>
+ ["file2"]=>
array(5) {
- [%u|b%"name"]=>
+ ["name"]=>
%string|unicode%(9) "file2.txt"
- [%u|b%"type"]=>
+ ["type"]=>
%string|unicode%(0) ""
- [%u|b%"tmp_name"]=>
+ ["tmp_name"]=>
%string|unicode%(0) ""
- [%u|b%"error"]=>
+ ["error"]=>
int(2)
- [%u|b%"size"]=>
+ ["size"]=>
int(0)
}
- [%u|b%"file3"]=>
+ ["file3"]=>
array(5) {
- [%u|b%"name"]=>
+ ["name"]=>
%string|unicode%(9) "file3.txt"
- [%u|b%"type"]=>
+ ["type"]=>
%string|unicode%(16) "text/plain-file3"
- [%u|b%"tmp_name"]=>
+ ["tmp_name"]=>
%string|unicode%(%d) "%s"
- [%u|b%"error"]=>
+ ["error"]=>
int(0)
- [%u|b%"size"]=>
+ ["size"]=>
int(1)
}
}
array(1) {
- [%u|b%"MAX_FILE_SIZE"]=>
+ ["MAX_FILE_SIZE"]=>
%string|unicode%(1) "1"
}
string(1) "1"
diff --git a/tests/basic/rfc1867_missing_boundary_2.phpt b/tests/basic/rfc1867_missing_boundary_2.phpt
index 1c4581c6c3..9cc847f780 100644
--- a/tests/basic/rfc1867_missing_boundary_2.phpt
+++ b/tests/basic/rfc1867_missing_boundary_2.phpt
@@ -17,17 +17,17 @@ var_dump($_POST);
?>
--EXPECTF--
array(1) {
- [%u|b%"file1"]=>
+ ["file1"]=>
array(5) {
- [%u|b%"name"]=>
+ ["name"]=>
%string|unicode%(9) "file1.txt"
- [%u|b%"type"]=>
+ ["type"]=>
%string|unicode%(0) ""
- [%u|b%"tmp_name"]=>
+ ["tmp_name"]=>
%string|unicode%(0) ""
- [%u|b%"error"]=>
+ ["error"]=>
int(3)
- [%u|b%"size"]=>
+ ["size"]=>
int(0)
}
}
diff --git a/tests/basic/rfc1867_post_max_filesize.phpt b/tests/basic/rfc1867_post_max_filesize.phpt
index da851c417c..89115d0703 100644
--- a/tests/basic/rfc1867_post_max_filesize.phpt
+++ b/tests/basic/rfc1867_post_max_filesize.phpt
@@ -35,43 +35,43 @@ if (is_uploaded_file($_FILES["file3"]["tmp_name"])) {
?>
--EXPECTF--
array(3) {
- [%u|b%"file1"]=>
+ ["file1"]=>
array(5) {
- [%u|b%"name"]=>
+ ["name"]=>
%string|unicode%(9) "file1.txt"
- [%u|b%"type"]=>
+ ["type"]=>
%string|unicode%(16) "text/plain-file1"
- [%u|b%"tmp_name"]=>
+ ["tmp_name"]=>
%string|unicode%(%d) "%s"
- [%u|b%"error"]=>
+ ["error"]=>
int(0)
- [%u|b%"size"]=>
+ ["size"]=>
int(1)
}
- [%u|b%"file2"]=>
+ ["file2"]=>
array(5) {
- [%u|b%"name"]=>
+ ["name"]=>
%string|unicode%(9) "file2.txt"
- [%u|b%"type"]=>
+ ["type"]=>
%string|unicode%(0) ""
- [%u|b%"tmp_name"]=>
+ ["tmp_name"]=>
%string|unicode%(0) ""
- [%u|b%"error"]=>
+ ["error"]=>
int(1)
- [%u|b%"size"]=>
+ ["size"]=>
int(0)
}
- [%u|b%"file3"]=>
+ ["file3"]=>
array(5) {
- [%u|b%"name"]=>
+ ["name"]=>
%string|unicode%(9) "file3.txt"
- [%u|b%"type"]=>
+ ["type"]=>
%string|unicode%(16) "text/plain-file3"
- [%u|b%"tmp_name"]=>
+ ["tmp_name"]=>
%string|unicode%(%d) "%s"
- [%u|b%"error"]=>
+ ["error"]=>
int(0)
- [%u|b%"size"]=>
+ ["size"]=>
int(1)
}
}
diff --git a/tests/classes/__call_001.phpt b/tests/classes/__call_001.phpt
index f9708e04f1..be2d0248cc 100644
--- a/tests/classes/__call_001.phpt
+++ b/tests/classes/__call_001.phpt
@@ -1,7 +1,5 @@
--TEST--
ZE2 __call()
---SKIPIF--
-<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?>
--FILE--
<?php
diff --git a/tests/classes/__call_002.phpt b/tests/classes/__call_002.phpt
index 53a179f787..f58ec47dcb 100644
--- a/tests/classes/__call_002.phpt
+++ b/tests/classes/__call_002.phpt
@@ -1,7 +1,5 @@
--TEST--
ZE2 __call() signature check
---SKIPIF--
-<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?>
--FILE--
<?php
diff --git a/tests/classes/__set__get_001.phpt b/tests/classes/__set__get_001.phpt
index beb688c222..3c9cb09b4a 100644
--- a/tests/classes/__set__get_001.phpt
+++ b/tests/classes/__set__get_001.phpt
@@ -1,7 +1,5 @@
--TEST--
ZE2 __set() and __get()
---SKIPIF--
-<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?>
--FILE--
<?php
class setter {
diff --git a/tests/classes/__set__get_002.phpt b/tests/classes/__set__get_002.phpt
index 71111ccdf8..5d3b5db543 100644
--- a/tests/classes/__set__get_002.phpt
+++ b/tests/classes/__set__get_002.phpt
@@ -1,7 +1,5 @@
--TEST--
ZE2 __get() signature check
---SKIPIF--
-<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?>
--FILE--
<?php
class Test {
diff --git a/tests/classes/__set__get_003.phpt b/tests/classes/__set__get_003.phpt
index 390d303362..16b09b76b1 100644
--- a/tests/classes/__set__get_003.phpt
+++ b/tests/classes/__set__get_003.phpt
@@ -1,7 +1,5 @@
--TEST--
ZE2 __set() signature check
---SKIPIF--
-<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?>
--FILE--
<?php
class Test {
diff --git a/tests/classes/__set__get_004.phpt b/tests/classes/__set__get_004.phpt
index e3061da4f0..523cccee1e 100644
--- a/tests/classes/__set__get_004.phpt
+++ b/tests/classes/__set__get_004.phpt
@@ -1,7 +1,5 @@
--TEST--
ZE2 __set() and __get()
---SKIPIF--
-<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?>
--FILE--
<?php
class Test {
diff --git a/tests/classes/__set__get_005.phpt b/tests/classes/__set__get_005.phpt
index d8bbad3d45..fd23cf6276 100644
--- a/tests/classes/__set__get_005.phpt
+++ b/tests/classes/__set__get_005.phpt
@@ -1,7 +1,5 @@
--TEST--
ZE2 __set() and __get()
---SKIPIF--
-<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?>
--FILE--
<?php
class Test
diff --git a/tests/classes/__set_data_corrupt.phpt b/tests/classes/__set_data_corrupt.phpt
index 6a52bd489b..8b51302ab3 100644
--- a/tests/classes/__set_data_corrupt.phpt
+++ b/tests/classes/__set_data_corrupt.phpt
@@ -1,7 +1,5 @@
--TEST--
ZE2 Data corruption in __set
---SKIPIF--
-<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 is needed'); ?>
--FILE--
<?php
$f = 'c="foo"';
diff --git a/tests/classes/abstract.phpt b/tests/classes/abstract.phpt
index 5852005f43..f46e5130a7 100644
--- a/tests/classes/abstract.phpt
+++ b/tests/classes/abstract.phpt
@@ -1,7 +1,5 @@
--TEST--
ZE2 An abstract method may not be called
---SKIPIF--
-<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?>
--FILE--
<?php
diff --git a/tests/classes/abstract_class.phpt b/tests/classes/abstract_class.phpt
index 2085bff009..fabe890eae 100644
--- a/tests/classes/abstract_class.phpt
+++ b/tests/classes/abstract_class.phpt
@@ -1,7 +1,5 @@
--TEST--
ZE2 An abstract class cannot be instantiated
---SKIPIF--
-<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?>
--FILE--
<?php
diff --git a/tests/classes/abstract_derived.phpt b/tests/classes/abstract_derived.phpt
index 0feceac6bb..21f8fd8788 100644
--- a/tests/classes/abstract_derived.phpt
+++ b/tests/classes/abstract_derived.phpt
@@ -1,7 +1,5 @@
--TEST--
ZE2 A derived class with an abstract method must be abstract
---SKIPIF--
-<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?>
--FILE--
<?php
diff --git a/tests/classes/abstract_final.phpt b/tests/classes/abstract_final.phpt
index 20c7ae375f..cdf61d17e7 100644
--- a/tests/classes/abstract_final.phpt
+++ b/tests/classes/abstract_final.phpt
@@ -1,7 +1,5 @@
--TEST--
ZE2 A final method cannot be abstract
---SKIPIF--
-<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?>
--FILE--
<?php
diff --git a/tests/classes/abstract_inherit.phpt b/tests/classes/abstract_inherit.phpt
index 583043d22b..1acf19d7c0 100644
--- a/tests/classes/abstract_inherit.phpt
+++ b/tests/classes/abstract_inherit.phpt
@@ -1,7 +1,5 @@
--TEST--
ZE2 A class that inherits an abstract method is abstract
---SKIPIF--
-<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?>
--FILE--
<?php
diff --git a/tests/classes/abstract_not_declared.phpt b/tests/classes/abstract_not_declared.phpt
index 3b81cd4980..8c2d880150 100644
--- a/tests/classes/abstract_not_declared.phpt
+++ b/tests/classes/abstract_not_declared.phpt
@@ -1,7 +1,5 @@
--TEST--
ZE2 An abstract class must be declared abstract
---SKIPIF--
-<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?>
--FILE--
<?php
diff --git a/tests/classes/abstract_redeclare.phpt b/tests/classes/abstract_redeclare.phpt
index 9a0a1edc3c..8e09a3a12b 100644
--- a/tests/classes/abstract_redeclare.phpt
+++ b/tests/classes/abstract_redeclare.phpt
@@ -1,7 +1,5 @@
--TEST--
ZE2 A method cannot be redeclared abstract
---SKIPIF--
-<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?>
--FILE--
<?php
diff --git a/tests/classes/array_access_001.phpt b/tests/classes/array_access_001.phpt
index feed3fb8d9..784a886126 100644
--- a/tests/classes/array_access_001.phpt
+++ b/tests/classes/array_access_001.phpt
@@ -2,7 +2,7 @@
ZE2 ArrayAccess
--FILE--
<?php
-class object implements ArrayAccess {
+class ObjectOne implements ArrayAccess {
public $a = array('1st', 1, 2=>'3rd', '4th'=>4);
@@ -24,7 +24,7 @@ class object implements ArrayAccess {
}
}
-$obj = new Object;
+$obj = new ObjectOne;
var_dump($obj->a);
@@ -95,75 +95,75 @@ array(4) {
int(4)
}
===EMPTY===
-object::offsetExists(0)
-object::offsetGet(0)
+ObjectOne::offsetExists(0)
+ObjectOne::offsetGet(0)
bool(false)
-object::offsetExists(1)
-object::offsetGet(1)
+ObjectOne::offsetExists(1)
+ObjectOne::offsetGet(1)
bool(false)
-object::offsetExists(2)
-object::offsetGet(2)
+ObjectOne::offsetExists(2)
+ObjectOne::offsetGet(2)
bool(false)
-object::offsetExists(4th)
-object::offsetGet(4th)
+ObjectOne::offsetExists(4th)
+ObjectOne::offsetGet(4th)
bool(false)
-object::offsetExists(5th)
+ObjectOne::offsetExists(5th)
bool(true)
-object::offsetExists(6)
+ObjectOne::offsetExists(6)
bool(true)
===isset===
-object::offsetExists(0)
+ObjectOne::offsetExists(0)
bool(true)
-object::offsetExists(1)
+ObjectOne::offsetExists(1)
bool(true)
-object::offsetExists(2)
+ObjectOne::offsetExists(2)
bool(true)
-object::offsetExists(4th)
+ObjectOne::offsetExists(4th)
bool(true)
-object::offsetExists(5th)
+ObjectOne::offsetExists(5th)
bool(false)
-object::offsetExists(6)
+ObjectOne::offsetExists(6)
bool(false)
===offsetGet===
-object::offsetGet(0)
+ObjectOne::offsetGet(0)
string(3) "1st"
-object::offsetGet(1)
+ObjectOne::offsetGet(1)
int(1)
-object::offsetGet(2)
+ObjectOne::offsetGet(2)
string(3) "3rd"
-object::offsetGet(4th)
+ObjectOne::offsetGet(4th)
int(4)
-object::offsetGet(5th)
+ObjectOne::offsetGet(5th)
Notice: Undefined index: 5th in %sarray_access_001.php on line %d
NULL
-object::offsetGet(6)
+ObjectOne::offsetGet(6)
Notice: Undefined offset: 6 in %sarray_access_001.php on line %d
NULL
===offsetSet===
WRITE 1
-object::offsetSet(1,Changed 1)
-object::offsetGet(1)
+ObjectOne::offsetSet(1,Changed 1)
+ObjectOne::offsetGet(1)
string(9) "Changed 1"
WRITE 2
-object::offsetSet(4th,Changed 4th)
-object::offsetGet(4th)
+ObjectOne::offsetSet(4th,Changed 4th)
+ObjectOne::offsetGet(4th)
string(11) "Changed 4th"
WRITE 3
-object::offsetSet(5th,Added 5th)
-object::offsetGet(5th)
+ObjectOne::offsetSet(5th,Added 5th)
+ObjectOne::offsetGet(5th)
string(9) "Added 5th"
WRITE 4
-object::offsetSet(6,Added 6)
-object::offsetGet(6)
+ObjectOne::offsetSet(6,Added 6)
+ObjectOne::offsetGet(6)
string(7) "Added 6"
-object::offsetGet(0)
+ObjectOne::offsetGet(0)
string(3) "1st"
-object::offsetGet(2)
+ObjectOne::offsetGet(2)
string(3) "3rd"
-object::offsetSet(6,changed 6)
-object::offsetGet(6)
+ObjectOne::offsetSet(6,changed 6)
+ObjectOne::offsetGet(6)
string(9) "changed 6"
string(9) "changed 6"
===unset===
@@ -181,10 +181,10 @@ array(6) {
[6]=>
string(9) "changed 6"
}
-object::offsetUnset(2)
-object::offsetUnset(4th)
-object::offsetUnset(7)
-object::offsetUnset(8th)
+ObjectOne::offsetUnset(2)
+ObjectOne::offsetUnset(4th)
+ObjectOne::offsetUnset(7)
+ObjectOne::offsetUnset(8th)
array(4) {
[0]=>
string(3) "1st"
diff --git a/tests/classes/array_access_002.phpt b/tests/classes/array_access_002.phpt
index 68640c83f5..5e101914c0 100644
--- a/tests/classes/array_access_002.phpt
+++ b/tests/classes/array_access_002.phpt
@@ -2,7 +2,7 @@
ZE2 ArrayAccess::offsetSet without return
--FILE--
<?php
-class object implements ArrayAccess {
+class ObjectOne implements ArrayAccess {
public $a = array('1st', 1, 2=>'3rd', '4th'=>4);
@@ -24,7 +24,7 @@ class object implements ArrayAccess {
}
}
-$obj = new Object;
+$obj = new ObjectOne;
var_dump($obj->a);
@@ -95,75 +95,75 @@ array(4) {
int(4)
}
===EMPTY===
-object::offsetExists(0)
-object::offsetGet(0)
+ObjectOne::offsetExists(0)
+ObjectOne::offsetGet(0)
bool(false)
-object::offsetExists(1)
-object::offsetGet(1)
+ObjectOne::offsetExists(1)
+ObjectOne::offsetGet(1)
bool(false)
-object::offsetExists(2)
-object::offsetGet(2)
+ObjectOne::offsetExists(2)
+ObjectOne::offsetGet(2)
bool(false)
-object::offsetExists(4th)
-object::offsetGet(4th)
+ObjectOne::offsetExists(4th)
+ObjectOne::offsetGet(4th)
bool(false)
-object::offsetExists(5th)
+ObjectOne::offsetExists(5th)
bool(true)
-object::offsetExists(6)
+ObjectOne::offsetExists(6)
bool(true)
===isset===
-object::offsetExists(0)
+ObjectOne::offsetExists(0)
bool(true)
-object::offsetExists(1)
+ObjectOne::offsetExists(1)
bool(true)
-object::offsetExists(2)
+ObjectOne::offsetExists(2)
bool(true)
-object::offsetExists(4th)
+ObjectOne::offsetExists(4th)
bool(true)
-object::offsetExists(5th)
+ObjectOne::offsetExists(5th)
bool(false)
-object::offsetExists(6)
+ObjectOne::offsetExists(6)
bool(false)
===offsetGet===
-object::offsetGet(0)
+ObjectOne::offsetGet(0)
string(3) "1st"
-object::offsetGet(1)
+ObjectOne::offsetGet(1)
int(1)
-object::offsetGet(2)
+ObjectOne::offsetGet(2)
string(3) "3rd"
-object::offsetGet(4th)
+ObjectOne::offsetGet(4th)
int(4)
-object::offsetGet(5th)
+ObjectOne::offsetGet(5th)
Notice: Undefined index: 5th in %sarray_access_002.php on line %d
NULL
-object::offsetGet(6)
+ObjectOne::offsetGet(6)
Notice: Undefined offset: 6 in %sarray_access_002.php on line %d
NULL
===offsetSet===
WRITE 1
-object::offsetSet(1,Changed 1)
-object::offsetGet(1)
+ObjectOne::offsetSet(1,Changed 1)
+ObjectOne::offsetGet(1)
string(9) "Changed 1"
WRITE 2
-object::offsetSet(4th,Changed 4th)
-object::offsetGet(4th)
+ObjectOne::offsetSet(4th,Changed 4th)
+ObjectOne::offsetGet(4th)
string(11) "Changed 4th"
WRITE 3
-object::offsetSet(5th,Added 5th)
-object::offsetGet(5th)
+ObjectOne::offsetSet(5th,Added 5th)
+ObjectOne::offsetGet(5th)
string(9) "Added 5th"
WRITE 4
-object::offsetSet(6,Added 6)
-object::offsetGet(6)
+ObjectOne::offsetSet(6,Added 6)
+ObjectOne::offsetGet(6)
string(7) "Added 6"
-object::offsetGet(0)
+ObjectOne::offsetGet(0)
string(3) "1st"
-object::offsetGet(2)
+ObjectOne::offsetGet(2)
string(3) "3rd"
-object::offsetSet(6,changed 6)
-object::offsetGet(6)
+ObjectOne::offsetSet(6,changed 6)
+ObjectOne::offsetGet(6)
string(9) "changed 6"
string(9) "changed 6"
===unset===
@@ -181,10 +181,10 @@ array(6) {
[6]=>
string(9) "changed 6"
}
-object::offsetUnset(2)
-object::offsetUnset(4th)
-object::offsetUnset(7)
-object::offsetUnset(8th)
+ObjectOne::offsetUnset(2)
+ObjectOne::offsetUnset(4th)
+ObjectOne::offsetUnset(7)
+ObjectOne::offsetUnset(8th)
array(4) {
[0]=>
string(3) "1st"
diff --git a/tests/classes/array_access_003.phpt b/tests/classes/array_access_003.phpt
index 3e631125e7..8924d1575f 100644
--- a/tests/classes/array_access_003.phpt
+++ b/tests/classes/array_access_003.phpt
@@ -4,7 +4,7 @@ ZE2 ArrayAccess::offsetGet ambiguties
error_reporting=4095
--FILE--
<?php
-class object implements ArrayAccess {
+class ObjectOne implements ArrayAccess {
public $a = array('1st', 1, 2=>'3rd', '4th'=>4);
@@ -37,7 +37,7 @@ class object implements ArrayAccess {
}
}
-$obj = new Object;
+$obj = new ObjectOne;
var_dump($obj[1]);
var_dump($obj[2]);
@@ -47,13 +47,13 @@ var_dump($obj[2]);
?>
===DONE===
--EXPECTF--
-object::offsetGet(1)
+ObjectOne::offsetGet(1)
string(6) "fooBar"
-object::offsetGet(2)
+ObjectOne::offsetGet(2)
int(1)
-object::offsetGet(2)
+ObjectOne::offsetGet(2)
-Notice: Indirect modification of overloaded element of object has no effect in %sarray_access_003.php on line 39
-object::offsetGet(2)
+Notice: Indirect modification of overloaded element of ObjectOne has no effect in %sarray_access_003.php on line 39
+ObjectOne::offsetGet(2)
int(1)
===DONE===
diff --git a/tests/classes/array_access_004.phpt b/tests/classes/array_access_004.phpt
index 787496707c..22566937f2 100644
--- a/tests/classes/array_access_004.phpt
+++ b/tests/classes/array_access_004.phpt
@@ -2,7 +2,7 @@
ZE2 ArrayAccess::offsetGet ambiguties
--FILE--
<?php
-class object implements ArrayAccess {
+class ObjectOne implements ArrayAccess {
public $a = array('1st', 1, 2=>'3rd', '4th'=>4);
@@ -35,7 +35,7 @@ class object implements ArrayAccess {
}
}
-$obj = new Object;
+$obj = new ObjectOne;
var_dump($obj[1]);
var_dump($obj[2]);
@@ -45,13 +45,13 @@ var_dump($obj[2]);
?>
===DONE===
--EXPECTF--
-object::offsetGet(1)
+ObjectOne::offsetGet(1)
string(6) "fooBar"
-object::offsetGet(2)
+ObjectOne::offsetGet(2)
int(1)
-object::offsetGet(2)
+ObjectOne::offsetGet(2)
-Notice: Indirect modification of overloaded element of object has no effect in %sarray_access_004.php on line 39
-object::offsetGet(2)
+Notice: Indirect modification of overloaded element of ObjectOne has no effect in %sarray_access_004.php on line 39
+ObjectOne::offsetGet(2)
int(1)
===DONE===
diff --git a/tests/classes/autoload_001.phpt b/tests/classes/autoload_001.phpt
index 6f325f49bb..6c09c4e04d 100644
--- a/tests/classes/autoload_001.phpt
+++ b/tests/classes/autoload_001.phpt
@@ -2,23 +2,21 @@
ZE2 Autoload and class_exists
--SKIPIF--
<?php
- if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed');
if (class_exists('autoload_root', false)) die('skip Autoload test classes exist already');
?>
--FILE--
<?php
-function __autoload($class_name)
-{
+spl_autoload_register(function ($class_name) {
require_once(dirname(__FILE__) . '/' . $class_name . '.p5c');
- echo __FUNCTION__ . '(' . $class_name . ")\n";
-}
+ echo 'autoload(' . $class_name . ")\n";
+});
var_dump(class_exists('autoload_root'));
?>
===DONE===
--EXPECT--
-__autoload(autoload_root)
+autoload(autoload_root)
bool(true)
===DONE===
diff --git a/tests/classes/autoload_002.phpt b/tests/classes/autoload_002.phpt
index 27dea0f9d4..ecb1a44512 100644
--- a/tests/classes/autoload_002.phpt
+++ b/tests/classes/autoload_002.phpt
@@ -2,24 +2,22 @@
ZE2 Autoload and get_class_methods
--SKIPIF--
<?php
- if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed');
if (class_exists('autoload_root', false)) die('skip Autoload test classes exist already');
?>
--FILE--
<?php
-function __autoload($class_name)
-{
+spl_autoload_register(function ($class_name) {
require_once(dirname(__FILE__) . '/' . $class_name . '.p5c');
- echo __FUNCTION__ . '(' . $class_name . ")\n";
-}
+ echo 'autoload(' . $class_name . ")\n";
+});
var_dump(get_class_methods('autoload_root'));
?>
===DONE===
--EXPECT--
-__autoload(autoload_root)
+autoload(autoload_root)
array(1) {
[0]=>
string(12) "testFunction"
diff --git a/tests/classes/autoload_003.phpt b/tests/classes/autoload_003.phpt
index 7bdb5da36a..f79b85a9f0 100644
--- a/tests/classes/autoload_003.phpt
+++ b/tests/classes/autoload_003.phpt
@@ -2,24 +2,22 @@
ZE2 Autoload and derived classes
--SKIPIF--
<?php
- if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed');
if (class_exists('autoload_root', false)) die('skip Autoload test classes exist already');
?>
--FILE--
<?php
-function __autoload($class_name)
-{
+spl_autoload_register(function ($class_name) {
require_once(dirname(__FILE__) . '/' . $class_name . '.p5c');
- echo __FUNCTION__ . '(' . $class_name . ")\n";
-}
+ echo 'autoload(' . $class_name . ")\n";
+});
var_dump(class_exists('autoload_derived'));
?>
===DONE===
--EXPECT--
-__autoload(autoload_root)
-__autoload(autoload_derived)
+autoload(autoload_root)
+autoload(autoload_derived)
bool(true)
===DONE===
diff --git a/tests/classes/autoload_004.phpt b/tests/classes/autoload_004.phpt
index 23aea5d086..1f754ca030 100644
--- a/tests/classes/autoload_004.phpt
+++ b/tests/classes/autoload_004.phpt
@@ -2,18 +2,16 @@
ZE2 Autoload and recursion
--SKIPIF--
<?php
- if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed');
if (class_exists('autoload_root', false)) die('skip Autoload test classes exist already');
?>
--FILE--
<?php
-function __autoload($class_name)
-{
+spl_autoload_register(function ($class_name) {
var_dump(class_exists($class_name));
require_once(dirname(__FILE__) . '/' . $class_name . '.p5c');
- echo __FUNCTION__ . '(' . $class_name . ")\n";
-}
+ echo 'autoload(' . $class_name . ")\n";
+});
var_dump(class_exists('autoload_derived'));
@@ -22,7 +20,7 @@ var_dump(class_exists('autoload_derived'));
--EXPECT--
bool(false)
bool(false)
-__autoload(autoload_root)
-__autoload(autoload_derived)
+autoload(autoload_root)
+autoload(autoload_derived)
bool(true)
===DONE===
diff --git a/tests/classes/autoload_005.phpt b/tests/classes/autoload_005.phpt
index 36a4e18f0b..26f4d6ae10 100644
--- a/tests/classes/autoload_005.phpt
+++ b/tests/classes/autoload_005.phpt
@@ -2,18 +2,16 @@
ZE2 Autoload from destructor
--SKIPIF--
<?php
- if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed');
if (class_exists('autoload_root', false)) die('skip Autoload test classes exist already');
?>
--FILE--
<?php
-function __autoload($class_name)
-{
+spl_autoload_register(function ($class_name) {
var_dump(class_exists($class_name, false));
require_once(dirname(__FILE__) . '/' . $class_name . '.p5c');
- echo __FUNCTION__ . '(' . $class_name . ")\n";
-}
+ echo 'autoload(' . $class_name . ")\n";
+});
var_dump(class_exists('autoload_derived', false));
var_dump(class_exists('autoload_derived', false));
@@ -38,8 +36,8 @@ bool(false)
Test::__destruct
bool(false)
bool(false)
-__autoload(autoload_root)
-__autoload(autoload_derived)
+autoload(autoload_root)
+autoload(autoload_derived)
object(autoload_derived)#%d (0) {
}
===DONE===
diff --git a/tests/classes/autoload_006.phpt b/tests/classes/autoload_006.phpt
index 9af6fc9829..092e2e2252 100644
--- a/tests/classes/autoload_006.phpt
+++ b/tests/classes/autoload_006.phpt
@@ -2,17 +2,15 @@
ZE2 Autoload from destructor
--SKIPIF--
<?php
- if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed');
if (class_exists('autoload_root', false)) die('skip Autoload test classes exist already');
?>
--FILE--
<?php
-function __autoload($class_name)
-{
+spl_autoload_register(function ($class_name) {
require_once(dirname(__FILE__) . '/' . strtolower($class_name) . '.p5c');
- echo __FUNCTION__ . '(' . $class_name . ")\n";
-}
+ echo 'autoload(' . $class_name . ")\n";
+});
var_dump(interface_exists('autoload_interface', false));
var_dump(class_exists('autoload_implements', false));
@@ -30,8 +28,8 @@ var_dump(class_exists('autoload_implements', false));
--EXPECTF--
bool(false)
bool(false)
-__autoload(autoload_interface)
-__autoload(Autoload_Implements)
+autoload(autoload_interface)
+autoload(Autoload_Implements)
object(autoload_implements)#%d (0) {
}
bool(true)
diff --git a/tests/classes/autoload_007.phpt b/tests/classes/autoload_007.phpt
index 5652c120cc..ba542a1450 100644
--- a/tests/classes/autoload_007.phpt
+++ b/tests/classes/autoload_007.phpt
@@ -2,14 +2,13 @@
Ensure instanceof does not trigger autoload.
--FILE--
<?php
- function __autoload($name)
- {
- echo "In autoload: ";
- var_dump($name);
- }
-
- $a = new stdClass;
- var_dump($a instanceof UndefC);
+spl_autoload_register(function ($name) {
+ echo "In autoload: ";
+ var_dump($name);
+});
+
+$a = new stdClass;
+var_dump($a instanceof UndefC);
?>
--EXPECTF--
bool(false)
diff --git a/tests/classes/autoload_008.phpt b/tests/classes/autoload_008.phpt
index 75a9cd0520..1f3f075843 100644
--- a/tests/classes/autoload_008.phpt
+++ b/tests/classes/autoload_008.phpt
@@ -2,25 +2,24 @@
Ensure catch blocks for unknown exception types do not trigger autoload.
--FILE--
<?php
- function __autoload($name)
- {
- echo "In autoload: ";
- var_dump($name);
- }
-
- function f()
- {
- throw new Exception();
- }
- try {
- f();
- }
- catch (UndefC $u) {
- echo "In UndefClass catch block.\n";
- }
- catch (Exception $e) {
- echo "In Exception catch block. Autoload should not have been triggered.\n";
- }
+spl_autoload_register(function ($name) {
+ echo "In autoload: ";
+ var_dump($name);
+});
+
+function f()
+{
+ throw new Exception();
+}
+try {
+ f();
+}
+catch (UndefC $u) {
+ echo "In UndefClass catch block.\n";
+}
+catch (Exception $e) {
+ echo "In Exception catch block. Autoload should not have been triggered.\n";
+}
?>
--EXPECTF--
In Exception catch block. Autoload should not have been triggered.
diff --git a/tests/classes/autoload_009.phpt b/tests/classes/autoload_009.phpt
index 150f3ec201..ebe691ca28 100644
--- a/tests/classes/autoload_009.phpt
+++ b/tests/classes/autoload_009.phpt
@@ -2,16 +2,15 @@
Ensure type hints for unknown types do not trigger autoload.
--FILE--
<?php
- function __autoload($name)
- {
- echo "In autoload: ";
- var_dump($name);
- }
-
- function f(UndefClass $x)
- {
- }
- f(new stdClass);
+spl_autoload_register(function ($name) {
+ echo "In autoload: ";
+ var_dump($name);
+});
+
+function f(UndefClass $x)
+{
+}
+f(new stdClass);
?>
--EXPECTF--
Fatal error: Uncaught TypeError: Argument 1 passed to f() must be an instance of UndefClass, instance of stdClass given, called in %s on line %d and defined in %s:%d
diff --git a/tests/classes/autoload_010.phpt b/tests/classes/autoload_010.phpt
index 104f6888c8..e65c2565a2 100644
--- a/tests/classes/autoload_010.phpt
+++ b/tests/classes/autoload_010.phpt
@@ -2,15 +2,14 @@
Ensure implements does trigger autoload.
--FILE--
<?php
- function __autoload($name)
- {
- echo "In autoload: ";
- var_dump($name);
- }
-
- class C implements UndefI
- {
- }
+spl_autoload_register(function ($name) {
+ echo "In autoload: ";
+ var_dump($name);
+});
+
+class C implements UndefI
+{
+}
?>
--EXPECTF--
In autoload: string(6) "UndefI"
diff --git a/tests/classes/autoload_011.phpt b/tests/classes/autoload_011.phpt
index 86858d5f1d..aaea38c6f0 100644
--- a/tests/classes/autoload_011.phpt
+++ b/tests/classes/autoload_011.phpt
@@ -2,15 +2,14 @@
Ensure extends does trigger autoload.
--FILE--
<?php
- function __autoload($name)
- {
- echo "In autoload: ";
- var_dump($name);
- }
-
- class C extends UndefBase
- {
- }
+spl_autoload_register(function ($name) {
+ echo "In autoload: ";
+ var_dump($name);
+});
+
+class C extends UndefBase
+{
+}
?>
--EXPECTF--
In autoload: string(9) "UndefBase"
diff --git a/tests/classes/autoload_012.phpt b/tests/classes/autoload_012.phpt
index d6750b760d..4fc41c85f5 100644
--- a/tests/classes/autoload_012.phpt
+++ b/tests/classes/autoload_012.phpt
@@ -2,12 +2,11 @@
Ensure callback methods in unknown classes trigger autoload.
--FILE--
<?php
- function __autoload($name)
- {
- echo "In autoload: ";
- var_dump($name);
- }
- call_user_func("UndefC::test");
+spl_autoload_register(function ($name) {
+ echo "In autoload: ";
+ var_dump($name);
+});
+call_user_func("UndefC::test");
?>
--EXPECTF--
In autoload: string(6) "UndefC"
diff --git a/tests/classes/autoload_013.phpt b/tests/classes/autoload_013.phpt
index 4309cea176..a63b129562 100644
--- a/tests/classes/autoload_013.phpt
+++ b/tests/classes/autoload_013.phpt
@@ -4,18 +4,17 @@ Ensure the ReflectionClass constructor triggers autoload.
<?php extension_loaded('reflection') or die('skip'); ?>
--FILE--
<?php
- function __autoload($name)
- {
- echo "In autoload: ";
- var_dump($name);
- }
-
- try {
- new ReflectionClass("UndefC");
- }
- catch (ReflectionException $e) {
- echo $e->getMessage();
- }
+spl_autoload_register(function ($name) {
+ echo "In autoload: ";
+ var_dump($name);
+});
+
+try {
+ new ReflectionClass("UndefC");
+}
+catch (ReflectionException $e) {
+ echo $e->getMessage();
+}
?>
--EXPECTF--
In autoload: string(6) "UndefC"
diff --git a/tests/classes/autoload_014.phpt b/tests/classes/autoload_014.phpt
index a3f04b7b57..3eb0484ec3 100644
--- a/tests/classes/autoload_014.phpt
+++ b/tests/classes/autoload_014.phpt
@@ -4,18 +4,17 @@ Ensure the ReflectionMethod constructor triggers autoload.
<?php extension_loaded('reflection') or die('skip'); ?>
--FILE--
<?php
- function __autoload($name)
- {
- echo "In autoload: ";
- var_dump($name);
- }
-
- try {
- new ReflectionMethod("UndefC::test");
- }
- catch (ReflectionException $e) {
- echo $e->getMessage();
- }
+spl_autoload_register(function ($name) {
+ echo "In autoload: ";
+ var_dump($name);
+});
+
+try {
+ new ReflectionMethod("UndefC::test");
+}
+catch (ReflectionException $e) {
+ echo $e->getMessage();
+}
?>
--EXPECTF--
In autoload: string(6) "UndefC"
diff --git a/tests/classes/autoload_015.phpt b/tests/classes/autoload_015.phpt
index 2b14a0de05..edff01c91a 100644
--- a/tests/classes/autoload_015.phpt
+++ b/tests/classes/autoload_015.phpt
@@ -4,18 +4,17 @@ Ensure the ReflectionProperty constructor triggers autoload.
<?php extension_loaded('reflection') or die('skip'); ?>
--FILE--
<?php
- function __autoload($name)
- {
- echo "In autoload: ";
- var_dump($name);
- }
-
- try {
- new ReflectionProperty('UndefC', 'p');
- }
- catch (ReflectionException $e) {
- echo $e->getMessage();
- }
+spl_autoload_register(function ($name) {
+ echo "In autoload: ";
+ var_dump($name);
+});
+
+try {
+ new ReflectionProperty('UndefC', 'p');
+}
+catch (ReflectionException $e) {
+ echo $e->getMessage();
+}
?>
--EXPECTF--
In autoload: string(6) "UndefC"
diff --git a/tests/classes/autoload_016.phpt b/tests/classes/autoload_016.phpt
index 60263ba95a..d1ff885746 100644
--- a/tests/classes/autoload_016.phpt
+++ b/tests/classes/autoload_016.phpt
@@ -4,19 +4,18 @@ Ensure ReflectionClass::getProperty() triggers autoload
<?php extension_loaded('reflection') or die('skip'); ?>
--FILE--
<?php
- function __autoload($name)
- {
- echo "In autoload: ";
- var_dump($name);
- }
+spl_autoload_register(function ($name) {
+ echo "In autoload: ";
+ var_dump($name);
+});
- $rc = new ReflectionClass("stdClass");
-
- try {
- $rc->getProperty("UndefC::p");
- } catch (ReflectionException $e) {
- echo $e->getMessage();
- }
+$rc = new ReflectionClass("stdClass");
+
+try {
+$rc->getProperty("UndefC::p");
+} catch (ReflectionException $e) {
+ echo $e->getMessage();
+}
?>
--EXPECTF--
In autoload: string(6) "undefc"
diff --git a/tests/classes/autoload_017.phpt b/tests/classes/autoload_017.phpt
index d5ce2bd0e6..8e1aeac748 100644
--- a/tests/classes/autoload_017.phpt
+++ b/tests/classes/autoload_017.phpt
@@ -4,19 +4,18 @@ Ensure ReflectionClass::implementsInterface triggers autoload.
<?php extension_loaded('reflection') or die('skip'); ?>
--FILE--
<?php
- function __autoload($name)
- {
- echo "In autoload: ";
- var_dump($name);
- }
+spl_autoload_register(function ($name) {
+ echo "In autoload: ";
+ var_dump($name);
+});
- $rc = new ReflectionClass("stdClass");
-
- try {
- $rc->implementsInterface("UndefI");
- } catch (ReflectionException $e) {
- echo $e->getMessage();
- }
+$rc = new ReflectionClass("stdClass");
+
+try {
+ $rc->implementsInterface("UndefI");
+} catch (ReflectionException $e) {
+ echo $e->getMessage();
+}
?>
--EXPECTF--
In autoload: string(6) "UndefI"
diff --git a/tests/classes/autoload_018.phpt b/tests/classes/autoload_018.phpt
index 59e20e2a60..2099499e11 100644
--- a/tests/classes/autoload_018.phpt
+++ b/tests/classes/autoload_018.phpt
@@ -2,47 +2,46 @@
Ensure __autoload() allows for recursive calls if the class name differs.
--FILE--
<?php
- function __autoload($name)
- {
- echo "IN: " . __METHOD__ . "($name)\n";
-
- static $i = 0;
- if ($i++ > 10) {
- echo "-> Recursion detected - as expected.\n";
- return;
- }
-
- class_exists('UndefinedClass' . $i);
-
- echo "OUT: " . __METHOD__ . "($name)\n";
+spl_autoload_register(function ($name) {
+ echo "IN: autoload($name)\n";
+
+ static $i = 0;
+ if ($i++ > 10) {
+ echo "-> Recursion detected - as expected.\n";
+ return;
}
- var_dump(class_exists('UndefinedClass0'));
+ class_exists('UndefinedClass' . $i);
+
+ echo "OUT: autoload($name)\n";
+});
+
+var_dump(class_exists('UndefinedClass0'));
?>
--EXPECTF--
-IN: __autoload(UndefinedClass0)
-IN: __autoload(UndefinedClass1)
-IN: __autoload(UndefinedClass2)
-IN: __autoload(UndefinedClass3)
-IN: __autoload(UndefinedClass4)
-IN: __autoload(UndefinedClass5)
-IN: __autoload(UndefinedClass6)
-IN: __autoload(UndefinedClass7)
-IN: __autoload(UndefinedClass8)
-IN: __autoload(UndefinedClass9)
-IN: __autoload(UndefinedClass10)
-IN: __autoload(UndefinedClass11)
+IN: autoload(UndefinedClass0)
+IN: autoload(UndefinedClass1)
+IN: autoload(UndefinedClass2)
+IN: autoload(UndefinedClass3)
+IN: autoload(UndefinedClass4)
+IN: autoload(UndefinedClass5)
+IN: autoload(UndefinedClass6)
+IN: autoload(UndefinedClass7)
+IN: autoload(UndefinedClass8)
+IN: autoload(UndefinedClass9)
+IN: autoload(UndefinedClass10)
+IN: autoload(UndefinedClass11)
-> Recursion detected - as expected.
-OUT: __autoload(UndefinedClass10)
-OUT: __autoload(UndefinedClass9)
-OUT: __autoload(UndefinedClass8)
-OUT: __autoload(UndefinedClass7)
-OUT: __autoload(UndefinedClass6)
-OUT: __autoload(UndefinedClass5)
-OUT: __autoload(UndefinedClass4)
-OUT: __autoload(UndefinedClass3)
-OUT: __autoload(UndefinedClass2)
-OUT: __autoload(UndefinedClass1)
-OUT: __autoload(UndefinedClass0)
+OUT: autoload(UndefinedClass10)
+OUT: autoload(UndefinedClass9)
+OUT: autoload(UndefinedClass8)
+OUT: autoload(UndefinedClass7)
+OUT: autoload(UndefinedClass6)
+OUT: autoload(UndefinedClass5)
+OUT: autoload(UndefinedClass4)
+OUT: autoload(UndefinedClass3)
+OUT: autoload(UndefinedClass2)
+OUT: autoload(UndefinedClass1)
+OUT: autoload(UndefinedClass0)
bool(false)
diff --git a/tests/classes/autoload_019.phpt b/tests/classes/autoload_019.phpt
index 783632013b..b9bcd6e6d1 100644
--- a/tests/classes/autoload_019.phpt
+++ b/tests/classes/autoload_019.phpt
@@ -2,13 +2,12 @@
Ensure __autoload() recursion is guarded for multiple lookups of same class using difference case.
--FILE--
<?php
- function __autoload($name)
- {
- echo __FUNCTION__ . " $name\n";
- class_exists("undefinedCLASS");
- }
-
- class_exists("unDefinedClass");
+spl_autoload_register(function ($name) {
+ echo "autoload $name\n";
+ class_exists("undefinedCLASS");
+});
+
+class_exists("unDefinedClass");
?>
--EXPECTF--
-__autoload unDefinedClass
+autoload unDefinedClass
diff --git a/tests/classes/autoload_020.phpt b/tests/classes/autoload_020.phpt
index a88e561238..7cecff07cb 100644
--- a/tests/classes/autoload_020.phpt
+++ b/tests/classes/autoload_020.phpt
@@ -2,12 +2,11 @@
Ensure __autoload() is triggered during unserialization.
--FILE--
<?php
- function __autoload($name)
- {
- echo "in autoload: $name\n";
- }
-
- var_dump(unserialize('O:1:"C":0:{}'));
+spl_autoload_register(function ($name) {
+ echo "in autoload: $name\n";
+});
+
+var_dump(unserialize('O:1:"C":0:{}'));
?>
--EXPECTF--
in autoload: C
diff --git a/tests/classes/autoload_021.phpt b/tests/classes/autoload_021.phpt
index 3237627380..f3dd8ff26d 100644
--- a/tests/classes/autoload_021.phpt
+++ b/tests/classes/autoload_021.phpt
@@ -2,9 +2,9 @@
Validation of class names in the autoload process
--FILE--
<?php
-function __autoload($name) {
+spl_autoload_register(function ($name) {
echo "$name\n";
-}
+});
$a = "../BUG";
$x = new $a;
echo "BUG\n";
diff --git a/tests/classes/class_abstract.phpt b/tests/classes/class_abstract.phpt
index 10fcdba461..fe95d9bcc3 100644
--- a/tests/classes/class_abstract.phpt
+++ b/tests/classes/class_abstract.phpt
@@ -1,7 +1,5 @@
--TEST--
ZE2 An abstract class cannot be instanciated
---SKIPIF--
-<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?>
--FILE--
<?php
diff --git a/tests/classes/class_final.phpt b/tests/classes/class_final.phpt
index 5c73cb2556..45cbc72751 100644
--- a/tests/classes/class_final.phpt
+++ b/tests/classes/class_final.phpt
@@ -1,7 +1,5 @@
--TEST--
ZE2 A final class cannot be inherited
---SKIPIF--
-<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?>
--FILE--
<?php
diff --git a/tests/classes/clone_001.phpt b/tests/classes/clone_001.phpt
index eb06c1f520..e1d200be26 100644
--- a/tests/classes/clone_001.phpt
+++ b/tests/classes/clone_001.phpt
@@ -1,7 +1,5 @@
--TEST--
ZE2 object cloning, 1
---SKIPIF--
-<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?>
--FILE--
<?php
class test {
diff --git a/tests/classes/clone_002.phpt b/tests/classes/clone_002.phpt
index 4430a2cab4..b2f73b4b80 100644
--- a/tests/classes/clone_002.phpt
+++ b/tests/classes/clone_002.phpt
@@ -1,7 +1,5 @@
--TEST--
ZE2 object cloning, 2
---SKIPIF--
-<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?>
--FILE--
<?php
class test {
diff --git a/tests/classes/clone_003.phpt b/tests/classes/clone_003.phpt
index 9a251c506f..e595a59066 100644
--- a/tests/classes/clone_003.phpt
+++ b/tests/classes/clone_003.phpt
@@ -1,7 +1,5 @@
--TEST--
ZE2 object cloning, 3
---SKIPIF--
-<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?>
--FILE--
<?php
class base {
diff --git a/tests/classes/clone_006.phpt b/tests/classes/clone_006.phpt
index 713670aba8..d8a6140358 100644
--- a/tests/classes/clone_006.phpt
+++ b/tests/classes/clone_006.phpt
@@ -1,7 +1,5 @@
--TEST--
ZE2 object cloning, 6
---SKIPIF--
-<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?>
--INI--
error_reporting=2047
--FILE--
diff --git a/tests/classes/constants_basic_001.phpt b/tests/classes/constants_basic_001.phpt
index 9536b2a38f..37120579f6 100644
--- a/tests/classes/constants_basic_001.phpt
+++ b/tests/classes/constants_basic_001.phpt
@@ -63,7 +63,7 @@ Notice: Undefined variable: undef in %s on line 5
Attempt to access various kinds of class constants:
-Notice: Use of undefined constant UNDEFINED - assumed 'UNDEFINED' in %s on line %d
+Warning: Use of undefined constant UNDEFINED - assumed 'UNDEFINED' (this will throw an Error in a future version of PHP) in %s on line %d
string(9) "UNDEFINED"
int(1)
float(1.5)
diff --git a/tests/classes/constants_basic_003.inc b/tests/classes/constants_basic_003.inc
index 17e067b534..5eb9065b82 100644
--- a/tests/classes/constants_basic_003.inc
+++ b/tests/classes/constants_basic_003.inc
@@ -1,5 +1,5 @@
<?php
class A {
- const MY_CONST = "hello from A";
+ const MY_CONST = "hello from A";
}
?>
diff --git a/tests/classes/constants_scope_001.phpt b/tests/classes/constants_scope_001.phpt
index 50066282ea..650bcc2228 100644
--- a/tests/classes/constants_scope_001.phpt
+++ b/tests/classes/constants_scope_001.phpt
@@ -1,7 +1,5 @@
--TEST--
ZE2 class constants and scope
---SKIPIF--
-<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?>
--FILE--
<?php
@@ -31,7 +29,7 @@ ErrorCodesDerived::print_fatal_error_codes();
?>
--EXPECTF--
-Notice: Use of undefined constant FATAL - assumed 'FATAL' in %sconstants_scope_001.php on line %d
+Warning: Use of undefined constant FATAL - assumed 'FATAL' (this will throw an Error in a future version of PHP) in %sconstants_scope_001.php on line %d
FATAL = FATAL
self::FATAL = Fatal error
self::FATAL = Worst error
diff --git a/tests/classes/ctor_dtor.phpt b/tests/classes/ctor_dtor.phpt
index 6af863e576..3f57a312e4 100644
--- a/tests/classes/ctor_dtor.phpt
+++ b/tests/classes/ctor_dtor.phpt
@@ -1,7 +1,5 @@
--TEST--
ZE2 The new constructor/destructor is called
---SKIPIF--
-<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?>
--FILE--
<?php
diff --git a/tests/classes/ctor_dtor_inheritance.phpt b/tests/classes/ctor_dtor_inheritance.phpt
index 8ae2a5dec4..fc43727d2a 100644
--- a/tests/classes/ctor_dtor_inheritance.phpt
+++ b/tests/classes/ctor_dtor_inheritance.phpt
@@ -1,7 +1,5 @@
--TEST--
ZE2 A derived class can use the inherited constructor/destructor
---SKIPIF--
-<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?>
--FILE--
<?php
diff --git a/tests/classes/dereferencing_001.phpt b/tests/classes/dereferencing_001.phpt
index 886baeb288..e7e90cf5e3 100644
--- a/tests/classes/dereferencing_001.phpt
+++ b/tests/classes/dereferencing_001.phpt
@@ -1,7 +1,5 @@
--TEST--
ZE2 dereferencing of objects from methods
---SKIPIF--
-<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?>
--FILE--
<?php
diff --git a/tests/classes/destructor_inheritance.phpt b/tests/classes/destructor_inheritance.phpt
index 868c8960c8..f267a740ae 100644
--- a/tests/classes/destructor_inheritance.phpt
+++ b/tests/classes/destructor_inheritance.phpt
@@ -1,7 +1,5 @@
--TEST--
ZE2 The inherited destructor is called
---SKIPIF--
-<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?>
--FILE--
<?php
class base {
diff --git a/tests/classes/destructor_visibility_001.phpt b/tests/classes/destructor_visibility_001.phpt
index b99c0b20ca..b48d000f91 100644
--- a/tests/classes/destructor_visibility_001.phpt
+++ b/tests/classes/destructor_visibility_001.phpt
@@ -1,7 +1,5 @@
--TEST--
ZE2 Ensuring destructor visibility
---SKIPIF--
-<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?>
--FILE--
<?php
diff --git a/tests/classes/destructor_visibility_002.phpt b/tests/classes/destructor_visibility_002.phpt
index 2cc83334a9..96cf275a7c 100644
--- a/tests/classes/destructor_visibility_002.phpt
+++ b/tests/classes/destructor_visibility_002.phpt
@@ -1,7 +1,5 @@
--TEST--
ZE2 Ensuring destructor visibility
---SKIPIF--
-<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?>
--FILE--
<?php
diff --git a/tests/classes/destructor_visibility_003.phpt b/tests/classes/destructor_visibility_003.phpt
index 83e3efe22e..4f75166940 100644
--- a/tests/classes/destructor_visibility_003.phpt
+++ b/tests/classes/destructor_visibility_003.phpt
@@ -1,7 +1,5 @@
--TEST--
ZE2 Ensuring destructor visibility
---SKIPIF--
-<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?>
--FILE--
<?php
diff --git a/tests/classes/factory_001.phpt b/tests/classes/factory_001.phpt
index 97b69c1b47..45f97331a5 100644
--- a/tests/classes/factory_001.phpt
+++ b/tests/classes/factory_001.phpt
@@ -1,7 +1,5 @@
--TEST--
ZE2 factory objects
---SKIPIF--
-<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?>
--FILE--
<?php
diff --git a/tests/classes/factory_and_singleton_001.phpt b/tests/classes/factory_and_singleton_001.phpt
index 70fa020a49..970c017f4b 100644
--- a/tests/classes/factory_and_singleton_001.phpt
+++ b/tests/classes/factory_and_singleton_001.phpt
@@ -1,7 +1,5 @@
--TEST--
ZE2 factory and singleton, test 1
---SKIPIF--
-<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?>
--FILE--
<?php
class test {
diff --git a/tests/classes/factory_and_singleton_002.phpt b/tests/classes/factory_and_singleton_002.phpt
index 3308a561a5..4812571497 100644
--- a/tests/classes/factory_and_singleton_002.phpt
+++ b/tests/classes/factory_and_singleton_002.phpt
@@ -1,7 +1,5 @@
--TEST--
ZE2 factory and singleton, test 2
---SKIPIF--
-<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?>
--FILE--
<?php
class test {
diff --git a/tests/classes/factory_and_singleton_003.phpt b/tests/classes/factory_and_singleton_003.phpt
index e312f55442..cf08fdb717 100644
--- a/tests/classes/factory_and_singleton_003.phpt
+++ b/tests/classes/factory_and_singleton_003.phpt
@@ -1,7 +1,5 @@
--TEST--
ZE2 factory and singleton, test 3
---SKIPIF--
-<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?>
--FILE--
<?php
class test {
diff --git a/tests/classes/factory_and_singleton_004.phpt b/tests/classes/factory_and_singleton_004.phpt
index a8a2f1d7c5..41e278bdb9 100644
--- a/tests/classes/factory_and_singleton_004.phpt
+++ b/tests/classes/factory_and_singleton_004.phpt
@@ -1,7 +1,5 @@
--TEST--
ZE2 factory and singleton, test 4
---SKIPIF--
-<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?>
--FILE--
<?php
class test {
diff --git a/tests/classes/factory_and_singleton_005.phpt b/tests/classes/factory_and_singleton_005.phpt
index 2bb328da7e..78d7e05f0b 100644
--- a/tests/classes/factory_and_singleton_005.phpt
+++ b/tests/classes/factory_and_singleton_005.phpt
@@ -1,7 +1,5 @@
--TEST--
ZE2 factory and singleton, test 5
---SKIPIF--
-<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?>
--FILE--
<?php
class test {
diff --git a/tests/classes/factory_and_singleton_006.phpt b/tests/classes/factory_and_singleton_006.phpt
index 5e1c7092d1..5bc9433e32 100644
--- a/tests/classes/factory_and_singleton_006.phpt
+++ b/tests/classes/factory_and_singleton_006.phpt
@@ -1,7 +1,5 @@
--TEST--
ZE2 factory and singleton, test 6
---SKIPIF--
-<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?>
--FILE--
<?php
class test {
diff --git a/tests/classes/factory_and_singleton_007.phpt b/tests/classes/factory_and_singleton_007.phpt
index b55168efe5..4c15c38383 100644
--- a/tests/classes/factory_and_singleton_007.phpt
+++ b/tests/classes/factory_and_singleton_007.phpt
@@ -1,7 +1,5 @@
--TEST--
ZE2 factory and singleton, test 7
---SKIPIF--
-<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?>
--FILE--
<?php
class test {
diff --git a/tests/classes/factory_and_singleton_008.phpt b/tests/classes/factory_and_singleton_008.phpt
index 49d4f0a1ff..1a87833169 100644
--- a/tests/classes/factory_and_singleton_008.phpt
+++ b/tests/classes/factory_and_singleton_008.phpt
@@ -1,7 +1,5 @@
--TEST--
ZE2 factory and singleton, test 8
---SKIPIF--
-<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?>
--FILE--
<?php
class test {
diff --git a/tests/classes/factory_and_singleton_009.phpt b/tests/classes/factory_and_singleton_009.phpt
index acf792c316..9134245a17 100644
--- a/tests/classes/factory_and_singleton_009.phpt
+++ b/tests/classes/factory_and_singleton_009.phpt
@@ -1,7 +1,5 @@
--TEST--
ZE2 factory and singleton, test 9
---SKIPIF--
-<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?>
--FILE--
<?php
class test {
diff --git a/tests/classes/factory_and_singleton_010.phpt b/tests/classes/factory_and_singleton_010.phpt
index 0f5fb2dc74..bd7e7e32b7 100644
--- a/tests/classes/factory_and_singleton_010.phpt
+++ b/tests/classes/factory_and_singleton_010.phpt
@@ -1,7 +1,5 @@
--TEST--
ZE2 factory and singleton, test 10
---SKIPIF--
-<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?>
--FILE--
<?php
class test {
diff --git a/tests/classes/final.phpt b/tests/classes/final.phpt
index bf3a0cb937..f82087749b 100644
--- a/tests/classes/final.phpt
+++ b/tests/classes/final.phpt
@@ -1,7 +1,5 @@
--TEST--
ZE2 A method may be redeclared final
---SKIPIF--
-<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?>
--FILE--
<?php
diff --git a/tests/classes/final_abstract.phpt b/tests/classes/final_abstract.phpt
index 426c852cfc..25c2cfc810 100644
--- a/tests/classes/final_abstract.phpt
+++ b/tests/classes/final_abstract.phpt
@@ -1,7 +1,5 @@
--TEST--
ZE2 A final method cannot be abstract
---SKIPIF--
-<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?>
--FILE--
<?php
diff --git a/tests/classes/final_redeclare.phpt b/tests/classes/final_redeclare.phpt
index e8f2e6ff09..bdcbf3c86c 100644
--- a/tests/classes/final_redeclare.phpt
+++ b/tests/classes/final_redeclare.phpt
@@ -1,7 +1,5 @@
--TEST--
ZE2 A final method may not be overwritten
---SKIPIF--
-<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?>
--FILE--
<?php
diff --git a/tests/classes/implicit_instantiation_001.phpt b/tests/classes/implicit_instantiation_001.phpt
index 51427df1e8..67be8c4dc9 100644
--- a/tests/classes/implicit_instantiation_001.phpt
+++ b/tests/classes/implicit_instantiation_001.phpt
@@ -93,66 +93,66 @@ Notice: Undefined property: stdClass::$prop in %s on line 26
---( $c->boolTrue )---
--> Attempting implicit conversion to object using increment...
-Warning: Attempt to %s property of non-object in %s on line 18
+Warning: Attempt to %s property 'prop' of non-object in %s on line 18
--> Attempting implicit conversion to object using assignment...
-Warning: Attempt to assign property of non-object in %s on line 22
+Warning: Attempt to assign property 'prop' of non-object in %s on line 22
--> Attempting implicit conversion to object using combined assignment...
-Warning: Attempt to assign property of non-object in %s on line 26
+Warning: Attempt to assign property 'prop' of non-object in %s on line 26
---( $c->nonEmptyString )---
--> Attempting implicit conversion to object using increment...
-Warning: Attempt to %s property of non-object in %s on line 18
+Warning: Attempt to %s property 'prop' of non-object in %s on line 18
--> Attempting implicit conversion to object using assignment...
-Warning: Attempt to assign property of non-object in %s on line 22
+Warning: Attempt to assign property 'prop' of non-object in %s on line 22
--> Attempting implicit conversion to object using combined assignment...
-Warning: Attempt to assign property of non-object in %s on line 26
+Warning: Attempt to assign property 'prop' of non-object in %s on line 26
---( $c->intZero )---
--> Attempting implicit conversion to object using increment...
-Warning: Attempt to %s property of non-object in %s on line 18
+Warning: Attempt to %s property 'prop' of non-object in %s on line 18
--> Attempting implicit conversion to object using assignment...
-Warning: Attempt to assign property of non-object in %s on line 22
+Warning: Attempt to assign property 'prop' of non-object in %s on line 22
--> Attempting implicit conversion to object using combined assignment...
-Warning: Attempt to assign property of non-object in %s on line 26
+Warning: Attempt to assign property 'prop' of non-object in %s on line 26
--> Resulting object:object(C)#%d (6) {
- [%u|b%"boolFalse"]=>
+ ["boolFalse"]=>
object(stdClass)#%d (1) {
- [%u|b%"prop"]=>
- %unicode|string%(24) " Implicit instantiation!"
+ ["prop"]=>
+ string(24) " Implicit instantiation!"
}
- [%u|b%"emptyString"]=>
+ ["emptyString"]=>
object(stdClass)#%d (1) {
- [%u|b%"prop"]=>
- %unicode|string%(24) " Implicit instantiation!"
+ ["prop"]=>
+ string(24) " Implicit instantiation!"
}
- [%u|b%"null"]=>
+ ["null"]=>
object(stdClass)#%d (1) {
- [%u|b%"prop"]=>
- %unicode|string%(24) " Implicit instantiation!"
+ ["prop"]=>
+ string(24) " Implicit instantiation!"
}
- [%u|b%"boolTrue"]=>
+ ["boolTrue"]=>
bool(true)
- [%u|b%"nonEmptyString"]=>
- %unicode|string%(5) "hello"
- [%u|b%"intZero"]=>
+ ["nonEmptyString"]=>
+ string(5) "hello"
+ ["intZero"]=>
int(0)
}
diff --git a/tests/classes/inheritance_002.phpt b/tests/classes/inheritance_002.phpt
index 7669f735e5..f88c0996bd 100644
--- a/tests/classes/inheritance_002.phpt
+++ b/tests/classes/inheritance_002.phpt
@@ -1,7 +1,5 @@
--TEST--
ZE2 Constructor precedence
---SKIPIF--
-<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?>
--FILE--
<?php
class Base_php4 {
diff --git a/tests/classes/inheritance_006.phpt b/tests/classes/inheritance_006.phpt
index 03d1751f3c..3d5c275011 100644
--- a/tests/classes/inheritance_006.phpt
+++ b/tests/classes/inheritance_006.phpt
@@ -17,8 +17,8 @@ var_dump(new C);
?>
--EXPECTF--
object(C)#%d (2) {
- [%u|b%"c":%u|b%"B":private]=>
+ ["c":"B":private]=>
NULL
- [%u|b%"c":%u|b%"A":private]=>
+ ["c":"A":private]=>
NULL
}
diff --git a/tests/classes/interface_and_extends.phpt b/tests/classes/interface_and_extends.phpt
index f9040ae4a9..1c23d31ca6 100644
--- a/tests/classes/interface_and_extends.phpt
+++ b/tests/classes/interface_and_extends.phpt
@@ -1,7 +1,5 @@
--TEST--
ZE2 a class cannot extend an interface
---SKIPIF--
-<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?>
--FILE--
<?php
diff --git a/tests/classes/interface_class.phpt b/tests/classes/interface_class.phpt
index 22520de1f9..46deb490ed 100644
--- a/tests/classes/interface_class.phpt
+++ b/tests/classes/interface_class.phpt
@@ -1,7 +1,5 @@
--TEST--
ZE2 A class can only implement interfaces
---SKIPIF--
-<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?>
--FILE--
<?php
class base {
diff --git a/tests/classes/interface_doubled.phpt b/tests/classes/interface_doubled.phpt
index e1dd31fd4d..bcf2fbda8f 100644
--- a/tests/classes/interface_doubled.phpt
+++ b/tests/classes/interface_doubled.phpt
@@ -1,7 +1,5 @@
--TEST--
ZE2 An interface extends base interfaces
---SKIPIF--
-<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?>
--FILE--
<?php
diff --git a/tests/classes/interface_implemented.phpt b/tests/classes/interface_implemented.phpt
index e33a4da002..f0507dea1c 100644
--- a/tests/classes/interface_implemented.phpt
+++ b/tests/classes/interface_implemented.phpt
@@ -1,7 +1,5 @@
--TEST--
ZE2 An interface is inherited
---SKIPIF--
-<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?>
--FILE--
<?php
diff --git a/tests/classes/interface_instantiate.phpt b/tests/classes/interface_instantiate.phpt
index 70e2e3e8b6..dffd6b10e2 100644
--- a/tests/classes/interface_instantiate.phpt
+++ b/tests/classes/interface_instantiate.phpt
@@ -1,7 +1,5 @@
--TEST--
ZE2 An interface cannot be instantiated
---SKIPIF--
-<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?>
--FILE--
<?php
diff --git a/tests/classes/interface_member.phpt b/tests/classes/interface_member.phpt
index 329c0728b5..3b50b30ffe 100644
--- a/tests/classes/interface_member.phpt
+++ b/tests/classes/interface_member.phpt
@@ -1,7 +1,5 @@
--TEST--
ZE2 An interface cannot have properties
---SKIPIF--
-<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?>
--FILE--
<?php
diff --git a/tests/classes/interface_method.phpt b/tests/classes/interface_method.phpt
index f80bd756f3..f3e465b21b 100644
--- a/tests/classes/interface_method.phpt
+++ b/tests/classes/interface_method.phpt
@@ -1,7 +1,5 @@
--TEST--
ZE2 An interface method must be abstract
---SKIPIF--
-<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?>
--FILE--
<?php
diff --git a/tests/classes/interface_method_final.phpt b/tests/classes/interface_method_final.phpt
index 01e599c5b9..74c86f1e50 100644
--- a/tests/classes/interface_method_final.phpt
+++ b/tests/classes/interface_method_final.phpt
@@ -1,7 +1,5 @@
--TEST--
ZE2 An interface method cannot be final
---SKIPIF--
-<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?>
--FILE--
<?php
diff --git a/tests/classes/interface_method_private.phpt b/tests/classes/interface_method_private.phpt
index aa46a033a6..000b33fae4 100644
--- a/tests/classes/interface_method_private.phpt
+++ b/tests/classes/interface_method_private.phpt
@@ -1,7 +1,5 @@
--TEST--
ZE2 An interface method cannot be private
---SKIPIF--
-<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?>
--FILE--
<?php
diff --git a/tests/classes/interface_must_be_implemented.phpt b/tests/classes/interface_must_be_implemented.phpt
index a4d79704e1..cd7c815f50 100644
--- a/tests/classes/interface_must_be_implemented.phpt
+++ b/tests/classes/interface_must_be_implemented.phpt
@@ -1,7 +1,5 @@
--TEST--
ZE2 An interface must be implemented
---SKIPIF--
-<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?>
--FILE--
<?php
diff --git a/tests/classes/interface_optional_arg.phpt b/tests/classes/interface_optional_arg.phpt
index 05f2fc41df..9c0de6cfb0 100644
--- a/tests/classes/interface_optional_arg.phpt
+++ b/tests/classes/interface_optional_arg.phpt
@@ -1,7 +1,5 @@
--TEST--
ZE2 An interface method allows additional default arguments
---SKIPIF--
-<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?>
--FILE--
<?php
diff --git a/tests/classes/interface_optional_arg_002.phpt b/tests/classes/interface_optional_arg_002.phpt
index 9987e925e0..67e6785883 100644
--- a/tests/classes/interface_optional_arg_002.phpt
+++ b/tests/classes/interface_optional_arg_002.phpt
@@ -1,7 +1,5 @@
--TEST--
default argument value in interface implementation
---SKIPIF--
-<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?>
--FILE--
<?php
diff --git a/tests/classes/interface_optional_arg_003.inc b/tests/classes/interface_optional_arg_003.inc
index be2a69a4c6..27b3350da0 100644
--- a/tests/classes/interface_optional_arg_003.inc
+++ b/tests/classes/interface_optional_arg_003.inc
@@ -1,4 +1,4 @@
-<?php
+<?php
interface I {
function f($a = null);
}
diff --git a/tests/classes/interfaces_001.phpt b/tests/classes/interfaces_001.phpt
index 68f85512e7..d8d801192f 100644
--- a/tests/classes/interfaces_001.phpt
+++ b/tests/classes/interfaces_001.phpt
@@ -1,7 +1,5 @@
--TEST--
ZE2 interfaces
---SKIPIF--
-<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?>
--FILE--
<?php
diff --git a/tests/classes/interfaces_002.phpt b/tests/classes/interfaces_002.phpt
index 803598be6d..fad961bf27 100644
--- a/tests/classes/interfaces_002.phpt
+++ b/tests/classes/interfaces_002.phpt
@@ -1,7 +1,5 @@
--TEST--
ZE2 interface with an unimplemented method
---SKIPIF--
-<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?>
--FILE--
<?php
diff --git a/tests/classes/iterators_001.phpt b/tests/classes/iterators_001.phpt
index 02e3610782..548bed53ce 100644
--- a/tests/classes/iterators_001.phpt
+++ b/tests/classes/iterators_001.phpt
@@ -1,7 +1,5 @@
--TEST--
ZE2 iterators and foreach
---SKIPIF--
-<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?>
--FILE--
<?php
class c_iter implements Iterator {
diff --git a/tests/classes/iterators_002.phpt b/tests/classes/iterators_002.phpt
index 4a58be0324..6f93d1e1f9 100644
--- a/tests/classes/iterators_002.phpt
+++ b/tests/classes/iterators_002.phpt
@@ -1,7 +1,5 @@
--TEST--
ZE2 iterators and break
---SKIPIF--
-<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?>
--FILE--
<?php
class c_iter implements Iterator {
diff --git a/tests/classes/iterators_003.phpt b/tests/classes/iterators_003.phpt
index 42695db6ba..71009e0269 100644
--- a/tests/classes/iterators_003.phpt
+++ b/tests/classes/iterators_003.phpt
@@ -1,7 +1,5 @@
--TEST--
ZE2 iterators and break
---SKIPIF--
-<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?>
--FILE--
<?php
class c_iter implements Iterator {
diff --git a/tests/classes/iterators_004.phpt b/tests/classes/iterators_004.phpt
index 3fe05276c3..df76c7fe31 100644
--- a/tests/classes/iterators_004.phpt
+++ b/tests/classes/iterators_004.phpt
@@ -1,7 +1,5 @@
--TEST--
ZE2 iterators must be implemented
---SKIPIF--
-<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?>
--FILE--
<?php
diff --git a/tests/classes/iterators_005.phpt b/tests/classes/iterators_005.phpt
index 005deb92a2..9c330ce89b 100644
--- a/tests/classes/iterators_005.phpt
+++ b/tests/classes/iterators_005.phpt
@@ -1,7 +1,5 @@
--TEST--
ZE2 iterators cannot implement Traversable alone
---SKIPIF--
-<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?>
--FILE--
<?php
diff --git a/tests/classes/iterators_006.phpt b/tests/classes/iterators_006.phpt
index e00a00afff..564f15de54 100644
--- a/tests/classes/iterators_006.phpt
+++ b/tests/classes/iterators_006.phpt
@@ -1,7 +1,5 @@
--TEST--
ZE2 iterators and array wrapping
---SKIPIF--
-<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 is needed'); ?>
--FILE--
<?php
@@ -31,10 +29,9 @@ class ai implements Iterator {
}
function next() {
- list($this->key, $this->current) = each($this->array);
-// list($key, $current) = each($this->array);
-// $this->key = $key;
-// $this->current = $current;
+ $this->key = key($this->array);
+ $this->current = current($this->array);
+ next($this->array);
}
}
diff --git a/tests/classes/method_override_optional_arg_001.phpt b/tests/classes/method_override_optional_arg_001.phpt
index bea95756c6..897a2c2b93 100644
--- a/tests/classes/method_override_optional_arg_001.phpt
+++ b/tests/classes/method_override_optional_arg_001.phpt
@@ -1,7 +1,5 @@
--TEST--
Method override allows optional default argument
---SKIPIF--
-<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?>
--FILE--
<?php
diff --git a/tests/classes/object_reference_001.phpt b/tests/classes/object_reference_001.phpt
index f114d1aa95..ca5bbc5abe 100644
--- a/tests/classes/object_reference_001.phpt
+++ b/tests/classes/object_reference_001.phpt
@@ -1,7 +1,5 @@
--TEST--
ZE2 object references
---SKIPIF--
-<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?>
--FILE--
<?php
diff --git a/tests/classes/private_001.phpt b/tests/classes/private_001.phpt
index 9dba49e743..79b94c4f9a 100644
--- a/tests/classes/private_001.phpt
+++ b/tests/classes/private_001.phpt
@@ -1,7 +1,5 @@
--TEST--
ZE2 A private method can only be called inside the class
---SKIPIF--
-<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?>
--FILE--
<?php
diff --git a/tests/classes/private_002.phpt b/tests/classes/private_002.phpt
index 2e8d26b058..892580f36d 100644
--- a/tests/classes/private_002.phpt
+++ b/tests/classes/private_002.phpt
@@ -1,7 +1,5 @@
--TEST--
ZE2 A private method cannot be called in another class
---SKIPIF--
-<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?>
--FILE--
<?php
diff --git a/tests/classes/private_003.phpt b/tests/classes/private_003.phpt
index 397da5d7e2..0843c5ef63 100644
--- a/tests/classes/private_003.phpt
+++ b/tests/classes/private_003.phpt
@@ -1,7 +1,5 @@
--TEST--
ZE2 A private method cannot be called in a derived class
---SKIPIF--
-<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?>
--FILE--
<?php
ini_set("error_reporting",2039);
diff --git a/tests/classes/private_003b.phpt b/tests/classes/private_003b.phpt
index f14de8e9cd..fe2f464ee8 100644
--- a/tests/classes/private_003b.phpt
+++ b/tests/classes/private_003b.phpt
@@ -1,7 +1,5 @@
--TEST--
ZE2 A private method cannot be called in a derived class
---SKIPIF--
-<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?>
--FILE--
<?php
diff --git a/tests/classes/private_004.phpt b/tests/classes/private_004.phpt
index 749d6eecc9..13a4e90535 100644
--- a/tests/classes/private_004.phpt
+++ b/tests/classes/private_004.phpt
@@ -1,7 +1,5 @@
--TEST--
ZE2 A private method cannot be called in a derived class
---SKIPIF--
-<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?>
--FILE--
<?php
diff --git a/tests/classes/private_004b.phpt b/tests/classes/private_004b.phpt
index 8d5cd7c194..db139f65b7 100644
--- a/tests/classes/private_004b.phpt
+++ b/tests/classes/private_004b.phpt
@@ -1,7 +1,5 @@
--TEST--
ZE2 A private method cannot be called in a derived class
---SKIPIF--
-<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?>
--FILE--
<?php
diff --git a/tests/classes/private_005.phpt b/tests/classes/private_005.phpt
index c09c4285e1..0c6d978f79 100644
--- a/tests/classes/private_005.phpt
+++ b/tests/classes/private_005.phpt
@@ -1,7 +1,5 @@
--TEST--
ZE2 A private method cannot be called in a derived class
---SKIPIF--
-<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?>
--FILE--
<?php
diff --git a/tests/classes/private_005b.phpt b/tests/classes/private_005b.phpt
index 8d5cd7c194..db139f65b7 100644
--- a/tests/classes/private_005b.phpt
+++ b/tests/classes/private_005b.phpt
@@ -1,7 +1,5 @@
--TEST--
ZE2 A private method cannot be called in a derived class
---SKIPIF--
-<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?>
--FILE--
<?php
diff --git a/tests/classes/private_006.phpt b/tests/classes/private_006.phpt
index 0bb2b3fe4b..a51c9e70dc 100644
--- a/tests/classes/private_006.phpt
+++ b/tests/classes/private_006.phpt
@@ -1,7 +1,5 @@
--TEST--
ZE2 A private method can be overwritten in a second derived class
---SKIPIF--
-<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?>
--FILE--
<?php
class first {
diff --git a/tests/classes/private_006b.phpt b/tests/classes/private_006b.phpt
index 4084124915..22c3cfd80b 100644
--- a/tests/classes/private_006b.phpt
+++ b/tests/classes/private_006b.phpt
@@ -1,7 +1,5 @@
--TEST--
ZE2 A private method can be overwritten in a second derived class
---SKIPIF--
-<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?>
--FILE--
<?php
diff --git a/tests/classes/private_007.phpt b/tests/classes/private_007.phpt
index 73a38c4562..f773cc8ed2 100644
--- a/tests/classes/private_007.phpt
+++ b/tests/classes/private_007.phpt
@@ -1,7 +1,5 @@
--TEST--
ZE2 A derived class does not know about privates of ancestors
---SKIPIF--
-<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?>
--FILE--
<?php
diff --git a/tests/classes/private_007b.phpt b/tests/classes/private_007b.phpt
index 02ddc25dec..cbd0e756de 100644
--- a/tests/classes/private_007b.phpt
+++ b/tests/classes/private_007b.phpt
@@ -1,7 +1,5 @@
--TEST--
ZE2 A derived class does not know about privates of ancestors
---SKIPIF--
-<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?>
--FILE--
<?php
diff --git a/tests/classes/private_members.phpt b/tests/classes/private_members.phpt
index a8ef9ab920..7ee6d69cf8 100644
--- a/tests/classes/private_members.phpt
+++ b/tests/classes/private_members.phpt
@@ -1,7 +1,5 @@
--TEST--
ZE2 A private member is
---SKIPIF--
-<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?>
--FILE--
<?php
diff --git a/tests/classes/property_recreate_private.phpt b/tests/classes/property_recreate_private.phpt
index 7bee1072f9..b37b974845 100644
--- a/tests/classes/property_recreate_private.phpt
+++ b/tests/classes/property_recreate_private.phpt
@@ -53,27 +53,27 @@ var_dump($c);
--EXPECTF--
Unset and recreate a superclass's private property:
object(D)#%d (1) {
- [%u|b%"p":%u|b%"C":private]=>
- %unicode|string%(7) "changed"
+ ["p":"C":private]=>
+ string(7) "changed"
}
Unset superclass's private property, and recreate it as public in subclass:
object(D)#%d (1) {
- [%u|b%"p"]=>
- %unicode|string%(12) "changed in D"
+ ["p"]=>
+ string(12) "changed in D"
}
Unset superclass's private property, and recreate it as public at global scope:
object(D)#%d (1) {
- [%u|b%"p"]=>
- %unicode|string%(34) "this will create a public property"
+ ["p"]=>
+ string(34) "this will create a public property"
}
Unset and recreate a private property:
object(C)#%d (1) {
- [%u|b%"p":%u|b%"C":private]=>
- %unicode|string%(7) "changed"
+ ["p":"C":private]=>
+ string(7) "changed"
}
Unset a private property, and attempt to recreate at global scope (expecting failure):
diff --git a/tests/classes/property_recreate_protected.phpt b/tests/classes/property_recreate_protected.phpt
index 357f27c796..3319640e3a 100644
--- a/tests/classes/property_recreate_protected.phpt
+++ b/tests/classes/property_recreate_protected.phpt
@@ -38,14 +38,14 @@ var_dump($d);
--EXPECTF--
Unset and recreate a protected property from property's declaring class scope:
object(D)#%d (1) {
- [%u|b%"p":protected]=>
- %unicode|string%(7) "changed"
+ ["p":protected]=>
+ string(7) "changed"
}
Unset and recreate a protected property from subclass:
object(D)#%d (1) {
- [%u|b%"p":protected]=>
- %unicode|string%(12) "changed in D"
+ ["p":protected]=>
+ string(12) "changed in D"
}
Unset a protected property, and attempt to recreate it outside of scope (expected failure):
diff --git a/tests/classes/protected_001.phpt b/tests/classes/protected_001.phpt
index aabcd1b2b7..44099b18fa 100644
--- a/tests/classes/protected_001.phpt
+++ b/tests/classes/protected_001.phpt
@@ -1,7 +1,5 @@
--TEST--
ZE2 A protected method can only be called inside the class
---SKIPIF--
-<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?>
--FILE--
<?php
diff --git a/tests/classes/protected_001b.phpt b/tests/classes/protected_001b.phpt
index d79c1734bb..6f00ffc1b3 100644
--- a/tests/classes/protected_001b.phpt
+++ b/tests/classes/protected_001b.phpt
@@ -1,7 +1,5 @@
--TEST--
ZE2 A protected method can only be called inside the class
---SKIPIF--
-<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?>
--FILE--
<?php
diff --git a/tests/classes/protected_002.phpt b/tests/classes/protected_002.phpt
index 89872fa513..da87200b6e 100644
--- a/tests/classes/protected_002.phpt
+++ b/tests/classes/protected_002.phpt
@@ -1,7 +1,5 @@
--TEST--
ZE2 A protected method cannot be called in another class
---SKIPIF--
-<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?>
--FILE--
<?php
diff --git a/tests/classes/serialize_001.phpt b/tests/classes/serialize_001.phpt
index 142fc50fcd..c228e714e9 100644
--- a/tests/classes/serialize_001.phpt
+++ b/tests/classes/serialize_001.phpt
@@ -49,17 +49,17 @@ foreach($tests as $data)
<?php exit(0); ?>
--EXPECTF--
==========
-%unicode|string%(6) "String"
+string(6) "String"
Test::__construct(String)
Test::serialize(String)
Test::unserialize(String)
object(Test)#%d (1) {
- [%u|b%"data"]=>
- %unicode|string%(6) "String"
+ ["data"]=>
+ string(6) "String"
}
object(Test)#%d (1) {
- [%u|b%"data"]=>
- %unicode|string%(6) "String"
+ ["data"]=>
+ string(6) "String"
}
==========
NULL
diff --git a/tests/classes/singleton_001.phpt b/tests/classes/singleton_001.phpt
index ee729b980c..45174158be 100644
--- a/tests/classes/singleton_001.phpt
+++ b/tests/classes/singleton_001.phpt
@@ -1,7 +1,5 @@
--TEST--
ZE2 singleton
---SKIPIF--
-<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?>
--FILE--
<?php
diff --git a/tests/classes/static_mix_1.phpt b/tests/classes/static_mix_1.phpt
index 5146e7096e..71db59663f 100644
--- a/tests/classes/static_mix_1.phpt
+++ b/tests/classes/static_mix_1.phpt
@@ -1,7 +1,5 @@
--TEST--
ZE2 You cannot overload a static method with a non static method
---SKIPIF--
-<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?>
--FILE--
<?php
diff --git a/tests/classes/static_mix_2.phpt b/tests/classes/static_mix_2.phpt
index cecb37bdaf..ec657c0d5e 100644
--- a/tests/classes/static_mix_2.phpt
+++ b/tests/classes/static_mix_2.phpt
@@ -1,7 +1,5 @@
--TEST--
ZE2 You cannot overload a non static method with a static method
---SKIPIF--
-<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?>
--FILE--
<?php
diff --git a/tests/classes/static_properties_001.phpt b/tests/classes/static_properties_001.phpt
index 1c34f68fc5..e14d87d7ab 100644
--- a/tests/classes/static_properties_001.phpt
+++ b/tests/classes/static_properties_001.phpt
@@ -1,7 +1,5 @@
--TEST--
ZE2 Initializing static properties to arrays
---SKIPIF--
-<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?>
--FILE--
<?php
diff --git a/tests/classes/static_properties_003.phpt b/tests/classes/static_properties_003.phpt
index 61c9857b58..2aab44d586 100644
--- a/tests/classes/static_properties_003.phpt
+++ b/tests/classes/static_properties_003.phpt
@@ -41,8 +41,8 @@ Notice: Accessing static property C::$x as non static in %s on line 13
Notice: Accessing static property C::$x as non static in %s on line 15
Notice: Accessing static property C::$x as non static in %s on line 16
-%unicode|string%(3) "ref"
-%unicode|string%(5) "C::$x"
+string(3) "ref"
+string(5) "C::$x"
--> Access non-visible static prop like instance prop:
bool(false)
diff --git a/tests/classes/static_properties_004.phpt b/tests/classes/static_properties_004.phpt
index 832711ae01..b0fc2ccebc 100644
--- a/tests/classes/static_properties_004.phpt
+++ b/tests/classes/static_properties_004.phpt
@@ -21,17 +21,17 @@ var_dump(C::$p, D::$p, E::$p);
==Done==
--EXPECTF--
Inherited static properties refer to the same value across classes:
-%unicode|string%(8) "original"
-%unicode|string%(8) "original"
-%unicode|string%(8) "original"
+string(8) "original"
+string(8) "original"
+string(8) "original"
Changing one changes all the others:
-%unicode|string%(11) "changed.all"
-%unicode|string%(11) "changed.all"
-%unicode|string%(11) "changed.all"
+string(11) "changed.all"
+string(11) "changed.all"
+string(11) "changed.all"
But because this is implemented using PHP references, the reference set can easily be split:
-%unicode|string%(11) "changed.all"
-%unicode|string%(11) "changed.one"
-%unicode|string%(11) "changed.all"
+string(11) "changed.all"
+string(11) "changed.one"
+string(11) "changed.all"
==Done==
diff --git a/tests/classes/this.phpt b/tests/classes/this.phpt
index 1d9c6236e4..5551e8ac88 100644
--- a/tests/classes/this.phpt
+++ b/tests/classes/this.phpt
@@ -1,7 +1,5 @@
--TEST--
ZE2 $this cannot be exchanged
---SKIPIF--
-<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?>
--FILE--
<?php
diff --git a/tests/classes/tostring_002.phpt b/tests/classes/tostring_002.phpt
index 8a4a7af339..eb1bea5447 100644
--- a/tests/classes/tostring_002.phpt
+++ b/tests/classes/tostring_002.phpt
@@ -1,7 +1,5 @@
--TEST--
ZE2 __toString() in __destruct
---SKIPIF--
-<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?>
--FILE--
<?php
diff --git a/tests/classes/type_hinting_001.phpt b/tests/classes/type_hinting_001.phpt
index 28d1280b79..318dcbe086 100644
--- a/tests/classes/type_hinting_001.phpt
+++ b/tests/classes/type_hinting_001.phpt
@@ -1,7 +1,5 @@
--TEST--
ZE2 class type hinting
---SKIPIF--
-<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?>
--FILE--
<?php
diff --git a/tests/classes/type_hinting_002.phpt b/tests/classes/type_hinting_002.phpt
index 6fefcc8dd4..b65bc85c93 100644
--- a/tests/classes/type_hinting_002.phpt
+++ b/tests/classes/type_hinting_002.phpt
@@ -1,7 +1,5 @@
--TEST--
ZE2 class type hinting non existing class
---SKIPIF--
-<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?>
--FILE--
<?php
diff --git a/tests/classes/type_hinting_005b.phpt b/tests/classes/type_hinting_005b.phpt
deleted file mode 100644
index b9fb198fc5..0000000000
--- a/tests/classes/type_hinting_005b.phpt
+++ /dev/null
@@ -1,14 +0,0 @@
---TEST--
-Check type hint compatibility in overrides with array hints.
---FILE--
-<?php
-Class C { function f(array $a) {} }
-
-echo "No hint, should be array.\n";
-Class D extends C { function f($a) {} }
-?>
-==DONE==
---EXPECTF--
-Warning: Declaration of D::f($a) should be compatible with C::f(array $a) in %s on line 5
-No hint, should be array.
-==DONE==
diff --git a/tests/classes/visibility_000a.phpt b/tests/classes/visibility_000a.phpt
index 2524494ff8..0dd86aa182 100644
--- a/tests/classes/visibility_000a.phpt
+++ b/tests/classes/visibility_000a.phpt
@@ -1,7 +1,5 @@
--TEST--
ZE2 A redeclared method must have the same or higher visibility
---SKIPIF--
-<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?>
--FILE--
<?php
diff --git a/tests/classes/visibility_000b.phpt b/tests/classes/visibility_000b.phpt
index 9305467323..f6ac466345 100644
--- a/tests/classes/visibility_000b.phpt
+++ b/tests/classes/visibility_000b.phpt
@@ -1,7 +1,5 @@
--TEST--
ZE2 A redeclared method must have the same or higher visibility
---SKIPIF--
-<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?>
--FILE--
<?php
diff --git a/tests/classes/visibility_000c.phpt b/tests/classes/visibility_000c.phpt
index 064106e979..c651b05d75 100644
--- a/tests/classes/visibility_000c.phpt
+++ b/tests/classes/visibility_000c.phpt
@@ -1,7 +1,5 @@
--TEST--
ZE2 A redeclared method must have the same or higher visibility
---SKIPIF--
-<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?>
--FILE--
<?php
diff --git a/tests/classes/visibility_001a.phpt b/tests/classes/visibility_001a.phpt
index ebd1cc34de..d749b5266a 100644
--- a/tests/classes/visibility_001a.phpt
+++ b/tests/classes/visibility_001a.phpt
@@ -1,7 +1,5 @@
--TEST--
ZE2 A redeclared method must have the same or higher visibility
---SKIPIF--
-<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?>
--FILE--
<?php
diff --git a/tests/classes/visibility_001b.phpt b/tests/classes/visibility_001b.phpt
index e61078ede5..27c39cf430 100644
--- a/tests/classes/visibility_001b.phpt
+++ b/tests/classes/visibility_001b.phpt
@@ -1,7 +1,5 @@
--TEST--
ZE2 A redeclared method must have the same or higher visibility
---SKIPIF--
-<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?>
--FILE--
<?php
diff --git a/tests/classes/visibility_001c.phpt b/tests/classes/visibility_001c.phpt
index bb1075aaed..a9a5896695 100644
--- a/tests/classes/visibility_001c.phpt
+++ b/tests/classes/visibility_001c.phpt
@@ -1,7 +1,5 @@
--TEST--
ZE2 A redeclared method must have the same or higher visibility
---SKIPIF--
-<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?>
--FILE--
<?php
diff --git a/tests/classes/visibility_002a.phpt b/tests/classes/visibility_002a.phpt
index 6c88d204d2..ea86412cea 100644
--- a/tests/classes/visibility_002a.phpt
+++ b/tests/classes/visibility_002a.phpt
@@ -1,7 +1,5 @@
--TEST--
ZE2 A redeclared method must have the same or higher visibility
---SKIPIF--
-<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?>
--FILE--
<?php
diff --git a/tests/classes/visibility_002b.phpt b/tests/classes/visibility_002b.phpt
index 71f47c3954..8116a3239b 100644
--- a/tests/classes/visibility_002b.phpt
+++ b/tests/classes/visibility_002b.phpt
@@ -1,7 +1,5 @@
--TEST--
ZE2 A redeclared method must have the same or higher visibility
---SKIPIF--
-<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?>
--FILE--
<?php
diff --git a/tests/classes/visibility_002c.phpt b/tests/classes/visibility_002c.phpt
index 5edae1d068..308c9057db 100644
--- a/tests/classes/visibility_002c.phpt
+++ b/tests/classes/visibility_002c.phpt
@@ -1,7 +1,5 @@
--TEST--
ZE2 A redeclared method must have the same or higher visibility
---SKIPIF--
-<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?>
--FILE--
<?php
diff --git a/tests/classes/visibility_003a.phpt b/tests/classes/visibility_003a.phpt
index 1693386f81..176cc4a906 100644
--- a/tests/classes/visibility_003a.phpt
+++ b/tests/classes/visibility_003a.phpt
@@ -1,7 +1,5 @@
--TEST--
ZE2 A redeclared method must have the same or higher visibility
---SKIPIF--
-<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?>
--FILE--
<?php
diff --git a/tests/classes/visibility_003b.phpt b/tests/classes/visibility_003b.phpt
index fcfdbe3c55..9b45aa3487 100644
--- a/tests/classes/visibility_003b.phpt
+++ b/tests/classes/visibility_003b.phpt
@@ -1,7 +1,5 @@
--TEST--
ZE2 A redeclared method must have the same or higher visibility
---SKIPIF--
-<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?>
--FILE--
<?php
diff --git a/tests/classes/visibility_003c.phpt b/tests/classes/visibility_003c.phpt
index d94a9c116b..27e2bc2bf5 100644
--- a/tests/classes/visibility_003c.phpt
+++ b/tests/classes/visibility_003c.phpt
@@ -1,7 +1,5 @@
--TEST--
ZE2 A redeclared method must have the same or higher visibility
---SKIPIF--
-<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?>
--FILE--
<?php
diff --git a/tests/classes/visibility_004a.phpt b/tests/classes/visibility_004a.phpt
index 6f16a09edd..717f971999 100644
--- a/tests/classes/visibility_004a.phpt
+++ b/tests/classes/visibility_004a.phpt
@@ -1,7 +1,5 @@
--TEST--
ZE2 A redeclared method must have the same or higher visibility
---SKIPIF--
-<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?>
--FILE--
<?php
diff --git a/tests/classes/visibility_004b.phpt b/tests/classes/visibility_004b.phpt
index 74a83185ee..1ede33450a 100644
--- a/tests/classes/visibility_004b.phpt
+++ b/tests/classes/visibility_004b.phpt
@@ -1,7 +1,5 @@
--TEST--
ZE2 A redeclared method must have the same or higher visibility
---SKIPIF--
-<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?>
--FILE--
<?php
diff --git a/tests/classes/visibility_004c.phpt b/tests/classes/visibility_004c.phpt
index 92a770374e..e4f94a3567 100644
--- a/tests/classes/visibility_004c.phpt
+++ b/tests/classes/visibility_004c.phpt
@@ -1,7 +1,5 @@
--TEST--
ZE2 A redeclared method must have the same or higher visibility
---SKIPIF--
-<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?>
--FILE--
<?php
diff --git a/tests/lang/015.inc b/tests/lang/015.inc
index fae56c4810..d436a7bb14 100644
--- a/tests/lang/015.inc
+++ b/tests/lang/015.inc
@@ -1,3 +1,3 @@
-<?php
+<?php
echo "Hello";
?>
diff --git a/tests/lang/016.inc b/tests/lang/016.inc
index 56aa85d65b..b73333f7b0 100644
--- a/tests/lang/016.inc
+++ b/tests/lang/016.inc
@@ -1,4 +1,4 @@
-<?php
+<?php
function MyFunc ($a) {
echo $a;
}
diff --git a/tests/lang/023-1.inc b/tests/lang/023-1.inc
index 153f5d7668..8d52e844c9 100644
--- a/tests/lang/023-1.inc
+++ b/tests/lang/023-1.inc
@@ -10,11 +10,11 @@
?>
*** Testing assignments and variable aliasing: ***<br>
-<?php
+<?php
/* This test tests assignments to variables using other variables as variable-names */
- $a = "b";
- $$a = "test";
- $$$a = "blah";
+ $a = "b";
+ $$a = "test";
+ $$$a = "blah";
${$$$a}["associative arrays work too"] = "this is nifty";
?>
This should read "blah": <?php echo "$test<br>\n"; ?>
@@ -22,7 +22,7 @@ This should read "this is nifty": <?php echo $blah[$test="associative arrays wor
*************************************************<br>
*** Testing integer operators ***<br>
-<?php
+<?php
/* test just about any operator possible on $i and $j (ints) */
$i = 5;
$j = 3;
@@ -38,7 +38,7 @@ Correct result - 3: <?php echo $j%$i; ?><br>
*********************************<br>
*** Testing real operators ***<br>
-<?php
+<?php
/* test just about any operator possible on $i and $j (floats) */
$i = 5.0;
$j = 3.0;
@@ -55,7 +55,7 @@ Correct result - 3: <?php echo $j%$i; ?><br>
*** Testing if/elseif/else control ***<br>
-<?php
+<?php
/* sick if/elseif/else test by Andi :) */
$a = 5;
if ($a == "4") {
@@ -90,7 +90,7 @@ if ($a == "4") {
*** Seriously nested if's test ***<br>
** spelling correction by kluzz **
-<?php
+<?php
/* yet another sick if/elseif/else test by Zeev */
$i=$j=0;
echo "Only two lines of text should follow:<br>\n";
@@ -98,7 +98,7 @@ if (0) { /* this code is not supposed to be executed */
echo "hmm, this shouldn't be displayed #1<br>\n";
$j++;
if (1) {
- $i
+ $i
+=
$j;
if (0) {
@@ -128,7 +128,7 @@ if (0) { /* this code is not supposed to be executed */
} elseif (2-2) { /* as long as 2-2==0, this isn't supposed to be executed either */
$i = ++$j;
echo "hmm, this shouldn't be displayed #2<br>\n";
- if (1) {
+ if (1) {
$j = ++$i;
if (0) {
$j = $i*2+$j*($i++);
@@ -182,7 +182,7 @@ if (0) { /* this code is not supposed to be executed */
?>
*** C-style else-if's ***<br>
-<?php
+<?php
/* looks like without we even tried, C-style else-if structure works fine! */
if ($a=0) {
echo "This shouldn't be displayed<br>\n";
@@ -199,7 +199,7 @@ if (0) { /* this code is not supposed to be executed */
*************************<br>
*** WHILE tests ***<br>
-<?php
+<?php
$i=0;
$j=20;
while ($i<(2*$j)) {
@@ -217,7 +217,7 @@ while ($i<(2*$j)) {
*** Nested WHILEs ***<br>
-<?php
+<?php
$arr_len=3;
$i=0;
@@ -253,7 +253,7 @@ while ($i<$arr_len) {
*********************<br>
*** hash test... ***<br>
-<?php
+<?php
/*
$i=0;
@@ -273,7 +273,7 @@ echo "commented out...";
**************************<br>
*** Hash resizing test ***<br>
-<?php
+<?php
$i = 10;
$a = 'b';
while ($i > 0) {
@@ -295,7 +295,7 @@ while ($i > 0) {
*** break/continue test ***<br>
-<?php
+<?php
$i=0;
echo "\$i should go from 0 to 2<br>\n";
@@ -349,7 +349,7 @@ while ($i<5) {
<?php include("023-2.inc"); ?>
********************************<br>
-<?php
+<?php
{
echo "Tests completed.<br>\n"; # testing some PHP style comment...
}
diff --git a/tests/lang/023-2.inc b/tests/lang/023-2.inc
index a66030775d..6dd1e730f1 100644
--- a/tests/lang/023-2.inc
+++ b/tests/lang/023-2.inc
@@ -1,5 +1,5 @@
<html>
-This is Finish.phtml. This file is supposed to be included
+This is Finish.phtml. This file is supposed to be included
from regression_test.phtml. This is normal HTML.
<?php echo "and this is PHP code, 2+2=".(2+2).""; ?>
diff --git a/tests/lang/031.phpt b/tests/lang/031.phpt
index b2d1e631ec..134df03684 100644
--- a/tests/lang/031.phpt
+++ b/tests/lang/031.phpt
@@ -49,8 +49,10 @@ while(list(,$o) = each($arrayOuter)){
reset($arrayOuter);
reset($arrayInner);
?>
---EXPECT--
+--EXPECTF--
Correct - with inner loop reset.
+
+Deprecated: The each() function is deprecated. This message will be suppressed on further calls in %s on line %d
inloop 0 for key1
inloop 1 for key1
inloop 0 for key2
diff --git a/tests/lang/035.phpt b/tests/lang/035.phpt
index a5e3a7f4cc..63f0385e8c 100644
--- a/tests/lang/035.phpt
+++ b/tests/lang/035.phpt
@@ -1,7 +1,5 @@
--TEST--
ZE2: set_exception_handler()
---SKIPIF--
-<?php if (version_compare(zend_version(), "2.0.0-dev", "<")) print "skip Zend engine 2 required"; ?>
--FILE--
<?php
class MyException extends Exception {
diff --git a/tests/lang/bug17115.phpt b/tests/lang/bug17115.phpt
index 0cb3bf44d2..9500352799 100644
--- a/tests/lang/bug17115.phpt
+++ b/tests/lang/bug17115.phpt
@@ -10,7 +10,8 @@ var_dump($func());
var_dump($func());
var_dump($func());
?>
---EXPECT--
+--EXPECTF--
+Deprecated: Function create_function() is deprecated in %s on line %d
int(0)
int(1)
int(2)
diff --git a/tests/lang/bug21961.phpt b/tests/lang/bug21961.phpt
index 9b7199208d..93e4374220 100644
--- a/tests/lang/bug21961.phpt
+++ b/tests/lang/bug21961.phpt
@@ -1,7 +1,5 @@
--TEST--
Bug #21961 (get_parent_class() segfault)
---SKIPIF--
-<?php if (version_compare(zend_version(),'2.0.0-dev','<')) die('skip prepared for ZE2'); ?>
--FILE--
<?php
diff --git a/tests/lang/bug22690.phpt b/tests/lang/bug22690.phpt
index 6aed5be6e9..9d5444051b 100644
--- a/tests/lang/bug22690.phpt
+++ b/tests/lang/bug22690.phpt
@@ -7,6 +7,8 @@ Bug #22690 (ob_start() is broken with create_function() callbacks)
echo $foo("bar\n");
?>
bar
---EXPECT--
+--EXPECTF--
+
+Deprecated: Function create_function() is deprecated in %s on line %d
BAR
BAR
diff --git a/tests/lang/bug23922.phpt b/tests/lang/bug23922.phpt
index 1fc6e548ff..22c4aaa7d4 100644
--- a/tests/lang/bug23922.phpt
+++ b/tests/lang/bug23922.phpt
@@ -17,4 +17,5 @@ Bug #23922 (scope doesn't properly propagate into internal functions)
$foo->as_expr();
$foo->as_string();
?>
---EXPECT--
+--EXPECTF--
+Deprecated: assert(): Calling assert() with a string argument is deprecated in %s on line %d
diff --git a/tests/lang/bug24926.phpt b/tests/lang/bug24926.phpt
index 8f853dba47..e7fd86ce76 100644
--- a/tests/lang/bug24926.phpt
+++ b/tests/lang/bug24926.phpt
@@ -23,6 +23,7 @@ class foo {
$a = new foo ();
?>
---EXPECT--
+--EXPECTF--
+Deprecated: Function create_function() is deprecated in %s on line %d
FOO
FOO
diff --git a/tests/lang/bug38579.phpt b/tests/lang/bug38579.phpt
index 445296c222..3c96e7f50f 100644
--- a/tests/lang/bug38579.phpt
+++ b/tests/lang/bug38579.phpt
@@ -2,7 +2,7 @@
Bug #38579 (include_once() may include the same file twice)
--SKIPIF--
<?php
-if (substr(PHP_OS, 0, 3) != 'WIN') {
+if(PHP_OS_FAMILY !== "WIN") {
die('skip only for Windows');
}
?>
diff --git a/tests/lang/bug7515.phpt b/tests/lang/bug7515.phpt
index ea58061db0..5c7756c6a1 100644
--- a/tests/lang/bug7515.phpt
+++ b/tests/lang/bug7515.phpt
@@ -1,7 +1,5 @@
--TEST--
Bug #7515 (weird & invisible referencing of objects)
---SKIPIF--
-<?php if(version_compare(zend_version(), "2.0.0-dev", '<')) echo "skip Zend Engine 2 needed\n"; ?>
--INI--
error_reporting=2039
--FILE--
diff --git a/tests/lang/each_binary_safety.phpt b/tests/lang/each_binary_safety.phpt
index bb13534546..37b18b32c7 100644
--- a/tests/lang/each_binary_safety.phpt
+++ b/tests/lang/each_binary_safety.phpt
@@ -9,5 +9,7 @@ while (list($key, $val) = each($arr)) {
echo urlencode($key), ' => ', urlencode($val), "\n";
}
?>
---EXPECT--
+--EXPECTF--
+
+Deprecated: The each() function is deprecated. This message will be suppressed on further calls in %s on line %d
7: foo%00bar => foo%00bar
diff --git a/tests/lang/engine_assignExecutionOrder_001.phpt b/tests/lang/engine_assignExecutionOrder_001.phpt
index 1b85cb7e6c..f4d2bbfee9 100644
--- a/tests/lang/engine_assignExecutionOrder_001.phpt
+++ b/tests/lang/engine_assignExecutionOrder_001.phpt
@@ -84,7 +84,7 @@ Order with array assignment:
in f()
in g()
array(1) {
- [%u|b%"name"]=>
+ ["name"]=>
%string|unicode%(14) "assigned value"
}
@@ -93,7 +93,7 @@ Order with object property assignment:
in f()
in g()
object(stdClass)#%d (1) {
- [%u|b%"assigned value"]=>
+ ["assigned value"]=>
%string|unicode%(14) "assigned value"
}
@@ -102,11 +102,11 @@ Order with nested object property assignment:
in f()
in g()
object(stdClass)#%d (1) {
- [%u|b%"o1"]=>
+ ["o1"]=>
object(stdClass)#%d (1) {
- [%u|b%"o2"]=>
+ ["o2"]=>
object(stdClass)#%d (1) {
- [%u|b%"assigned value"]=>
+ ["assigned value"]=>
%string|unicode%(14) "assigned value"
}
}
@@ -117,9 +117,9 @@ Order with dim_list property assignment:
in f()
in g()
object(stdClass)#%d (1) {
- [%u|b%"a"]=>
+ ["a"]=>
array(1) {
- [%u|b%"assigned value"]=>
+ ["assigned value"]=>
%string|unicode%(14) "assigned value"
}
}
@@ -135,7 +135,7 @@ Order with static array property assignment:
in f()
in g()
array(1) {
- [%u|b%"name"]=>
+ ["name"]=>
%string|unicode%(14) "assigned value"
}
diff --git a/tests/lang/error_2_exception_001.phpt b/tests/lang/error_2_exception_001.phpt
index 9596ba2331..e084b92dd7 100644
--- a/tests/lang/error_2_exception_001.phpt
+++ b/tests/lang/error_2_exception_001.phpt
@@ -1,7 +1,5 @@
--TEST--
ZE2 errors caught as exceptions
---SKIPIF--
-<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?>
--FILE--
<?php
diff --git a/tests/lang/type_hints_001.phpt b/tests/lang/type_hints_001.phpt
index e8a2ffa9e3..65f1dc398d 100644
--- a/tests/lang/type_hints_001.phpt
+++ b/tests/lang/type_hints_001.phpt
@@ -1,7 +1,5 @@
--TEST--
ZE2 type hinting
---SKIPIF--
-<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?>
--FILE--
<?php
diff --git a/tests/lang/type_hints_002.phpt b/tests/lang/type_hints_002.phpt
index b21240a792..bdd5b4e93e 100644
--- a/tests/lang/type_hints_002.phpt
+++ b/tests/lang/type_hints_002.phpt
@@ -1,7 +1,5 @@
--TEST--
ZE2 type hinting
---SKIPIF--
-<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?>
--FILE--
<?php
class P { }
diff --git a/tests/lang/type_hints_003.phpt b/tests/lang/type_hints_003.phpt
index 2b536d0185..d2c48a3ad7 100644
--- a/tests/lang/type_hints_003.phpt
+++ b/tests/lang/type_hints_003.phpt
@@ -1,7 +1,5 @@
--TEST--
ZE2 type
---SKIPIF--
-<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?>
--FILE--
<?php
class T {
diff --git a/tests/output/bug74815.phpt b/tests/output/bug74815.phpt
new file mode 100644
index 0000000000..be4fa1b2cb
--- /dev/null
+++ b/tests/output/bug74815.phpt
@@ -0,0 +1,15 @@
+--TEST--
+Bug #74815 crash with a combination of INI entries at startup
+--FILE--
+<?php
+
+$php = getenv("TEST_PHP_EXECUTABLE");
+
+echo shell_exec("$php -n -d error_log=errors.log -d error_reporting=E_ALL -d log_errors=On -d track_errors=On -v");
+
+?>
+==DONE==
+--EXPECTF--
+Deprecated: Directive 'track_errors' is deprecated in Unknown on line 0
+%A
+==DONE==
diff --git a/tests/output/ob_clean_error_001.phpt b/tests/output/ob_clean_error_001.phpt
index a1b9886f3e..8060c2be8b 100644
--- a/tests/output/ob_clean_error_001.phpt
+++ b/tests/output/ob_clean_error_001.phpt
@@ -12,7 +12,7 @@ echo "*** Testing ob_clean() : error conditions ***\n";
// One argument
echo "\n-- Testing ob_clean() function with one argument --\n";
-$extra_arg = 10;;
+$extra_arg = 10;
var_dump( ob_clean($extra_arg) );
echo "Done";
diff --git a/tests/output/ob_end_flush_error_001.phpt b/tests/output/ob_end_flush_error_001.phpt
index 7675f009e0..2cd9a64e0d 100644
--- a/tests/output/ob_end_flush_error_001.phpt
+++ b/tests/output/ob_end_flush_error_001.phpt
@@ -12,7 +12,7 @@ echo "*** Testing ob_end_flush() : error conditions ***\n";
// One argument
echo "\n-- Testing ob_end_flush() function with one argument --\n";
-$extra_arg = 10;;
+$extra_arg = 10;
var_dump( ob_end_flush($extra_arg) );
echo "Done";
diff --git a/tests/output/ob_flush_error_001.phpt b/tests/output/ob_flush_error_001.phpt
index f98504006a..f24a19b8ce 100644
--- a/tests/output/ob_flush_error_001.phpt
+++ b/tests/output/ob_flush_error_001.phpt
@@ -12,7 +12,7 @@ echo "*** Testing ob_flush() : error conditions ***\n";
// One argument
echo "\n-- Testing ob_flush() function with one argument --\n";
-$extra_arg = 10;;
+$extra_arg = 10;
var_dump( ob_flush($extra_arg) );
echo "Done";
diff --git a/tests/output/ob_get_level_error_001.phpt b/tests/output/ob_get_level_error_001.phpt
index 4719bdd72e..9694da54a0 100644
--- a/tests/output/ob_get_level_error_001.phpt
+++ b/tests/output/ob_get_level_error_001.phpt
@@ -12,7 +12,7 @@ echo "*** Testing ob_get_level() : error conditions ***\n";
// One argument
echo "\n-- Testing ob_get_level() function with one argument --\n";
-$extra_arg = 10;;
+$extra_arg = 10;
var_dump( ob_get_level($extra_arg) );
echo "Done";
diff --git a/tests/output/ob_implicit_flush_variation_001.phpt b/tests/output/ob_implicit_flush_variation_001.phpt
index 19989cc80d..64c911d447 100644
--- a/tests/output/ob_implicit_flush_variation_001.phpt
+++ b/tests/output/ob_implicit_flush_variation_001.phpt
@@ -156,27 +156,27 @@ NULL
NULL
--empty string DQ--
-Error: 2 - ob_implicit_flush() expects parameter 1 to be integer, %unicode_string_optional% given, %s(97)
+Error: 2 - ob_implicit_flush() expects parameter 1 to be integer, string given, %s(97)
NULL
--empty string SQ--
-Error: 2 - ob_implicit_flush() expects parameter 1 to be integer, %unicode_string_optional% given, %s(97)
+Error: 2 - ob_implicit_flush() expects parameter 1 to be integer, string given, %s(97)
NULL
--string DQ--
-Error: 2 - ob_implicit_flush() expects parameter 1 to be integer, %unicode_string_optional% given, %s(97)
+Error: 2 - ob_implicit_flush() expects parameter 1 to be integer, string given, %s(97)
NULL
--string SQ--
-Error: 2 - ob_implicit_flush() expects parameter 1 to be integer, %unicode_string_optional% given, %s(97)
+Error: 2 - ob_implicit_flush() expects parameter 1 to be integer, string given, %s(97)
NULL
--mixed case string--
-Error: 2 - ob_implicit_flush() expects parameter 1 to be integer, %unicode_string_optional% given, %s(97)
+Error: 2 - ob_implicit_flush() expects parameter 1 to be integer, string given, %s(97)
NULL
--heredoc--
-Error: 2 - ob_implicit_flush() expects parameter 1 to be integer, %unicode_string_optional% given, %s(97)
+Error: 2 - ob_implicit_flush() expects parameter 1 to be integer, string given, %s(97)
NULL
--instance of classWithToString--
diff --git a/tests/output/sapi_windows_vt100_support.inc b/tests/output/sapi_windows_vt100_support.inc
new file mode 100644
index 0000000000..9ac54cea61
--- /dev/null
+++ b/tests/output/sapi_windows_vt100_support.inc
@@ -0,0 +1,65 @@
+<?php
+
+function resetVT100State()
+{
+ $state = array(
+ sapi_windows_vt100_support(STDIN),
+ sapi_windows_vt100_support(STDOUT),
+ sapi_windows_vt100_support(STDERR),
+ );
+ sapi_windows_vt100_support(STDIN, false);
+ sapi_windows_vt100_support(STDOUT, false);
+ sapi_windows_vt100_support(STDERR, false);
+
+ return $state;
+}
+
+function restoreVT100State(array $state)
+{
+ sapi_windows_vt100_support(STDIN, $state[0]);
+ sapi_windows_vt100_support(STDOUT, $state[1]);
+ sapi_windows_vt100_support(STDERR, $state[2]);
+}
+
+function testToStdOut()
+{
+ $state = resetVT100State();
+
+ $sampleStreams = array(
+ 'STDIN (constant)' => STDIN,
+ 'STDIN (fopen)' => fopen('php://stdin', 'rb'),
+ 'STDIN (php://fd/0)' => fopen('php://fd/0', 'rb'),
+ 'STDOUT (constant)' => STDOUT,
+ 'STDOUT (fopen)' => fopen('php://stdout', 'wb'),
+ 'STDOUT (php://fd/1)' => fopen('php://fd/1', 'wb'),
+ 'STDERR (constant)' => STDERR,
+ 'STDERR (fopen)' => fopen('php://stderr', 'wb'),
+ 'STDERR (php://fd/2)' => fopen('php://fd/2', 'wb'),
+ 'Not a stream' => 'foo',
+ 'Invalid stream (php://temp)' => fopen('php://temp', 'wb'),
+ 'Invalid stream (php://input)' => fopen('php://input', 'wb'),
+ 'Invalid stream (php://memory)' => fopen('php://memory', 'wb'),
+ 'File stream' => $closeMe = fopen(__FILE__, 'rb'),
+ );
+
+ foreach ($sampleStreams as $name => $stream) {
+ echo "$name:\n";
+ echo "- current value : "; var_dump(sapi_windows_vt100_support($stream));
+ echo "- enabling VT100 : "; var_dump(sapi_windows_vt100_support($stream, true));
+ echo "- current value : "; var_dump(sapi_windows_vt100_support($stream));
+ echo "- disabling VT100: "; var_dump(sapi_windows_vt100_support($stream, false));
+ echo "- current value : "; var_dump(sapi_windows_vt100_support($stream));
+ }
+
+ fclose($closeMe);
+ restoreVT100State($state);
+}
+
+function testToStdErr()
+{
+ ob_start();
+ testToStdOut();
+ $result = ob_get_contents();
+ ob_end_clean();
+ fwrite(STDERR, $result);
+}
diff --git a/tests/output/sapi_windows_vt100_support_notwindows.phpt b/tests/output/sapi_windows_vt100_support_notwindows.phpt
new file mode 100644
index 0000000000..cf4bf6fa6c
--- /dev/null
+++ b/tests/output/sapi_windows_vt100_support_notwindows.phpt
@@ -0,0 +1,14 @@
+--TEST--
+Test that sapi_windows_vt100_support exists only on Windows
+--SKIPIF--
+<?php
+if(PHP_OS_FAMILY === "Windows") {
+ echo "skip Only for not Windows systems";
+}
+?>
+--FILE--
+<?php
+var_dump(function_exists('sapi_windows_vt100_support'));
+?>
+--EXPECT--
+bool(false)
diff --git a/tests/output/sapi_windows_vt100_support_winko_err.phpt b/tests/output/sapi_windows_vt100_support_winko_err.phpt
new file mode 100644
index 0000000000..04dbef561e
--- /dev/null
+++ b/tests/output/sapi_windows_vt100_support_winko_err.phpt
@@ -0,0 +1,148 @@
+--TEST--
+Test sapi_windows_vt100_support on older Windows versions with redirected STDERR
+--SKIPIF--
+<?php
+if (getenv("SKIP_IO_CAPTURE_TESTS")) {
+ die("skip I/O capture test");
+}
+if(PHP_OS_FAMILY !== "Windows") {
+ echo "skip Only for Windows systems";
+} elseif (version_compare(
+ PHP_WINDOWS_VERSION_MAJOR.'.'.PHP_WINDOWS_VERSION_MINOR.'.'.PHP_WINDOWS_VERSION_BUILD,
+ '10.0.10586'
+) >= 0) {
+ echo "skip Only for Windows systems < 10.0.10586";
+}
+?>
+--CAPTURE_STDIO--
+STDERR
+--FILE--
+<?php
+require dirname(__FILE__).'/sapi_windows_vt100_support.inc';
+testToStdErr();
+?>
+--EXPECTF--
+STDIN (constant):
+- current value : bool(false)
+- enabling VT100 : bool(false)
+- current value : bool(false)
+- disabling VT100: bool(false)
+- current value : bool(false)
+STDIN (fopen):
+- current value : bool(false)
+- enabling VT100 : bool(false)
+- current value : bool(false)
+- disabling VT100: bool(false)
+- current value : bool(false)
+STDIN (php://fd/0):
+- current value : bool(false)
+- enabling VT100 : bool(false)
+- current value : bool(false)
+- disabling VT100: bool(false)
+- current value : bool(false)
+STDOUT (constant):
+- current value : bool(false)
+- enabling VT100 : bool(false)
+- current value : bool(false)
+- disabling VT100: bool(true)
+- current value : bool(false)
+STDOUT (fopen):
+- current value : bool(false)
+- enabling VT100 : bool(false)
+- current value : bool(false)
+- disabling VT100: bool(true)
+- current value : bool(false)
+STDOUT (php://fd/1):
+- current value : bool(false)
+- enabling VT100 : bool(false)
+- current value : bool(false)
+- disabling VT100: bool(true)
+- current value : bool(false)
+STDERR (constant):
+- current value : bool(false)
+- enabling VT100 : bool(false)
+- current value : bool(false)
+- disabling VT100: bool(false)
+- current value : bool(false)
+STDERR (fopen):
+- current value : bool(false)
+- enabling VT100 : bool(false)
+- current value : bool(false)
+- disabling VT100: bool(false)
+- current value : bool(false)
+STDERR (php://fd/2):
+- current value : bool(false)
+- enabling VT100 : bool(false)
+- current value : bool(false)
+- disabling VT100: bool(false)
+- current value : bool(false)
+Not a stream:
+- current value :
+Warning: sapi_windows_vt100_support() expects parameter 1 to be resource, string given in %s on line %d
+bool(false)
+- enabling VT100 :
+Warning: sapi_windows_vt100_support() expects parameter 1 to be resource, string given in %s on line %d
+bool(false)
+- current value :
+Warning: sapi_windows_vt100_support() expects parameter 1 to be resource, string given in %s on line %d
+bool(false)
+- disabling VT100:
+Warning: sapi_windows_vt100_support() expects parameter 1 to be resource, string given in %s on line %d
+bool(false)
+- current value :
+Warning: sapi_windows_vt100_support() expects parameter 1 to be resource, string given in %s on line %d
+bool(false)
+Invalid stream (php://temp):
+- current value :
+Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
+bool(false)
+- enabling VT100 :
+Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
+bool(false)
+- current value :
+Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
+bool(false)
+- disabling VT100:
+Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
+bool(false)
+- current value :
+Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
+bool(false)
+Invalid stream (php://input):
+- current value :
+Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
+bool(false)
+- enabling VT100 :
+Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
+bool(false)
+- current value :
+Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
+bool(false)
+- disabling VT100:
+Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
+bool(false)
+- current value :
+Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
+bool(false)
+Invalid stream (php://memory):
+- current value :
+Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
+bool(false)
+- enabling VT100 :
+Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
+bool(false)
+- current value :
+Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
+bool(false)
+- disabling VT100:
+Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
+bool(false)
+- current value :
+Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
+bool(false)
+File stream:
+- current value : bool(false)
+- enabling VT100 : bool(false)
+- current value : bool(false)
+- disabling VT100: bool(false)
+- current value : bool(false)
diff --git a/tests/output/sapi_windows_vt100_support_winko_in-err.phpt b/tests/output/sapi_windows_vt100_support_winko_in-err.phpt
new file mode 100644
index 0000000000..e83b51dff3
--- /dev/null
+++ b/tests/output/sapi_windows_vt100_support_winko_in-err.phpt
@@ -0,0 +1,148 @@
+--TEST--
+Test sapi_windows_vt100_support on older Windows versions with redirected STDIN/STDERR
+--SKIPIF--
+<?php
+if (getenv("SKIP_IO_CAPTURE_TESTS")) {
+ die("skip I/O capture test");
+}
+if(PHP_OS_FAMILY !== "Windows") {
+ echo "skip Only for Windows systems";
+} elseif (version_compare(
+ PHP_WINDOWS_VERSION_MAJOR.'.'.PHP_WINDOWS_VERSION_MINOR.'.'.PHP_WINDOWS_VERSION_BUILD,
+ '10.0.10586'
+) >= 0) {
+ echo "skip Only for Windows systems < 10.0.10586";
+}
+?>
+--CAPTURE_STDIO--
+STDIN STDERR
+--FILE--
+<?php
+require dirname(__FILE__).'/sapi_windows_vt100_support.inc';
+testToStdErr();
+?>
+--EXPECTF--
+STDIN (constant):
+- current value : bool(false)
+- enabling VT100 : bool(false)
+- current value : bool(false)
+- disabling VT100: bool(false)
+- current value : bool(false)
+STDIN (fopen):
+- current value : bool(false)
+- enabling VT100 : bool(false)
+- current value : bool(false)
+- disabling VT100: bool(false)
+- current value : bool(false)
+STDIN (php://fd/0):
+- current value : bool(false)
+- enabling VT100 : bool(false)
+- current value : bool(false)
+- disabling VT100: bool(false)
+- current value : bool(false)
+STDOUT (constant):
+- current value : bool(false)
+- enabling VT100 : bool(false)
+- current value : bool(false)
+- disabling VT100: bool(true)
+- current value : bool(false)
+STDOUT (fopen):
+- current value : bool(false)
+- enabling VT100 : bool(false)
+- current value : bool(false)
+- disabling VT100: bool(true)
+- current value : bool(false)
+STDOUT (php://fd/1):
+- current value : bool(false)
+- enabling VT100 : bool(false)
+- current value : bool(false)
+- disabling VT100: bool(true)
+- current value : bool(false)
+STDERR (constant):
+- current value : bool(false)
+- enabling VT100 : bool(false)
+- current value : bool(false)
+- disabling VT100: bool(false)
+- current value : bool(false)
+STDERR (fopen):
+- current value : bool(false)
+- enabling VT100 : bool(false)
+- current value : bool(false)
+- disabling VT100: bool(false)
+- current value : bool(false)
+STDERR (php://fd/2):
+- current value : bool(false)
+- enabling VT100 : bool(false)
+- current value : bool(false)
+- disabling VT100: bool(false)
+- current value : bool(false)
+Not a stream:
+- current value :
+Warning: sapi_windows_vt100_support() expects parameter 1 to be resource, string given in %s on line %d
+bool(false)
+- enabling VT100 :
+Warning: sapi_windows_vt100_support() expects parameter 1 to be resource, string given in %s on line %d
+bool(false)
+- current value :
+Warning: sapi_windows_vt100_support() expects parameter 1 to be resource, string given in %s on line %d
+bool(false)
+- disabling VT100:
+Warning: sapi_windows_vt100_support() expects parameter 1 to be resource, string given in %s on line %d
+bool(false)
+- current value :
+Warning: sapi_windows_vt100_support() expects parameter 1 to be resource, string given in %s on line %d
+bool(false)
+Invalid stream (php://temp):
+- current value :
+Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
+bool(false)
+- enabling VT100 :
+Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
+bool(false)
+- current value :
+Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
+bool(false)
+- disabling VT100:
+Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
+bool(false)
+- current value :
+Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
+bool(false)
+Invalid stream (php://input):
+- current value :
+Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
+bool(false)
+- enabling VT100 :
+Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
+bool(false)
+- current value :
+Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
+bool(false)
+- disabling VT100:
+Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
+bool(false)
+- current value :
+Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
+bool(false)
+Invalid stream (php://memory):
+- current value :
+Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
+bool(false)
+- enabling VT100 :
+Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
+bool(false)
+- current value :
+Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
+bool(false)
+- disabling VT100:
+Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
+bool(false)
+- current value :
+Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
+bool(false)
+File stream:
+- current value : bool(false)
+- enabling VT100 : bool(false)
+- current value : bool(false)
+- disabling VT100: bool(false)
+- current value : bool(false)
diff --git a/tests/output/sapi_windows_vt100_support_winko_in-out-err.phpt b/tests/output/sapi_windows_vt100_support_winko_in-out-err.phpt
new file mode 100644
index 0000000000..fef672dda5
--- /dev/null
+++ b/tests/output/sapi_windows_vt100_support_winko_in-out-err.phpt
@@ -0,0 +1,148 @@
+--TEST--
+Test sapi_windows_vt100_support on older Windows versions with redirected STDIN/STDOUT/STDERR
+--SKIPIF--
+<?php
+if (getenv("SKIP_IO_CAPTURE_TESTS")) {
+ die("skip I/O capture test");
+}
+if(PHP_OS_FAMILY !== "Windows") {
+ echo "skip Only for Windows systems";
+} elseif (version_compare(
+ PHP_WINDOWS_VERSION_MAJOR.'.'.PHP_WINDOWS_VERSION_MINOR.'.'.PHP_WINDOWS_VERSION_BUILD,
+ '10.0.10586'
+) >= 0) {
+ echo "skip Only for Windows systems < 10.0.10586";
+}
+?>
+--CAPTURE_STDIO--
+STDIN STDOUT STDERR
+--FILE--
+<?php
+require dirname(__FILE__).'/sapi_windows_vt100_support.inc';
+testToStdErr();
+?>
+--EXPECTF--
+STDIN (constant):
+- current value : bool(false)
+- enabling VT100 : bool(false)
+- current value : bool(false)
+- disabling VT100: bool(false)
+- current value : bool(false)
+STDIN (fopen):
+- current value : bool(false)
+- enabling VT100 : bool(false)
+- current value : bool(false)
+- disabling VT100: bool(false)
+- current value : bool(false)
+STDIN (php://fd/0):
+- current value : bool(false)
+- enabling VT100 : bool(false)
+- current value : bool(false)
+- disabling VT100: bool(false)
+- current value : bool(false)
+STDOUT (constant):
+- current value : bool(false)
+- enabling VT100 : bool(false)
+- current value : bool(false)
+- disabling VT100: bool(false)
+- current value : bool(false)
+STDOUT (fopen):
+- current value : bool(false)
+- enabling VT100 : bool(false)
+- current value : bool(false)
+- disabling VT100: bool(false)
+- current value : bool(false)
+STDOUT (php://fd/1):
+- current value : bool(false)
+- enabling VT100 : bool(false)
+- current value : bool(false)
+- disabling VT100: bool(false)
+- current value : bool(false)
+STDERR (constant):
+- current value : bool(false)
+- enabling VT100 : bool(false)
+- current value : bool(false)
+- disabling VT100: bool(false)
+- current value : bool(false)
+STDERR (fopen):
+- current value : bool(false)
+- enabling VT100 : bool(false)
+- current value : bool(false)
+- disabling VT100: bool(false)
+- current value : bool(false)
+STDERR (php://fd/2):
+- current value : bool(false)
+- enabling VT100 : bool(false)
+- current value : bool(false)
+- disabling VT100: bool(false)
+- current value : bool(false)
+Not a stream:
+- current value :
+Warning: sapi_windows_vt100_support() expects parameter 1 to be resource, string given in %s on line %d
+bool(false)
+- enabling VT100 :
+Warning: sapi_windows_vt100_support() expects parameter 1 to be resource, string given in %s on line %d
+bool(false)
+- current value :
+Warning: sapi_windows_vt100_support() expects parameter 1 to be resource, string given in %s on line %d
+bool(false)
+- disabling VT100:
+Warning: sapi_windows_vt100_support() expects parameter 1 to be resource, string given in %s on line %d
+bool(false)
+- current value :
+Warning: sapi_windows_vt100_support() expects parameter 1 to be resource, string given in %s on line %d
+bool(false)
+Invalid stream (php://temp):
+- current value :
+Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
+bool(false)
+- enabling VT100 :
+Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
+bool(false)
+- current value :
+Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
+bool(false)
+- disabling VT100:
+Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
+bool(false)
+- current value :
+Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
+bool(false)
+Invalid stream (php://input):
+- current value :
+Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
+bool(false)
+- enabling VT100 :
+Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
+bool(false)
+- current value :
+Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
+bool(false)
+- disabling VT100:
+Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
+bool(false)
+- current value :
+Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
+bool(false)
+Invalid stream (php://memory):
+- current value :
+Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
+bool(false)
+- enabling VT100 :
+Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
+bool(false)
+- current value :
+Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
+bool(false)
+- disabling VT100:
+Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
+bool(false)
+- current value :
+Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
+bool(false)
+File stream:
+- current value : bool(false)
+- enabling VT100 : bool(false)
+- current value : bool(false)
+- disabling VT100: bool(false)
+- current value : bool(false)
diff --git a/tests/output/sapi_windows_vt100_support_winko_in-out.phpt b/tests/output/sapi_windows_vt100_support_winko_in-out.phpt
new file mode 100644
index 0000000000..f8deab18e5
--- /dev/null
+++ b/tests/output/sapi_windows_vt100_support_winko_in-out.phpt
@@ -0,0 +1,148 @@
+--TEST--
+Test sapi_windows_vt100_support on older Windows versions with redirected STDIN/STDOUT
+--SKIPIF--
+<?php
+if (getenv("SKIP_IO_CAPTURE_TESTS")) {
+ die("skip I/O capture test");
+}
+if(PHP_OS_FAMILY !== "Windows") {
+ echo "skip Only for Windows systems";
+} elseif (version_compare(
+ PHP_WINDOWS_VERSION_MAJOR.'.'.PHP_WINDOWS_VERSION_MINOR.'.'.PHP_WINDOWS_VERSION_BUILD,
+ '10.0.10586'
+) >= 0) {
+ echo "skip Only for Windows systems < 10.0.10586";
+}
+?>
+--CAPTURE_STDIO--
+STDIN STDOUT
+--FILE--
+<?php
+require dirname(__FILE__).'/sapi_windows_vt100_support.inc';
+testToStdOut();
+?>
+--EXPECTF--
+STDIN (constant):
+- current value : bool(false)
+- enabling VT100 : bool(false)
+- current value : bool(false)
+- disabling VT100: bool(false)
+- current value : bool(false)
+STDIN (fopen):
+- current value : bool(false)
+- enabling VT100 : bool(false)
+- current value : bool(false)
+- disabling VT100: bool(false)
+- current value : bool(false)
+STDIN (php://fd/0):
+- current value : bool(false)
+- enabling VT100 : bool(false)
+- current value : bool(false)
+- disabling VT100: bool(false)
+- current value : bool(false)
+STDOUT (constant):
+- current value : bool(false)
+- enabling VT100 : bool(false)
+- current value : bool(false)
+- disabling VT100: bool(false)
+- current value : bool(false)
+STDOUT (fopen):
+- current value : bool(false)
+- enabling VT100 : bool(false)
+- current value : bool(false)
+- disabling VT100: bool(false)
+- current value : bool(false)
+STDOUT (php://fd/1):
+- current value : bool(false)
+- enabling VT100 : bool(false)
+- current value : bool(false)
+- disabling VT100: bool(false)
+- current value : bool(false)
+STDERR (constant):
+- current value : bool(false)
+- enabling VT100 : bool(false)
+- current value : bool(false)
+- disabling VT100: bool(true)
+- current value : bool(false)
+STDERR (fopen):
+- current value : bool(false)
+- enabling VT100 : bool(false)
+- current value : bool(false)
+- disabling VT100: bool(true)
+- current value : bool(false)
+STDERR (php://fd/2):
+- current value : bool(false)
+- enabling VT100 : bool(false)
+- current value : bool(false)
+- disabling VT100: bool(true)
+- current value : bool(false)
+Not a stream:
+- current value :
+Warning: sapi_windows_vt100_support() expects parameter 1 to be resource, string given in %s on line %d
+bool(false)
+- enabling VT100 :
+Warning: sapi_windows_vt100_support() expects parameter 1 to be resource, string given in %s on line %d
+bool(false)
+- current value :
+Warning: sapi_windows_vt100_support() expects parameter 1 to be resource, string given in %s on line %d
+bool(false)
+- disabling VT100:
+Warning: sapi_windows_vt100_support() expects parameter 1 to be resource, string given in %s on line %d
+bool(false)
+- current value :
+Warning: sapi_windows_vt100_support() expects parameter 1 to be resource, string given in %s on line %d
+bool(false)
+Invalid stream (php://temp):
+- current value :
+Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
+bool(false)
+- enabling VT100 :
+Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
+bool(false)
+- current value :
+Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
+bool(false)
+- disabling VT100:
+Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
+bool(false)
+- current value :
+Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
+bool(false)
+Invalid stream (php://input):
+- current value :
+Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
+bool(false)
+- enabling VT100 :
+Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
+bool(false)
+- current value :
+Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
+bool(false)
+- disabling VT100:
+Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
+bool(false)
+- current value :
+Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
+bool(false)
+Invalid stream (php://memory):
+- current value :
+Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
+bool(false)
+- enabling VT100 :
+Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
+bool(false)
+- current value :
+Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
+bool(false)
+- disabling VT100:
+Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
+bool(false)
+- current value :
+Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
+bool(false)
+File stream:
+- current value : bool(false)
+- enabling VT100 : bool(false)
+- current value : bool(false)
+- disabling VT100: bool(false)
+- current value : bool(false)
diff --git a/tests/output/sapi_windows_vt100_support_winko_out-err.phpt b/tests/output/sapi_windows_vt100_support_winko_out-err.phpt
new file mode 100644
index 0000000000..7d72d9217e
--- /dev/null
+++ b/tests/output/sapi_windows_vt100_support_winko_out-err.phpt
@@ -0,0 +1,148 @@
+--TEST--
+Test sapi_windows_vt100_support on older Windows versions with redirected STDOUT/STDERR
+--SKIPIF--
+<?php
+if (getenv("SKIP_IO_CAPTURE_TESTS")) {
+ die("skip I/O capture test");
+}
+if(PHP_OS_FAMILY !== "Windows") {
+ echo "skip Only for Windows systems";
+} elseif (version_compare(
+ PHP_WINDOWS_VERSION_MAJOR.'.'.PHP_WINDOWS_VERSION_MINOR.'.'.PHP_WINDOWS_VERSION_BUILD,
+ '10.0.10586'
+) >= 0) {
+ echo "skip Only for Windows systems < 10.0.10586";
+}
+?>
+--CAPTURE_STDIO--
+STDOUT STDERR
+--FILE--
+<?php
+require dirname(__FILE__).'/sapi_windows_vt100_support.inc';
+testToStdErr();
+?>
+--EXPECTF--
+STDIN (constant):
+- current value : bool(false)
+- enabling VT100 : bool(false)
+- current value : bool(false)
+- disabling VT100: bool(false)
+- current value : bool(false)
+STDIN (fopen):
+- current value : bool(false)
+- enabling VT100 : bool(false)
+- current value : bool(false)
+- disabling VT100: bool(false)
+- current value : bool(false)
+STDIN (php://fd/0):
+- current value : bool(false)
+- enabling VT100 : bool(false)
+- current value : bool(false)
+- disabling VT100: bool(false)
+- current value : bool(false)
+STDOUT (constant):
+- current value : bool(false)
+- enabling VT100 : bool(false)
+- current value : bool(false)
+- disabling VT100: bool(false)
+- current value : bool(false)
+STDOUT (fopen):
+- current value : bool(false)
+- enabling VT100 : bool(false)
+- current value : bool(false)
+- disabling VT100: bool(false)
+- current value : bool(false)
+STDOUT (php://fd/1):
+- current value : bool(false)
+- enabling VT100 : bool(false)
+- current value : bool(false)
+- disabling VT100: bool(false)
+- current value : bool(false)
+STDERR (constant):
+- current value : bool(false)
+- enabling VT100 : bool(false)
+- current value : bool(false)
+- disabling VT100: bool(false)
+- current value : bool(false)
+STDERR (fopen):
+- current value : bool(false)
+- enabling VT100 : bool(false)
+- current value : bool(false)
+- disabling VT100: bool(false)
+- current value : bool(false)
+STDERR (php://fd/2):
+- current value : bool(false)
+- enabling VT100 : bool(false)
+- current value : bool(false)
+- disabling VT100: bool(false)
+- current value : bool(false)
+Not a stream:
+- current value :
+Warning: sapi_windows_vt100_support() expects parameter 1 to be resource, string given in %s on line %d
+bool(false)
+- enabling VT100 :
+Warning: sapi_windows_vt100_support() expects parameter 1 to be resource, string given in %s on line %d
+bool(false)
+- current value :
+Warning: sapi_windows_vt100_support() expects parameter 1 to be resource, string given in %s on line %d
+bool(false)
+- disabling VT100:
+Warning: sapi_windows_vt100_support() expects parameter 1 to be resource, string given in %s on line %d
+bool(false)
+- current value :
+Warning: sapi_windows_vt100_support() expects parameter 1 to be resource, string given in %s on line %d
+bool(false)
+Invalid stream (php://temp):
+- current value :
+Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
+bool(false)
+- enabling VT100 :
+Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
+bool(false)
+- current value :
+Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
+bool(false)
+- disabling VT100:
+Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
+bool(false)
+- current value :
+Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
+bool(false)
+Invalid stream (php://input):
+- current value :
+Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
+bool(false)
+- enabling VT100 :
+Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
+bool(false)
+- current value :
+Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
+bool(false)
+- disabling VT100:
+Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
+bool(false)
+- current value :
+Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
+bool(false)
+Invalid stream (php://memory):
+- current value :
+Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
+bool(false)
+- enabling VT100 :
+Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
+bool(false)
+- current value :
+Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
+bool(false)
+- disabling VT100:
+Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
+bool(false)
+- current value :
+Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
+bool(false)
+File stream:
+- current value : bool(false)
+- enabling VT100 : bool(false)
+- current value : bool(false)
+- disabling VT100: bool(false)
+- current value : bool(false)
diff --git a/tests/output/sapi_windows_vt100_support_winko_out.phpt b/tests/output/sapi_windows_vt100_support_winko_out.phpt
new file mode 100644
index 0000000000..d06a244e82
--- /dev/null
+++ b/tests/output/sapi_windows_vt100_support_winko_out.phpt
@@ -0,0 +1,148 @@
+--TEST--
+Test sapi_windows_vt100_support on older Windows versions with redirected STDOUT
+--SKIPIF--
+<?php
+if (getenv("SKIP_IO_CAPTURE_TESTS")) {
+ die("skip I/O capture test");
+}
+if(PHP_OS_FAMILY !== "Windows") {
+ echo "skip Only for Windows systems";
+} elseif (version_compare(
+ PHP_WINDOWS_VERSION_MAJOR.'.'.PHP_WINDOWS_VERSION_MINOR.'.'.PHP_WINDOWS_VERSION_BUILD,
+ '10.0.10586'
+) >= 0) {
+ echo "skip Only for Windows systems < 10.0.10586";
+}
+?>
+--CAPTURE_STDIO--
+STDOUT
+--FILE--
+<?php
+require dirname(__FILE__).'/sapi_windows_vt100_support.inc';
+testToStdOut();
+?>
+--EXPECTF--
+STDIN (constant):
+- current value : bool(false)
+- enabling VT100 : bool(false)
+- current value : bool(false)
+- disabling VT100: bool(false)
+- current value : bool(false)
+STDIN (fopen):
+- current value : bool(false)
+- enabling VT100 : bool(false)
+- current value : bool(false)
+- disabling VT100: bool(false)
+- current value : bool(false)
+STDIN (php://fd/0):
+- current value : bool(false)
+- enabling VT100 : bool(false)
+- current value : bool(false)
+- disabling VT100: bool(false)
+- current value : bool(false)
+STDOUT (constant):
+- current value : bool(false)
+- enabling VT100 : bool(false)
+- current value : bool(false)
+- disabling VT100: bool(false)
+- current value : bool(false)
+STDOUT (fopen):
+- current value : bool(false)
+- enabling VT100 : bool(false)
+- current value : bool(false)
+- disabling VT100: bool(false)
+- current value : bool(false)
+STDOUT (php://fd/1):
+- current value : bool(false)
+- enabling VT100 : bool(false)
+- current value : bool(false)
+- disabling VT100: bool(false)
+- current value : bool(false)
+STDERR (constant):
+- current value : bool(false)
+- enabling VT100 : bool(false)
+- current value : bool(false)
+- disabling VT100: bool(true)
+- current value : bool(false)
+STDERR (fopen):
+- current value : bool(false)
+- enabling VT100 : bool(false)
+- current value : bool(false)
+- disabling VT100: bool(true)
+- current value : bool(false)
+STDERR (php://fd/2):
+- current value : bool(false)
+- enabling VT100 : bool(false)
+- current value : bool(false)
+- disabling VT100: bool(true)
+- current value : bool(false)
+Not a stream:
+- current value :
+Warning: sapi_windows_vt100_support() expects parameter 1 to be resource, string given in %s on line %d
+bool(false)
+- enabling VT100 :
+Warning: sapi_windows_vt100_support() expects parameter 1 to be resource, string given in %s on line %d
+bool(false)
+- current value :
+Warning: sapi_windows_vt100_support() expects parameter 1 to be resource, string given in %s on line %d
+bool(false)
+- disabling VT100:
+Warning: sapi_windows_vt100_support() expects parameter 1 to be resource, string given in %s on line %d
+bool(false)
+- current value :
+Warning: sapi_windows_vt100_support() expects parameter 1 to be resource, string given in %s on line %d
+bool(false)
+Invalid stream (php://temp):
+- current value :
+Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
+bool(false)
+- enabling VT100 :
+Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
+bool(false)
+- current value :
+Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
+bool(false)
+- disabling VT100:
+Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
+bool(false)
+- current value :
+Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
+bool(false)
+Invalid stream (php://input):
+- current value :
+Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
+bool(false)
+- enabling VT100 :
+Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
+bool(false)
+- current value :
+Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
+bool(false)
+- disabling VT100:
+Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
+bool(false)
+- current value :
+Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
+bool(false)
+Invalid stream (php://memory):
+- current value :
+Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
+bool(false)
+- enabling VT100 :
+Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
+bool(false)
+- current value :
+Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
+bool(false)
+- disabling VT100:
+Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
+bool(false)
+- current value :
+Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
+bool(false)
+File stream:
+- current value : bool(false)
+- enabling VT100 : bool(false)
+- current value : bool(false)
+- disabling VT100: bool(false)
+- current value : bool(false)
diff --git a/tests/output/sapi_windows_vt100_support_winok_err.phpt b/tests/output/sapi_windows_vt100_support_winok_err.phpt
new file mode 100644
index 0000000000..b05f7de753
--- /dev/null
+++ b/tests/output/sapi_windows_vt100_support_winok_err.phpt
@@ -0,0 +1,148 @@
+--TEST--
+Test sapi_windows_vt100_support on newer Windows versions with redirected STDERR
+--SKIPIF--
+<?php
+if (getenv("SKIP_IO_CAPTURE_TESTS")) {
+ die("skip I/O capture test");
+}
+if(PHP_OS_FAMILY !== "Windows") {
+ echo "skip Only for Windows systems";
+} elseif (version_compare(
+ PHP_WINDOWS_VERSION_MAJOR.'.'.PHP_WINDOWS_VERSION_MINOR.'.'.PHP_WINDOWS_VERSION_BUILD,
+ '10.0.10586'
+) < 0) {
+ echo "skip Only for Windows systems >= 10.0.10586";
+}
+?>
+--CAPTURE_STDIO--
+STDERR
+--FILE--
+<?php
+require dirname(__FILE__).'/sapi_windows_vt100_support.inc';
+testToStdErr();
+?>
+--EXPECTF--
+STDIN (constant):
+- current value : bool(false)
+- enabling VT100 : bool(false)
+- current value : bool(false)
+- disabling VT100: bool(false)
+- current value : bool(false)
+STDIN (fopen):
+- current value : bool(false)
+- enabling VT100 : bool(false)
+- current value : bool(false)
+- disabling VT100: bool(false)
+- current value : bool(false)
+STDIN (php://fd/0):
+- current value : bool(false)
+- enabling VT100 : bool(false)
+- current value : bool(false)
+- disabling VT100: bool(false)
+- current value : bool(false)
+STDOUT (constant):
+- current value : bool(false)
+- enabling VT100 : bool(true)
+- current value : bool(true)
+- disabling VT100: bool(true)
+- current value : bool(false)
+STDOUT (fopen):
+- current value : bool(false)
+- enabling VT100 : bool(true)
+- current value : bool(true)
+- disabling VT100: bool(true)
+- current value : bool(false)
+STDOUT (php://fd/1):
+- current value : bool(false)
+- enabling VT100 : bool(true)
+- current value : bool(true)
+- disabling VT100: bool(true)
+- current value : bool(false)
+STDERR (constant):
+- current value : bool(false)
+- enabling VT100 : bool(false)
+- current value : bool(false)
+- disabling VT100: bool(false)
+- current value : bool(false)
+STDERR (fopen):
+- current value : bool(false)
+- enabling VT100 : bool(false)
+- current value : bool(false)
+- disabling VT100: bool(false)
+- current value : bool(false)
+STDERR (php://fd/2):
+- current value : bool(false)
+- enabling VT100 : bool(false)
+- current value : bool(false)
+- disabling VT100: bool(false)
+- current value : bool(false)
+Not a stream:
+- current value :
+Warning: sapi_windows_vt100_support() expects parameter 1 to be resource, string given in %s on line %d
+bool(false)
+- enabling VT100 :
+Warning: sapi_windows_vt100_support() expects parameter 1 to be resource, string given in %s on line %d
+bool(false)
+- current value :
+Warning: sapi_windows_vt100_support() expects parameter 1 to be resource, string given in %s on line %d
+bool(false)
+- disabling VT100:
+Warning: sapi_windows_vt100_support() expects parameter 1 to be resource, string given in %s on line %d
+bool(false)
+- current value :
+Warning: sapi_windows_vt100_support() expects parameter 1 to be resource, string given in %s on line %d
+bool(false)
+Invalid stream (php://temp):
+- current value :
+Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
+bool(false)
+- enabling VT100 :
+Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
+bool(false)
+- current value :
+Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
+bool(false)
+- disabling VT100:
+Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
+bool(false)
+- current value :
+Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
+bool(false)
+Invalid stream (php://input):
+- current value :
+Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
+bool(false)
+- enabling VT100 :
+Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
+bool(false)
+- current value :
+Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
+bool(false)
+- disabling VT100:
+Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
+bool(false)
+- current value :
+Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
+bool(false)
+Invalid stream (php://memory):
+- current value :
+Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
+bool(false)
+- enabling VT100 :
+Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
+bool(false)
+- current value :
+Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
+bool(false)
+- disabling VT100:
+Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
+bool(false)
+- current value :
+Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
+bool(false)
+File stream:
+- current value : bool(false)
+- enabling VT100 : bool(false)
+- current value : bool(false)
+- disabling VT100: bool(false)
+- current value : bool(false)
diff --git a/tests/output/sapi_windows_vt100_support_winok_in-err.phpt b/tests/output/sapi_windows_vt100_support_winok_in-err.phpt
new file mode 100644
index 0000000000..9699d5fd3c
--- /dev/null
+++ b/tests/output/sapi_windows_vt100_support_winok_in-err.phpt
@@ -0,0 +1,148 @@
+--TEST--
+Test sapi_windows_vt100_support on newer Windows versions with redirected STDIN/STDERR
+--SKIPIF--
+<?php
+if (getenv("SKIP_IO_CAPTURE_TESTS")) {
+ die("skip I/O capture test");
+}
+if(PHP_OS_FAMILY !== "Windows") {
+ echo "skip Only for Windows systems";
+} elseif (version_compare(
+ PHP_WINDOWS_VERSION_MAJOR.'.'.PHP_WINDOWS_VERSION_MINOR.'.'.PHP_WINDOWS_VERSION_BUILD,
+ '10.0.10586'
+) < 0) {
+ echo "skip Only for Windows systems >= 10.0.10586";
+}
+?>
+--CAPTURE_STDIO--
+STDIN STDERR
+--FILE--
+<?php
+require dirname(__FILE__).'/sapi_windows_vt100_support.inc';
+testToStdErr();
+?>
+--EXPECTF--
+STDIN (constant):
+- current value : bool(false)
+- enabling VT100 : bool(false)
+- current value : bool(false)
+- disabling VT100: bool(false)
+- current value : bool(false)
+STDIN (fopen):
+- current value : bool(false)
+- enabling VT100 : bool(false)
+- current value : bool(false)
+- disabling VT100: bool(false)
+- current value : bool(false)
+STDIN (php://fd/0):
+- current value : bool(false)
+- enabling VT100 : bool(false)
+- current value : bool(false)
+- disabling VT100: bool(false)
+- current value : bool(false)
+STDOUT (constant):
+- current value : bool(false)
+- enabling VT100 : bool(true)
+- current value : bool(true)
+- disabling VT100: bool(true)
+- current value : bool(false)
+STDOUT (fopen):
+- current value : bool(false)
+- enabling VT100 : bool(true)
+- current value : bool(true)
+- disabling VT100: bool(true)
+- current value : bool(false)
+STDOUT (php://fd/1):
+- current value : bool(false)
+- enabling VT100 : bool(true)
+- current value : bool(true)
+- disabling VT100: bool(true)
+- current value : bool(false)
+STDERR (constant):
+- current value : bool(false)
+- enabling VT100 : bool(false)
+- current value : bool(false)
+- disabling VT100: bool(false)
+- current value : bool(false)
+STDERR (fopen):
+- current value : bool(false)
+- enabling VT100 : bool(false)
+- current value : bool(false)
+- disabling VT100: bool(false)
+- current value : bool(false)
+STDERR (php://fd/2):
+- current value : bool(false)
+- enabling VT100 : bool(false)
+- current value : bool(false)
+- disabling VT100: bool(false)
+- current value : bool(false)
+Not a stream:
+- current value :
+Warning: sapi_windows_vt100_support() expects parameter 1 to be resource, string given in %s on line %d
+bool(false)
+- enabling VT100 :
+Warning: sapi_windows_vt100_support() expects parameter 1 to be resource, string given in %s on line %d
+bool(false)
+- current value :
+Warning: sapi_windows_vt100_support() expects parameter 1 to be resource, string given in %s on line %d
+bool(false)
+- disabling VT100:
+Warning: sapi_windows_vt100_support() expects parameter 1 to be resource, string given in %s on line %d
+bool(false)
+- current value :
+Warning: sapi_windows_vt100_support() expects parameter 1 to be resource, string given in %s on line %d
+bool(false)
+Invalid stream (php://temp):
+- current value :
+Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
+bool(false)
+- enabling VT100 :
+Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
+bool(false)
+- current value :
+Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
+bool(false)
+- disabling VT100:
+Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
+bool(false)
+- current value :
+Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
+bool(false)
+Invalid stream (php://input):
+- current value :
+Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
+bool(false)
+- enabling VT100 :
+Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
+bool(false)
+- current value :
+Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
+bool(false)
+- disabling VT100:
+Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
+bool(false)
+- current value :
+Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
+bool(false)
+Invalid stream (php://memory):
+- current value :
+Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
+bool(false)
+- enabling VT100 :
+Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
+bool(false)
+- current value :
+Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
+bool(false)
+- disabling VT100:
+Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
+bool(false)
+- current value :
+Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
+bool(false)
+File stream:
+- current value : bool(false)
+- enabling VT100 : bool(false)
+- current value : bool(false)
+- disabling VT100: bool(false)
+- current value : bool(false)
diff --git a/tests/output/sapi_windows_vt100_support_winok_in-out-err.phpt b/tests/output/sapi_windows_vt100_support_winok_in-out-err.phpt
new file mode 100644
index 0000000000..09bf3d154b
--- /dev/null
+++ b/tests/output/sapi_windows_vt100_support_winok_in-out-err.phpt
@@ -0,0 +1,148 @@
+--TEST--
+Test sapi_windows_vt100_support on newer Windows versions with redirected STDIN/STDOUT/STDERR
+--SKIPIF--
+<?php
+if (getenv("SKIP_IO_CAPTURE_TESTS")) {
+ die("skip I/O capture test");
+}
+if(PHP_OS_FAMILY !== "Windows") {
+ echo "skip Only for Windows systems";
+} elseif (version_compare(
+ PHP_WINDOWS_VERSION_MAJOR.'.'.PHP_WINDOWS_VERSION_MINOR.'.'.PHP_WINDOWS_VERSION_BUILD,
+ '10.0.10586'
+) < 0) {
+ echo "skip Only for Windows systems >= 10.0.10586";
+}
+?>
+--CAPTURE_STDIO--
+STDIN STDOUT STDERR
+--FILE--
+<?php
+require dirname(__FILE__).'/sapi_windows_vt100_support.inc';
+testToStdOut();
+?>
+--EXPECTF--
+STDIN (constant):
+- current value : bool(false)
+- enabling VT100 : bool(false)
+- current value : bool(false)
+- disabling VT100: bool(false)
+- current value : bool(false)
+STDIN (fopen):
+- current value : bool(false)
+- enabling VT100 : bool(false)
+- current value : bool(false)
+- disabling VT100: bool(false)
+- current value : bool(false)
+STDIN (php://fd/0):
+- current value : bool(false)
+- enabling VT100 : bool(false)
+- current value : bool(false)
+- disabling VT100: bool(false)
+- current value : bool(false)
+STDOUT (constant):
+- current value : bool(false)
+- enabling VT100 : bool(false)
+- current value : bool(false)
+- disabling VT100: bool(false)
+- current value : bool(false)
+STDOUT (fopen):
+- current value : bool(false)
+- enabling VT100 : bool(false)
+- current value : bool(false)
+- disabling VT100: bool(false)
+- current value : bool(false)
+STDOUT (php://fd/1):
+- current value : bool(false)
+- enabling VT100 : bool(false)
+- current value : bool(false)
+- disabling VT100: bool(false)
+- current value : bool(false)
+STDERR (constant):
+- current value : bool(false)
+- enabling VT100 : bool(false)
+- current value : bool(false)
+- disabling VT100: bool(false)
+- current value : bool(false)
+STDERR (fopen):
+- current value : bool(false)
+- enabling VT100 : bool(false)
+- current value : bool(false)
+- disabling VT100: bool(false)
+- current value : bool(false)
+STDERR (php://fd/2):
+- current value : bool(false)
+- enabling VT100 : bool(false)
+- current value : bool(false)
+- disabling VT100: bool(false)
+- current value : bool(false)
+Not a stream:
+- current value :
+Warning: sapi_windows_vt100_support() expects parameter 1 to be resource, string given in %s on line %d
+bool(false)
+- enabling VT100 :
+Warning: sapi_windows_vt100_support() expects parameter 1 to be resource, string given in %s on line %d
+bool(false)
+- current value :
+Warning: sapi_windows_vt100_support() expects parameter 1 to be resource, string given in %s on line %d
+bool(false)
+- disabling VT100:
+Warning: sapi_windows_vt100_support() expects parameter 1 to be resource, string given in %s on line %d
+bool(false)
+- current value :
+Warning: sapi_windows_vt100_support() expects parameter 1 to be resource, string given in %s on line %d
+bool(false)
+Invalid stream (php://temp):
+- current value :
+Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
+bool(false)
+- enabling VT100 :
+Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
+bool(false)
+- current value :
+Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
+bool(false)
+- disabling VT100:
+Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
+bool(false)
+- current value :
+Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
+bool(false)
+Invalid stream (php://input):
+- current value :
+Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
+bool(false)
+- enabling VT100 :
+Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
+bool(false)
+- current value :
+Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
+bool(false)
+- disabling VT100:
+Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
+bool(false)
+- current value :
+Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
+bool(false)
+Invalid stream (php://memory):
+- current value :
+Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
+bool(false)
+- enabling VT100 :
+Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
+bool(false)
+- current value :
+Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
+bool(false)
+- disabling VT100:
+Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
+bool(false)
+- current value :
+Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
+bool(false)
+File stream:
+- current value : bool(false)
+- enabling VT100 : bool(false)
+- current value : bool(false)
+- disabling VT100: bool(false)
+- current value : bool(false)
diff --git a/tests/output/sapi_windows_vt100_support_winok_in-out.phpt b/tests/output/sapi_windows_vt100_support_winok_in-out.phpt
new file mode 100644
index 0000000000..81b6696b44
--- /dev/null
+++ b/tests/output/sapi_windows_vt100_support_winok_in-out.phpt
@@ -0,0 +1,148 @@
+--TEST--
+Test sapi_windows_vt100_support on newer Windows versions with redirected STDIN/STDOUT
+--SKIPIF--
+<?php
+if (getenv("SKIP_IO_CAPTURE_TESTS")) {
+ die("skip I/O capture test");
+}
+if(PHP_OS_FAMILY !== "Windows") {
+ echo "skip Only for Windows systems";
+} elseif (version_compare(
+ PHP_WINDOWS_VERSION_MAJOR.'.'.PHP_WINDOWS_VERSION_MINOR.'.'.PHP_WINDOWS_VERSION_BUILD,
+ '10.0.10586'
+) < 0) {
+ echo "skip Only for Windows systems >= 10.0.10586";
+}
+?>
+--CAPTURE_STDIO--
+STDIN STDOUT
+--FILE--
+<?php
+require dirname(__FILE__).'/sapi_windows_vt100_support.inc';
+testToStdOut();
+?>
+--EXPECTF--
+STDIN (constant):
+- current value : bool(false)
+- enabling VT100 : bool(false)
+- current value : bool(false)
+- disabling VT100: bool(false)
+- current value : bool(false)
+STDIN (fopen):
+- current value : bool(false)
+- enabling VT100 : bool(false)
+- current value : bool(false)
+- disabling VT100: bool(false)
+- current value : bool(false)
+STDIN (php://fd/0):
+- current value : bool(false)
+- enabling VT100 : bool(false)
+- current value : bool(false)
+- disabling VT100: bool(false)
+- current value : bool(false)
+STDOUT (constant):
+- current value : bool(false)
+- enabling VT100 : bool(false)
+- current value : bool(false)
+- disabling VT100: bool(false)
+- current value : bool(false)
+STDOUT (fopen):
+- current value : bool(false)
+- enabling VT100 : bool(false)
+- current value : bool(false)
+- disabling VT100: bool(false)
+- current value : bool(false)
+STDOUT (php://fd/1):
+- current value : bool(false)
+- enabling VT100 : bool(false)
+- current value : bool(false)
+- disabling VT100: bool(false)
+- current value : bool(false)
+STDERR (constant):
+- current value : bool(false)
+- enabling VT100 : bool(true)
+- current value : bool(true)
+- disabling VT100: bool(true)
+- current value : bool(false)
+STDERR (fopen):
+- current value : bool(false)
+- enabling VT100 : bool(true)
+- current value : bool(true)
+- disabling VT100: bool(true)
+- current value : bool(false)
+STDERR (php://fd/2):
+- current value : bool(false)
+- enabling VT100 : bool(true)
+- current value : bool(true)
+- disabling VT100: bool(true)
+- current value : bool(false)
+Not a stream:
+- current value :
+Warning: sapi_windows_vt100_support() expects parameter 1 to be resource, string given in %s on line %d
+bool(false)
+- enabling VT100 :
+Warning: sapi_windows_vt100_support() expects parameter 1 to be resource, string given in %s on line %d
+bool(false)
+- current value :
+Warning: sapi_windows_vt100_support() expects parameter 1 to be resource, string given in %s on line %d
+bool(false)
+- disabling VT100:
+Warning: sapi_windows_vt100_support() expects parameter 1 to be resource, string given in %s on line %d
+bool(false)
+- current value :
+Warning: sapi_windows_vt100_support() expects parameter 1 to be resource, string given in %s on line %d
+bool(false)
+Invalid stream (php://temp):
+- current value :
+Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
+bool(false)
+- enabling VT100 :
+Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
+bool(false)
+- current value :
+Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
+bool(false)
+- disabling VT100:
+Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
+bool(false)
+- current value :
+Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
+bool(false)
+Invalid stream (php://input):
+- current value :
+Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
+bool(false)
+- enabling VT100 :
+Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
+bool(false)
+- current value :
+Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
+bool(false)
+- disabling VT100:
+Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
+bool(false)
+- current value :
+Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
+bool(false)
+Invalid stream (php://memory):
+- current value :
+Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
+bool(false)
+- enabling VT100 :
+Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
+bool(false)
+- current value :
+Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
+bool(false)
+- disabling VT100:
+Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
+bool(false)
+- current value :
+Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
+bool(false)
+File stream:
+- current value : bool(false)
+- enabling VT100 : bool(false)
+- current value : bool(false)
+- disabling VT100: bool(false)
+- current value : bool(false)
diff --git a/tests/output/sapi_windows_vt100_support_winok_out-err.phpt b/tests/output/sapi_windows_vt100_support_winok_out-err.phpt
new file mode 100644
index 0000000000..2062007bf3
--- /dev/null
+++ b/tests/output/sapi_windows_vt100_support_winok_out-err.phpt
@@ -0,0 +1,148 @@
+--TEST--
+Test sapi_windows_vt100_support on newer Windows versions with redirected STDOUT/STDERR
+--SKIPIF--
+<?php
+if (getenv("SKIP_IO_CAPTURE_TESTS")) {
+ die("skip I/O capture test");
+}
+if(PHP_OS_FAMILY !== "Windows") {
+ echo "skip Only for Windows systems";
+} elseif (version_compare(
+ PHP_WINDOWS_VERSION_MAJOR.'.'.PHP_WINDOWS_VERSION_MINOR.'.'.PHP_WINDOWS_VERSION_BUILD,
+ '10.0.10586'
+) < 0) {
+ echo "skip Only for Windows systems >= 10.0.10586";
+}
+?>
+--CAPTURE_STDIO--
+STDOUT STDERR
+--FILE--
+<?php
+require dirname(__FILE__).'/sapi_windows_vt100_support.inc';
+testToStdOut();
+?>
+--EXPECTF--
+STDIN (constant):
+- current value : bool(false)
+- enabling VT100 : bool(false)
+- current value : bool(false)
+- disabling VT100: bool(false)
+- current value : bool(false)
+STDIN (fopen):
+- current value : bool(false)
+- enabling VT100 : bool(false)
+- current value : bool(false)
+- disabling VT100: bool(false)
+- current value : bool(false)
+STDIN (php://fd/0):
+- current value : bool(false)
+- enabling VT100 : bool(false)
+- current value : bool(false)
+- disabling VT100: bool(false)
+- current value : bool(false)
+STDOUT (constant):
+- current value : bool(false)
+- enabling VT100 : bool(false)
+- current value : bool(false)
+- disabling VT100: bool(false)
+- current value : bool(false)
+STDOUT (fopen):
+- current value : bool(false)
+- enabling VT100 : bool(false)
+- current value : bool(false)
+- disabling VT100: bool(false)
+- current value : bool(false)
+STDOUT (php://fd/1):
+- current value : bool(false)
+- enabling VT100 : bool(false)
+- current value : bool(false)
+- disabling VT100: bool(false)
+- current value : bool(false)
+STDERR (constant):
+- current value : bool(false)
+- enabling VT100 : bool(false)
+- current value : bool(false)
+- disabling VT100: bool(false)
+- current value : bool(false)
+STDERR (fopen):
+- current value : bool(false)
+- enabling VT100 : bool(false)
+- current value : bool(false)
+- disabling VT100: bool(false)
+- current value : bool(false)
+STDERR (php://fd/2):
+- current value : bool(false)
+- enabling VT100 : bool(false)
+- current value : bool(false)
+- disabling VT100: bool(false)
+- current value : bool(false)
+Not a stream:
+- current value :
+Warning: sapi_windows_vt100_support() expects parameter 1 to be resource, string given in %s on line %d
+bool(false)
+- enabling VT100 :
+Warning: sapi_windows_vt100_support() expects parameter 1 to be resource, string given in %s on line %d
+bool(false)
+- current value :
+Warning: sapi_windows_vt100_support() expects parameter 1 to be resource, string given in %s on line %d
+bool(false)
+- disabling VT100:
+Warning: sapi_windows_vt100_support() expects parameter 1 to be resource, string given in %s on line %d
+bool(false)
+- current value :
+Warning: sapi_windows_vt100_support() expects parameter 1 to be resource, string given in %s on line %d
+bool(false)
+Invalid stream (php://temp):
+- current value :
+Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
+bool(false)
+- enabling VT100 :
+Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
+bool(false)
+- current value :
+Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
+bool(false)
+- disabling VT100:
+Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
+bool(false)
+- current value :
+Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
+bool(false)
+Invalid stream (php://input):
+- current value :
+Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
+bool(false)
+- enabling VT100 :
+Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
+bool(false)
+- current value :
+Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
+bool(false)
+- disabling VT100:
+Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
+bool(false)
+- current value :
+Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
+bool(false)
+Invalid stream (php://memory):
+- current value :
+Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
+bool(false)
+- enabling VT100 :
+Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
+bool(false)
+- current value :
+Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
+bool(false)
+- disabling VT100:
+Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
+bool(false)
+- current value :
+Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
+bool(false)
+File stream:
+- current value : bool(false)
+- enabling VT100 : bool(false)
+- current value : bool(false)
+- disabling VT100: bool(false)
+- current value : bool(false)
diff --git a/tests/output/sapi_windows_vt100_support_winok_out.phpt b/tests/output/sapi_windows_vt100_support_winok_out.phpt
new file mode 100644
index 0000000000..cc1f83fdfd
--- /dev/null
+++ b/tests/output/sapi_windows_vt100_support_winok_out.phpt
@@ -0,0 +1,148 @@
+--TEST--
+Test sapi_windows_vt100_support on newer Windows versions with redirected STDOUT
+--SKIPIF--
+<?php
+if (getenv("SKIP_IO_CAPTURE_TESTS")) {
+ die("skip I/O capture test");
+}
+if(PHP_OS_FAMILY !== "Windows") {
+ echo "skip Only for Windows systems";
+} elseif (version_compare(
+ PHP_WINDOWS_VERSION_MAJOR.'.'.PHP_WINDOWS_VERSION_MINOR.'.'.PHP_WINDOWS_VERSION_BUILD,
+ '10.0.10586'
+) < 0) {
+ echo "skip Only for Windows systems >= 10.0.10586";
+}
+?>
+--CAPTURE_STDIO--
+STDOUT
+--FILE--
+<?php
+require dirname(__FILE__).'/sapi_windows_vt100_support.inc';
+testToStdOut();
+?>
+--EXPECTF--
+STDIN (constant):
+- current value : bool(false)
+- enabling VT100 : bool(false)
+- current value : bool(false)
+- disabling VT100: bool(false)
+- current value : bool(false)
+STDIN (fopen):
+- current value : bool(false)
+- enabling VT100 : bool(false)
+- current value : bool(false)
+- disabling VT100: bool(false)
+- current value : bool(false)
+STDIN (php://fd/0):
+- current value : bool(false)
+- enabling VT100 : bool(false)
+- current value : bool(false)
+- disabling VT100: bool(false)
+- current value : bool(false)
+STDOUT (constant):
+- current value : bool(false)
+- enabling VT100 : bool(false)
+- current value : bool(false)
+- disabling VT100: bool(false)
+- current value : bool(false)
+STDOUT (fopen):
+- current value : bool(false)
+- enabling VT100 : bool(false)
+- current value : bool(false)
+- disabling VT100: bool(false)
+- current value : bool(false)
+STDOUT (php://fd/1):
+- current value : bool(false)
+- enabling VT100 : bool(false)
+- current value : bool(false)
+- disabling VT100: bool(false)
+- current value : bool(false)
+STDERR (constant):
+- current value : bool(false)
+- enabling VT100 : bool(true)
+- current value : bool(true)
+- disabling VT100: bool(true)
+- current value : bool(false)
+STDERR (fopen):
+- current value : bool(false)
+- enabling VT100 : bool(true)
+- current value : bool(true)
+- disabling VT100: bool(true)
+- current value : bool(false)
+STDERR (php://fd/2):
+- current value : bool(false)
+- enabling VT100 : bool(true)
+- current value : bool(true)
+- disabling VT100: bool(true)
+- current value : bool(false)
+Not a stream:
+- current value :
+Warning: sapi_windows_vt100_support() expects parameter 1 to be resource, string given in %s on line %d
+bool(false)
+- enabling VT100 :
+Warning: sapi_windows_vt100_support() expects parameter 1 to be resource, string given in %s on line %d
+bool(false)
+- current value :
+Warning: sapi_windows_vt100_support() expects parameter 1 to be resource, string given in %s on line %d
+bool(false)
+- disabling VT100:
+Warning: sapi_windows_vt100_support() expects parameter 1 to be resource, string given in %s on line %d
+bool(false)
+- current value :
+Warning: sapi_windows_vt100_support() expects parameter 1 to be resource, string given in %s on line %d
+bool(false)
+Invalid stream (php://temp):
+- current value :
+Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
+bool(false)
+- enabling VT100 :
+Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
+bool(false)
+- current value :
+Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
+bool(false)
+- disabling VT100:
+Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
+bool(false)
+- current value :
+Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
+bool(false)
+Invalid stream (php://input):
+- current value :
+Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
+bool(false)
+- enabling VT100 :
+Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
+bool(false)
+- current value :
+Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
+bool(false)
+- disabling VT100:
+Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
+bool(false)
+- current value :
+Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
+bool(false)
+Invalid stream (php://memory):
+- current value :
+Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
+bool(false)
+- enabling VT100 :
+Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
+bool(false)
+- current value :
+Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
+bool(false)
+- disabling VT100:
+Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
+bool(false)
+- current value :
+Warning: sapi_windows_vt100_support() was not able to analyze the specified stream in %s on line %d
+bool(false)
+File stream:
+- current value : bool(false)
+- enabling VT100 : bool(false)
+- current value : bool(false)
+- disabling VT100: bool(false)
+- current value : bool(false)
diff --git a/tests/output/stream_isatty.inc b/tests/output/stream_isatty.inc
new file mode 100644
index 0000000000..4b7f39986f
--- /dev/null
+++ b/tests/output/stream_isatty.inc
@@ -0,0 +1,36 @@
+<?php
+
+function testToStdOut()
+{
+ $sampleStreams = array(
+ 'STDIN (constant)' => STDIN,
+ 'STDIN (fopen)' => fopen('php://stdin', 'rb'),
+ 'STDIN (php://fd/0)' => fopen('php://fd/0', 'rb'),
+ 'STDOUT (constant)' => STDOUT,
+ 'STDOUT (fopen)' => fopen('php://stdout', 'wb'),
+ 'STDOUT (php://fd/1)' => fopen('php://fd/1', 'wb'),
+ 'STDERR (constant)' => STDERR,
+ 'STDERR (fopen)' => fopen('php://stderr', 'wb'),
+ 'STDERR (php://fd/2)' => fopen('php://fd/2', 'wb'),
+ 'Not a stream' => 'foo',
+ 'Invalid stream (php://temp)' => fopen('php://temp', 'wb'),
+ 'Invalid stream (php://input)' => fopen('php://input', 'wb'),
+ 'Invalid stream (php://memory)' => fopen('php://memory', 'wb'),
+ 'File stream' => $closeMe = fopen(__FILE__, 'rb'),
+ );
+
+ foreach ($sampleStreams as $name => $stream) {
+ echo "$name: "; var_dump(stream_isatty($stream));
+ }
+
+ fclose($closeMe);
+}
+
+function testToStdErr()
+{
+ ob_start();
+ testToStdOut();
+ $result = ob_get_contents();
+ ob_end_clean();
+ fwrite(STDERR, $result);
+}
diff --git a/tests/output/stream_isatty_err.phpt b/tests/output/stream_isatty_err.phpt
new file mode 100644
index 0000000000..b071862c93
--- /dev/null
+++ b/tests/output/stream_isatty_err.phpt
@@ -0,0 +1,32 @@
+--TEST--
+Test stream_isatty with redirected STDERR
+--SKIPIF--
+<?php
+if (getenv("SKIP_IO_CAPTURE_TESTS")) {
+ die("skip I/O capture test");
+}
+?>
+--CAPTURE_STDIO--
+STDERR
+--FILE--
+<?php
+require dirname(__FILE__).'/stream_isatty.inc';
+testToStdErr();
+?>
+--EXPECTF--
+STDIN (constant): bool(true)
+STDIN (fopen): bool(true)
+STDIN (php://fd/0): bool(true)
+STDOUT (constant): bool(true)
+STDOUT (fopen): bool(true)
+STDOUT (php://fd/1): bool(true)
+STDERR (constant): bool(false)
+STDERR (fopen): bool(false)
+STDERR (php://fd/2): bool(false)
+Not a stream:
+Warning: stream_isatty() expects parameter 1 to be resource, string given in %s on line %d
+bool(false)
+Invalid stream (php://temp): bool(false)
+Invalid stream (php://input): bool(false)
+Invalid stream (php://memory): bool(false)
+File stream: bool(false)
diff --git a/tests/output/stream_isatty_in-err.phpt b/tests/output/stream_isatty_in-err.phpt
new file mode 100644
index 0000000000..fac84efb57
--- /dev/null
+++ b/tests/output/stream_isatty_in-err.phpt
@@ -0,0 +1,32 @@
+--TEST--
+Test stream_isatty with redirected STDIN/STDERR
+--SKIPIF--
+<?php
+if (getenv("SKIP_IO_CAPTURE_TESTS")) {
+ die("skip I/O capture test");
+}
+?>
+--CAPTURE_STDIO--
+STDIN STDERR
+--FILE--
+<?php
+require dirname(__FILE__).'/stream_isatty.inc';
+testToStdErr();
+?>
+--EXPECTF--
+STDIN (constant): bool(false)
+STDIN (fopen): bool(false)
+STDIN (php://fd/0): bool(false)
+STDOUT (constant): bool(true)
+STDOUT (fopen): bool(true)
+STDOUT (php://fd/1): bool(true)
+STDERR (constant): bool(false)
+STDERR (fopen): bool(false)
+STDERR (php://fd/2): bool(false)
+Not a stream:
+Warning: stream_isatty() expects parameter 1 to be resource, string given in %s on line %d
+bool(false)
+Invalid stream (php://temp): bool(false)
+Invalid stream (php://input): bool(false)
+Invalid stream (php://memory): bool(false)
+File stream: bool(false)
diff --git a/tests/output/stream_isatty_in-out-err.phpt b/tests/output/stream_isatty_in-out-err.phpt
new file mode 100644
index 0000000000..56c49f70a8
--- /dev/null
+++ b/tests/output/stream_isatty_in-out-err.phpt
@@ -0,0 +1,32 @@
+--TEST--
+Test stream_isatty with redirected STDIN/STDOUT/STDERR
+--SKIPIF--
+<?php
+if (getenv("SKIP_IO_CAPTURE_TESTS")) {
+ die("skip I/O capture test");
+}
+?>
+--CAPTURE_STDIO--
+STDIN STDOUT STDERR
+--FILE--
+<?php
+require dirname(__FILE__).'/stream_isatty.inc';
+testToStdOut();
+?>
+--EXPECTF--
+STDIN (constant): bool(false)
+STDIN (fopen): bool(false)
+STDIN (php://fd/0): bool(false)
+STDOUT (constant): bool(false)
+STDOUT (fopen): bool(false)
+STDOUT (php://fd/1): bool(false)
+STDERR (constant): bool(false)
+STDERR (fopen): bool(false)
+STDERR (php://fd/2): bool(false)
+Not a stream:
+Warning: stream_isatty() expects parameter 1 to be resource, string given in %s on line %d
+bool(false)
+Invalid stream (php://temp): bool(false)
+Invalid stream (php://input): bool(false)
+Invalid stream (php://memory): bool(false)
+File stream: bool(false)
diff --git a/tests/output/stream_isatty_in-out.phpt b/tests/output/stream_isatty_in-out.phpt
new file mode 100644
index 0000000000..70f2c030f4
--- /dev/null
+++ b/tests/output/stream_isatty_in-out.phpt
@@ -0,0 +1,32 @@
+--TEST--
+Test stream_isatty with redirected STDIN/STDOUT
+--SKIPIF--
+<?php
+if (getenv("SKIP_IO_CAPTURE_TESTS")) {
+ die("skip I/O capture test");
+}
+?>
+--CAPTURE_STDIO--
+STDIN STDOUT
+--FILE--
+<?php
+require dirname(__FILE__).'/stream_isatty.inc';
+testToStdOut();
+?>
+--EXPECTF--
+STDIN (constant): bool(false)
+STDIN (fopen): bool(false)
+STDIN (php://fd/0): bool(false)
+STDOUT (constant): bool(false)
+STDOUT (fopen): bool(false)
+STDOUT (php://fd/1): bool(false)
+STDERR (constant): bool(true)
+STDERR (fopen): bool(true)
+STDERR (php://fd/2): bool(true)
+Not a stream:
+Warning: stream_isatty() expects parameter 1 to be resource, string given in %s on line %d
+bool(false)
+Invalid stream (php://temp): bool(false)
+Invalid stream (php://input): bool(false)
+Invalid stream (php://memory): bool(false)
+File stream: bool(false)
diff --git a/tests/output/stream_isatty_out-err.phpt b/tests/output/stream_isatty_out-err.phpt
new file mode 100644
index 0000000000..4bd06d124d
--- /dev/null
+++ b/tests/output/stream_isatty_out-err.phpt
@@ -0,0 +1,32 @@
+--TEST--
+Test stream_isatty with redirected STDOUT/STDERR
+--SKIPIF--
+<?php
+if (getenv("SKIP_IO_CAPTURE_TESTS")) {
+ die("skip I/O capture test");
+}
+?>
+--CAPTURE_STDIO--
+STDOUT STDERR
+--FILE--
+<?php
+require dirname(__FILE__).'/stream_isatty.inc';
+testToStdOut();
+?>
+--EXPECTF--
+STDIN (constant): bool(true)
+STDIN (fopen): bool(true)
+STDIN (php://fd/0): bool(true)
+STDOUT (constant): bool(false)
+STDOUT (fopen): bool(false)
+STDOUT (php://fd/1): bool(false)
+STDERR (constant): bool(false)
+STDERR (fopen): bool(false)
+STDERR (php://fd/2): bool(false)
+Not a stream:
+Warning: stream_isatty() expects parameter 1 to be resource, string given in %s on line %d
+bool(false)
+Invalid stream (php://temp): bool(false)
+Invalid stream (php://input): bool(false)
+Invalid stream (php://memory): bool(false)
+File stream: bool(false)
diff --git a/tests/output/stream_isatty_out.phpt b/tests/output/stream_isatty_out.phpt
new file mode 100644
index 0000000000..14e1fb8607
--- /dev/null
+++ b/tests/output/stream_isatty_out.phpt
@@ -0,0 +1,32 @@
+--TEST--
+Test stream_isatty with redirected STDOUT
+--SKIPIF--
+<?php
+if (getenv("SKIP_IO_CAPTURE_TESTS")) {
+ die("skip I/O capture test");
+}
+?>
+--CAPTURE_STDIO--
+STDOUT
+--FILE--
+<?php
+require dirname(__FILE__).'/stream_isatty.inc';
+testToStdOut();
+?>
+--EXPECTF--
+STDIN (constant): bool(true)
+STDIN (fopen): bool(true)
+STDIN (php://fd/0): bool(true)
+STDOUT (constant): bool(false)
+STDOUT (fopen): bool(false)
+STDOUT (php://fd/1): bool(false)
+STDERR (constant): bool(true)
+STDERR (fopen): bool(true)
+STDERR (php://fd/2): bool(true)
+Not a stream:
+Warning: stream_isatty() expects parameter 1 to be resource, string given in %s on line %d
+bool(false)
+Invalid stream (php://temp): bool(false)
+Invalid stream (php://input): bool(false)
+Invalid stream (php://memory): bool(false)
+File stream: bool(false)
diff --git a/tests/quicktester.inc b/tests/quicktester.inc
index 70cb115684..48ed6b549f 100644
--- a/tests/quicktester.inc
+++ b/tests/quicktester.inc
@@ -15,7 +15,7 @@ TESTS;
Remember to NOT put a trailing ; after a line!
*/
-error_reporting(E_ALL);
+error_reporting(E_ALL);
$tests = explode("\n",$tests);
$success = TRUE;
foreach ($tests as $n=>$test)
@@ -72,4 +72,4 @@ foreach ($tests as $n=>$test)
}
}
if ($success) echo "OK";
-
+
diff --git a/tests/run-test/test005.phpt b/tests/run-test/test005.phpt
index 07ad7a659b..ef644a4fb1 100644
--- a/tests/run-test/test005.phpt
+++ b/tests/run-test/test005.phpt
@@ -4,6 +4,8 @@ Error message handling (with ZendOpcache)
<?php
extension_loaded("Zend Opcache") or die("skip Zend Opcache is not loaded");
?>
+--INI--
+track_errors=1
--FILE--
<?php
// If this test fails ask the developers of run-test.php
@@ -24,6 +26,7 @@ $error = 1 / $zero;
var_dump($php_errormsg);
?>
--EXPECTF--
+Deprecated: Directive 'track_errors' is deprecated in Unknown on line 0
string(1) "1"
string(5) "32767"
string(1) "0"
diff --git a/tests/run-test/test008.phpt b/tests/run-test/test008.phpt
index 7d95d8937b..41d22d8e71 100644
--- a/tests/run-test/test008.phpt
+++ b/tests/run-test/test008.phpt
@@ -4,6 +4,8 @@ Error message handling (without ZendOpcache)
<?php
!extension_loaded("Zend Opcache") or die("skip Zend Opcache is loaded");
?>
+--INI--
+track_errors=1
--FILE--
<?php
// If this test fails ask the developers of run-test.php
@@ -22,6 +24,7 @@ $error = 1 / 0;
var_dump($php_errormsg);
?>
--EXPECTF--
+Deprecated: Directive 'track_errors' is deprecated in Unknown on line 0
string(1) "1"
string(5) "32767"
string(1) "0"
diff --git a/tests/run-test/test008a.phpt b/tests/run-test/test008a.phpt
index 7d7649adc0..9814fa12f7 100644
--- a/tests/run-test/test008a.phpt
+++ b/tests/run-test/test008a.phpt
@@ -4,6 +4,8 @@ Error message handling (with ZendOpcache)
<?php
if (!extension_loaded("Zend Opcache")) die("skip Zend Opcache is not loaded");
?>
+--INI--
+track_errors=1
--FILE--
<?php
// If this test fails ask the developers of run-test.php
@@ -24,6 +26,7 @@ $error = 1 / $zero;
var_dump($php_errormsg);
?>
--EXPECTF--
+Deprecated: Directive 'track_errors' is deprecated in Unknown on line 0
string(1) "1"
string(5) "32767"
string(1) "0"
diff --git a/tests/security/open_basedir.inc b/tests/security/open_basedir.inc
index d229f8497f..c5de8ca112 100644
--- a/tests/security/open_basedir.inc
+++ b/tests/security/open_basedir.inc
@@ -3,7 +3,7 @@
// This file contains helper functions for testing open_basedir configuration
// Care must be taken with where the directories are created because different
// SAPIs set the working directory differently. So simply creating a directory
-// relative to the current working directory like this: mkdir("blah") might
+// relative to the current working directory like this: mkdir("blah") might
// actually create it in several different places depending on the SAPI..!
//
// Note also depending on the version of php being tested, so the open_basedir
@@ -26,7 +26,7 @@ function recursive_delete_directory($directory) {
// Make sure the directory is valid
if (is_dir($directory) == FALSE) {
return FALSE;
- }
+ }
// Check we can access the directory
if (is_readable($directory) == FALSE) {
@@ -110,7 +110,7 @@ function test_open_basedir_array($function) {
global $savedDirectory;
test_open_basedir_before($function);
- test_open_basedir_error($function);
+ test_open_basedir_error($function);
var_dump(is_array($function("./../.")));
var_dump(is_array($function("../ok")));
var_dump(is_array($function("ok.txt")));
@@ -124,7 +124,7 @@ function test_open_basedir_array($function) {
function test_open_basedir($function) {
global $savedDirectory;
test_open_basedir_before($function);
- test_open_basedir_error($function);
+ test_open_basedir_error($function);
var_dump($function("./../."));
var_dump($function("../ok"));
var_dump($function("ok.txt"));
diff --git a/tests/security/open_basedir_001.phpt b/tests/security/open_basedir_001.phpt
index 9ea9559942..c4459686fb 100644
--- a/tests/security/open_basedir_001.phpt
+++ b/tests/security/open_basedir_001.phpt
@@ -2,7 +2,7 @@
openbase_dir runtime tightning
--SKIPIF--
<?php
-if (substr(PHP_OS, 0, 3) == 'WIN') {
+if(PHP_OS_FAMILY === "Windows") {
die('skip.. only for unix');
}
if (!is_dir("/usr/local/bin")) {
diff --git a/tests/security/open_basedir_link.phpt b/tests/security/open_basedir_link.phpt
index 82f97d6b09..57506d599b 100644
--- a/tests/security/open_basedir_link.phpt
+++ b/tests/security/open_basedir_link.phpt
@@ -2,7 +2,7 @@
Test open_basedir configuration
--SKIPIF--
<?php
-if (substr(PHP_OS, 0, 3) == 'WIN') {
+if(PHP_OS_FAMILY === "Windows") {
die('skip no links on Windows');
}
?>
diff --git a/tests/security/open_basedir_linkinfo.phpt b/tests/security/open_basedir_linkinfo.phpt
index 55cf2c2f4b..5a532f8455 100644
--- a/tests/security/open_basedir_linkinfo.phpt
+++ b/tests/security/open_basedir_linkinfo.phpt
@@ -2,7 +2,7 @@
Test open_basedir configuration
--SKIPIF--
<?php
-if (substr(PHP_OS, 0, 3) == 'WIN') {
+if(PHP_OS_FAMILY === "Windows") {
die('skip no symlinks on Windows');
}
?>
diff --git a/tests/security/open_basedir_mkdir.phpt b/tests/security/open_basedir_mkdir.phpt
index 9c32d408a2..91cb392206 100644
--- a/tests/security/open_basedir_mkdir.phpt
+++ b/tests/security/open_basedir_mkdir.phpt
@@ -2,7 +2,7 @@
Test open_basedir configuration
--SKIPIF--
<?php
-if (substr(PHP_OS, 0, 3) != 'WIN') {
+if(PHP_OS_FAMILY !== "Windows") {
die('skip Windows only variation');
}
?>
diff --git a/tests/security/open_basedir_parse_ini_file.phpt b/tests/security/open_basedir_parse_ini_file.phpt
index d69adeb5e1..31ad1e5982 100644
--- a/tests/security/open_basedir_parse_ini_file.phpt
+++ b/tests/security/open_basedir_parse_ini_file.phpt
@@ -4,7 +4,7 @@ Test open_basedir configuration
open_basedir=.
--SKIPIF--
<?php
-if (substr(PHP_OS, 0, 3) != 'WIN') {
+if(PHP_OS_FAMILY !== "Windows") {
die('skip Windows only variation');
}
?>
diff --git a/tests/security/open_basedir_readlink.phpt b/tests/security/open_basedir_readlink.phpt
index 33720bbf1b..a2d892909d 100644
--- a/tests/security/open_basedir_readlink.phpt
+++ b/tests/security/open_basedir_readlink.phpt
@@ -2,8 +2,8 @@
Test open_basedir configuration
--SKIPIF--
<?php
-if (substr(PHP_OS, 0, 3) == 'WIN') {
- die('skip no symlinks on Windows');
+if(PHP_OS_FAMILY === "Windows") {
+ die('skip not for Windows');
}
?>
--FILE--
diff --git a/tests/security/open_basedir_realpath.phpt b/tests/security/open_basedir_realpath.phpt
index 8cae890e99..9f56cd8005 100644
--- a/tests/security/open_basedir_realpath.phpt
+++ b/tests/security/open_basedir_realpath.phpt
@@ -2,7 +2,7 @@
Test open_basedir configuration
--SKIPIF--
<?php
-if (substr(PHP_OS, 0, 3) != 'WIN') {
+if(PHP_OS_FAMILY !== "Windows") {
die('skip only run on Windows');
}
?>
diff --git a/tests/security/open_basedir_symlink.phpt b/tests/security/open_basedir_symlink.phpt
index cdc8e7bcc4..ae431df2ca 100644
--- a/tests/security/open_basedir_symlink.phpt
+++ b/tests/security/open_basedir_symlink.phpt
@@ -2,8 +2,8 @@
Test open_basedir configuration
--SKIPIF--
<?php
-if (substr(PHP_OS, 0, 3) == 'WIN') {
- die('skip no symlinks on Windows');
+if(PHP_OS_FAMILY === "Windows") {
+ die('skip not for Windows');
}
?>
--INI--