summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/basic/bug53180.phpt38
-rw-r--r--tests/basic/bug55500.phpt18
-rw-r--r--tests/basic/req44164.phpt34
-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_max_file_uploads_empty_files.phpt196
-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/autoload_001.phpt1
-rw-r--r--tests/classes/autoload_002.phpt1
-rw-r--r--tests/classes/autoload_003.phpt1
-rw-r--r--tests/classes/autoload_004.phpt1
-rw-r--r--tests/classes/autoload_005.phpt1
-rw-r--r--tests/classes/autoload_006.phpt1
-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_scope_001.phpt2
-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.phpt26
-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/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.phpt2
-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/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/035.phpt2
-rw-r--r--tests/lang/bug21961.phpt2
-rw-r--r--tests/lang/bug38579.phpt2
-rw-r--r--tests/lang/bug7515.phpt2
-rw-r--r--tests/lang/engine_assignExecutionOrder_001.phpt16
-rw-r--r--tests/lang/error_2_exception_001.phpt2
-rw-r--r--tests/lang/foreachLoop.001.phpt126
-rw-r--r--tests/lang/foreachLoop.002.phpt344
-rw-r--r--tests/lang/foreachLoop.003.phpt92
-rw-r--r--tests/lang/foreachLoop.004.phpt150
-rw-r--r--tests/lang/foreachLoop.005.phpt46
-rw-r--r--tests/lang/foreachLoop.006.phpt20
-rw-r--r--tests/lang/foreachLoop.009.phpt156
-rw-r--r--tests/lang/foreachLoop.010.phpt78
-rw-r--r--tests/lang/foreachLoop.011.phpt66
-rw-r--r--tests/lang/foreachLoop.012.phpt988
-rw-r--r--tests/lang/foreachLoop.013.phpt1070
-rw-r--r--tests/lang/foreachLoop.014.phpt990
-rw-r--r--tests/lang/foreachLoop.015.phpt1074
-rw-r--r--tests/lang/foreachLoop.016.phpt412
-rw-r--r--tests/lang/foreachLoop.017.phpt20
-rw-r--r--tests/lang/operators/add_basiclong_64bit.phpt86
-rw-r--r--tests/lang/operators/add_variationStr.phpt50
-rw-r--r--tests/lang/operators/bitwiseAnd_variationStr.phpt50
-rw-r--r--tests/lang/operators/bitwiseNot_variationStr.phpt42
-rw-r--r--tests/lang/operators/bitwiseOr_variationStr.phpt50
-rw-r--r--tests/lang/operators/bitwiseShiftLeft_variationStr_64bit.phpt848
-rw-r--r--tests/lang/operators/bitwiseXor_variationStr.phpt50
-rw-r--r--tests/lang/operators/divide_basiclong_64bit.phpt86
-rw-r--r--tests/lang/operators/divide_variationStr.phpt50
-rw-r--r--tests/lang/operators/modulus_variationStr.phpt840
-rw-r--r--tests/lang/operators/multiply_basiclong_64bit.phpt86
-rw-r--r--tests/lang/operators/multiply_variationStr.phpt50
-rw-r--r--tests/lang/operators/negate_basiclong_64bit.phpt62
-rw-r--r--tests/lang/operators/negate_variationStr.phpt42
-rw-r--r--tests/lang/operators/operator_equals_basic.phpt128
-rw-r--r--tests/lang/operators/operator_equals_variation.phpt124
-rw-r--r--tests/lang/operators/operator_equals_variation_64bit.phpt128
-rw-r--r--tests/lang/operators/operator_gt_basic.phpt128
-rw-r--r--tests/lang/operators/operator_gt_or_equal_basic.phpt128
-rw-r--r--tests/lang/operators/operator_gt_or_equal_variation.phpt124
-rw-r--r--tests/lang/operators/operator_gt_or_equal_variation_64bit.phpt124
-rw-r--r--tests/lang/operators/operator_gt_variation.phpt122
-rw-r--r--tests/lang/operators/operator_gt_variation_64bit.phpt122
-rw-r--r--tests/lang/operators/operator_identical_basic.phpt128
-rw-r--r--tests/lang/operators/operator_identical_variation.phpt124
-rw-r--r--tests/lang/operators/operator_identical_variation_64bit.phpt128
-rw-r--r--tests/lang/operators/operator_lt_basic.phpt122
-rw-r--r--tests/lang/operators/operator_lt_or_equal_basic.phpt126
-rw-r--r--tests/lang/operators/operator_lt_or_equal_variation.phpt124
-rw-r--r--tests/lang/operators/operator_lt_or_equal_variation_64bit.phpt124
-rw-r--r--tests/lang/operators/operator_lt_variation.phpt118
-rw-r--r--tests/lang/operators/operator_lt_variation_64bit.phpt118
-rw-r--r--tests/lang/operators/operator_notequals_basic.phpt128
-rw-r--r--tests/lang/operators/operator_notequals_variation.phpt124
-rw-r--r--tests/lang/operators/operator_notequals_variation_64bit.phpt128
-rw-r--r--tests/lang/operators/operator_notidentical_basic.phpt128
-rw-r--r--tests/lang/operators/operator_notidentical_variation.phpt126
-rw-r--r--tests/lang/operators/operator_notidentical_variation_64bit.phpt128
-rw-r--r--tests/lang/operators/operator_spaceship_basic.phpt186
-rw-r--r--tests/lang/operators/postdec_basiclong_64bit.phpt122
-rw-r--r--tests/lang/operators/postdec_variationStr.phpt98
-rw-r--r--tests/lang/operators/postinc_basiclong_64bit.phpt122
-rw-r--r--tests/lang/operators/postinc_variationStr.phpt98
-rw-r--r--tests/lang/operators/predec_basiclong_64bit.phpt62
-rw-r--r--tests/lang/operators/predec_variationStr.phpt42
-rw-r--r--tests/lang/operators/preinc_basiclong_64bit.phpt62
-rw-r--r--tests/lang/operators/subtract_basiclong_64bit.phpt86
-rw-r--r--tests/lang/operators/subtract_variationStr.phpt50
-rw-r--r--tests/lang/returnByReference.001.phpt38
-rw-r--r--tests/lang/returnByReference.002.phpt58
-rw-r--r--tests/lang/returnByReference.003.phpt110
-rw-r--r--tests/lang/returnByReference.004.phpt114
-rw-r--r--tests/lang/returnByReference.005.phpt116
-rw-r--r--tests/lang/returnByReference.006.phpt120
-rw-r--r--tests/lang/returnByReference.007.phpt124
-rw-r--r--tests/lang/returnByReference.008.phpt126
-rw-r--r--tests/lang/returnByReference.009.phpt78
-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/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/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.phpt2
-rw-r--r--tests/security/open_basedir_realpath.phpt2
-rw-r--r--tests/security/open_basedir_symlink.phpt2
244 files changed, 8809 insertions, 6956 deletions
diff --git a/tests/basic/bug53180.phpt b/tests/basic/bug53180.phpt
index 5c2eb76952..16783de8a7 100644
--- a/tests/basic/bug53180.phpt
+++ b/tests/basic/bug53180.phpt
@@ -1,19 +1,19 @@
---TEST--
-Bug #53180 (post_max_size=0 partly not working)
---INI--
-post_max_size=0
---POST--
-email=foo&password=bar&submit=Log+on
---FILE--
-<?php
-var_dump($_POST);
-?>
---EXPECT--
-array(3) {
- ["email"]=>
- string(3) "foo"
- ["password"]=>
- string(3) "bar"
- ["submit"]=>
- string(6) "Log on"
-}
+--TEST--
+Bug #53180 (post_max_size=0 partly not working)
+--INI--
+post_max_size=0
+--POST--
+email=foo&password=bar&submit=Log+on
+--FILE--
+<?php
+var_dump($_POST);
+?>
+--EXPECT--
+array(3) {
+ ["email"]=>
+ string(3) "foo"
+ ["password"]=>
+ string(3) "bar"
+ ["submit"]=>
+ string(6) "Log on"
+}
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/req44164.phpt b/tests/basic/req44164.phpt
index d0082861f2..7a142f5fb9 100644
--- a/tests/basic/req44164.phpt
+++ b/tests/basic/req44164.phpt
@@ -1,17 +1,17 @@
---TEST--
-Req #44164 (Handle "Content-Length" HTTP header when zlib.output_compression active)
---SKIPIF--
-<?php
-if (!function_exists('gzdeflate'))
- die("skip zlib extension required");
-?>
---INI--
-zlib.output_compression=On
---ENV--
-HTTP_ACCEPT_ENCODING=gzip
---FILE--
-<?php
-header("Content-length: 200");
-echo str_repeat("a", 200);
---EXPECT--
-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+--TEST--
+Req #44164 (Handle "Content-Length" HTTP header when zlib.output_compression active)
+--SKIPIF--
+<?php
+if (!function_exists('gzdeflate'))
+ die("skip zlib extension required");
+?>
+--INI--
+zlib.output_compression=On
+--ENV--
+HTTP_ACCEPT_ENCODING=gzip
+--FILE--
+<?php
+header("Content-length: 200");
+echo str_repeat("a", 200);
+--EXPECT--
+aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
diff --git a/tests/basic/req60524-win.phpt b/tests/basic/req60524-win.phpt
index b2e7cfdab4..8eb38a528c 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 !== "WIN")
die('skip Run only on Windows');
?>
--FILE--
diff --git a/tests/basic/req60524.phpt b/tests/basic/req60524.phpt
index 7cc3edfabf..e4999e1a20 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 === "WIN") {
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_max_file_uploads_empty_files.phpt b/tests/basic/rfc1867_max_file_uploads_empty_files.phpt
index 4da55f2597..6ea7915c25 100644
--- a/tests/basic/rfc1867_max_file_uploads_empty_files.phpt
+++ b/tests/basic/rfc1867_max_file_uploads_empty_files.phpt
@@ -1,98 +1,98 @@
---TEST--
-rfc1867 max_file_uploads - empty files shouldn't count
---INI--
-file_uploads=1
-max_file_uploads=2
---POST_RAW--
-Content-Type: multipart/form-data; boundary=---------------------------20896060251896012921717172737
------------------------------20896060251896012921717172737
-Content-Disposition: form-data; name="file2"; filename=""
-Content-Type: text/plain-file
-
-
------------------------------20896060251896012921717172737
-Content-Disposition: form-data; name="file3"; filename=""
-Content-Type: text/plain-file
-
-33
------------------------------20896060251896012921717172737
-Content-Disposition: form-data; name="file4"; filename="file4.txt"
-Content-Type: text/plain-file
-
-
------------------------------20896060251896012921717172737
-Content-Disposition: form-data; name="file1"; filename="file1.txt"
-Content-Type: text/plain-file
-
-1
------------------------------20896060251896012921717172737--
---FILE--
-<?php
-var_dump($_FILES);
-var_dump($_POST);
-if (is_uploaded_file($_FILES["file1"]["tmp_name"])) {
- var_dump(file_get_contents($_FILES["file1"]["tmp_name"]));
-}
-if (is_uploaded_file($_FILES["file4"]["tmp_name"])) {
- var_dump(file_get_contents($_FILES["file4"]["tmp_name"]));
-}
-?>
---EXPECTF--
-array(4) {
- ["file2"]=>
- array(5) {
- ["name"]=>
- string(0) ""
- ["type"]=>
- string(0) ""
- ["tmp_name"]=>
- string(0) ""
- ["error"]=>
- int(4)
- ["size"]=>
- int(0)
- }
- ["file3"]=>
- array(5) {
- ["name"]=>
- string(0) ""
- ["type"]=>
- string(0) ""
- ["tmp_name"]=>
- string(0) ""
- ["error"]=>
- int(4)
- ["size"]=>
- int(0)
- }
- ["file4"]=>
- array(5) {
- ["name"]=>
- string(9) "file4.txt"
- ["type"]=>
- string(15) "text/plain-file"
- ["tmp_name"]=>
- string(%d) "%s"
- ["error"]=>
- int(0)
- ["size"]=>
- int(0)
- }
- ["file1"]=>
- array(5) {
- ["name"]=>
- string(9) "file1.txt"
- ["type"]=>
- string(15) "text/plain-file"
- ["tmp_name"]=>
- string(%d) "%s"
- ["error"]=>
- int(0)
- ["size"]=>
- int(1)
- }
-}
-array(0) {
-}
-string(1) "1"
-string(0) ""
+--TEST--
+rfc1867 max_file_uploads - empty files shouldn't count
+--INI--
+file_uploads=1
+max_file_uploads=2
+--POST_RAW--
+Content-Type: multipart/form-data; boundary=---------------------------20896060251896012921717172737
+-----------------------------20896060251896012921717172737
+Content-Disposition: form-data; name="file2"; filename=""
+Content-Type: text/plain-file
+
+
+-----------------------------20896060251896012921717172737
+Content-Disposition: form-data; name="file3"; filename=""
+Content-Type: text/plain-file
+
+33
+-----------------------------20896060251896012921717172737
+Content-Disposition: form-data; name="file4"; filename="file4.txt"
+Content-Type: text/plain-file
+
+
+-----------------------------20896060251896012921717172737
+Content-Disposition: form-data; name="file1"; filename="file1.txt"
+Content-Type: text/plain-file
+
+1
+-----------------------------20896060251896012921717172737--
+--FILE--
+<?php
+var_dump($_FILES);
+var_dump($_POST);
+if (is_uploaded_file($_FILES["file1"]["tmp_name"])) {
+ var_dump(file_get_contents($_FILES["file1"]["tmp_name"]));
+}
+if (is_uploaded_file($_FILES["file4"]["tmp_name"])) {
+ var_dump(file_get_contents($_FILES["file4"]["tmp_name"]));
+}
+?>
+--EXPECTF--
+array(4) {
+ ["file2"]=>
+ array(5) {
+ ["name"]=>
+ string(0) ""
+ ["type"]=>
+ string(0) ""
+ ["tmp_name"]=>
+ string(0) ""
+ ["error"]=>
+ int(4)
+ ["size"]=>
+ int(0)
+ }
+ ["file3"]=>
+ array(5) {
+ ["name"]=>
+ string(0) ""
+ ["type"]=>
+ string(0) ""
+ ["tmp_name"]=>
+ string(0) ""
+ ["error"]=>
+ int(4)
+ ["size"]=>
+ int(0)
+ }
+ ["file4"]=>
+ array(5) {
+ ["name"]=>
+ string(9) "file4.txt"
+ ["type"]=>
+ string(15) "text/plain-file"
+ ["tmp_name"]=>
+ string(%d) "%s"
+ ["error"]=>
+ int(0)
+ ["size"]=>
+ int(0)
+ }
+ ["file1"]=>
+ array(5) {
+ ["name"]=>
+ string(9) "file1.txt"
+ ["type"]=>
+ string(15) "text/plain-file"
+ ["tmp_name"]=>
+ string(%d) "%s"
+ ["error"]=>
+ int(0)
+ ["size"]=>
+ int(1)
+ }
+}
+array(0) {
+}
+string(1) "1"
+string(0) ""
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/autoload_001.phpt b/tests/classes/autoload_001.phpt
index 6f325f49bb..6b520b701a 100644
--- a/tests/classes/autoload_001.phpt
+++ b/tests/classes/autoload_001.phpt
@@ -2,7 +2,6 @@
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--
diff --git a/tests/classes/autoload_002.phpt b/tests/classes/autoload_002.phpt
index 27dea0f9d4..582cb460f4 100644
--- a/tests/classes/autoload_002.phpt
+++ b/tests/classes/autoload_002.phpt
@@ -2,7 +2,6 @@
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--
diff --git a/tests/classes/autoload_003.phpt b/tests/classes/autoload_003.phpt
index 7bdb5da36a..41e877cdd9 100644
--- a/tests/classes/autoload_003.phpt
+++ b/tests/classes/autoload_003.phpt
@@ -2,7 +2,6 @@
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--
diff --git a/tests/classes/autoload_004.phpt b/tests/classes/autoload_004.phpt
index 23aea5d086..88b10b50d7 100644
--- a/tests/classes/autoload_004.phpt
+++ b/tests/classes/autoload_004.phpt
@@ -2,7 +2,6 @@
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--
diff --git a/tests/classes/autoload_005.phpt b/tests/classes/autoload_005.phpt
index 36a4e18f0b..c5741396d5 100644
--- a/tests/classes/autoload_005.phpt
+++ b/tests/classes/autoload_005.phpt
@@ -2,7 +2,6 @@
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--
diff --git a/tests/classes/autoload_006.phpt b/tests/classes/autoload_006.phpt
index 9af6fc9829..173b87db04 100644
--- a/tests/classes/autoload_006.phpt
+++ b/tests/classes/autoload_006.phpt
@@ -2,7 +2,6 @@
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--
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_scope_001.phpt b/tests/classes/constants_scope_001.phpt
index 50066282ea..c2585b2212 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
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..b0dfe2e8b1 100644
--- a/tests/classes/implicit_instantiation_001.phpt
+++ b/tests/classes/implicit_instantiation_001.phpt
@@ -134,25 +134,25 @@ Warning: Attempt to assign property 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/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..8017a8a360 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
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/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/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/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/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/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/foreachLoop.001.phpt b/tests/lang/foreachLoop.001.phpt
index d35f26116d..a7ec701fd1 100644
--- a/tests/lang/foreachLoop.001.phpt
+++ b/tests/lang/foreachLoop.001.phpt
@@ -1,64 +1,64 @@
---TEST--
-Foreach loop tests - basic loop with just value and key => value.
---FILE--
-<?php
-
-$a = array("a","b","c");
-
-foreach ($a as $v) {
- var_dump($v);
-}
-foreach ($a as $k => $v) {
- var_dump($k, $v);
-}
-//check key and value after the loop.
-var_dump($k, $v);
-
-echo "\n";
-//Dynamic array
-foreach (array("d","e","f") as $v) {
- var_dump($v);
-}
-foreach (array("d","e","f") as $k => $v) {
- var_dump($k, $v);
-}
-//check key and value after the loop.
-var_dump($k, $v);
-
-echo "\n";
-//Ensure counter is advanced during loop
-$a=array("a","b","c");
-foreach ($a as $v);
-var_dump(current($a));
-$a=array("a","b","c");
-foreach ($a as &$v);
-var_dump(current($a));
-
-?>
---EXPECT--
-string(1) "a"
-string(1) "b"
-string(1) "c"
-int(0)
-string(1) "a"
-int(1)
-string(1) "b"
-int(2)
-string(1) "c"
-int(2)
-string(1) "c"
-
-string(1) "d"
-string(1) "e"
-string(1) "f"
-int(0)
-string(1) "d"
-int(1)
-string(1) "e"
-int(2)
-string(1) "f"
-int(2)
-string(1) "f"
-
-string(1) "a"
+--TEST--
+Foreach loop tests - basic loop with just value and key => value.
+--FILE--
+<?php
+
+$a = array("a","b","c");
+
+foreach ($a as $v) {
+ var_dump($v);
+}
+foreach ($a as $k => $v) {
+ var_dump($k, $v);
+}
+//check key and value after the loop.
+var_dump($k, $v);
+
+echo "\n";
+//Dynamic array
+foreach (array("d","e","f") as $v) {
+ var_dump($v);
+}
+foreach (array("d","e","f") as $k => $v) {
+ var_dump($k, $v);
+}
+//check key and value after the loop.
+var_dump($k, $v);
+
+echo "\n";
+//Ensure counter is advanced during loop
+$a=array("a","b","c");
+foreach ($a as $v);
+var_dump(current($a));
+$a=array("a","b","c");
+foreach ($a as &$v);
+var_dump(current($a));
+
+?>
+--EXPECT--
+string(1) "a"
+string(1) "b"
+string(1) "c"
+int(0)
+string(1) "a"
+int(1)
+string(1) "b"
+int(2)
+string(1) "c"
+int(2)
+string(1) "c"
+
+string(1) "d"
+string(1) "e"
+string(1) "f"
+int(0)
+string(1) "d"
+int(1)
+string(1) "e"
+int(2)
+string(1) "f"
+int(2)
+string(1) "f"
+
+string(1) "a"
string(1) "a"
diff --git a/tests/lang/foreachLoop.002.phpt b/tests/lang/foreachLoop.002.phpt
index 5896124f40..31492953a4 100644
--- a/tests/lang/foreachLoop.002.phpt
+++ b/tests/lang/foreachLoop.002.phpt
@@ -1,173 +1,173 @@
---TEST--
-Foreach loop tests - modifying the array during the loop.
---FILE--
-<?php
-
-echo "\nDirectly changing array values.\n";
-$a = array("original.1","original.2","original.3");
-foreach ($a as $k=>$v) {
- $a[$k]="changed.$k";
- var_dump($v);
-}
-var_dump($a);
-
-echo "\nModifying the foreach \$value.\n";
-$a = array("original.1","original.2","original.3");
-foreach ($a as $k=>$v) {
- $v="changed.$k";
-}
-var_dump($a);
-
-
-echo "\nModifying the foreach &\$value.\n";
-$a = array("original.1","original.2","original.3");
-foreach ($a as $k=>&$v) {
- $v="changed.$k";
-}
-var_dump($a);
-
-echo "\nPushing elements onto an unreferenced array.\n";
-$a = array("original.1","original.2","original.3");
-$counter=0;
-foreach ($a as $v) {
- array_push($a, "new.$counter");
-
- //avoid infinite loop if test is failing
- if ($counter++>10) {
- echo "Loop detected\n";
- break;
- }
-}
-var_dump($a);
-
-echo "\nPushing elements onto an unreferenced array, using &\$value.\n";
-$a = array("original.1","original.2","original.3");
-$counter=0;
-foreach ($a as &$v) {
- array_push($a, "new.$counter");
-
- //avoid infinite loop if test is failing
- if ($counter++>10) {
- echo "Loop detected\n";
- break;
- }
-}
-var_dump($a);
-
-echo "\nPopping elements off an unreferenced array.\n";
-$a = array("original.1","original.2","original.3");
-foreach ($a as $v) {
- array_pop($a);
- var_dump($v);
-}
-var_dump($a);
-
-echo "\nPopping elements off an unreferenced array, using &\$value.\n";
-$a = array("original.1","original.2","original.3");
-foreach ($a as &$v) {
- array_pop($a);
- var_dump($v);
-}
-var_dump($a);
-
-?>
---EXPECT--
-
-Directly changing array values.
-string(10) "original.1"
-string(10) "original.2"
-string(10) "original.3"
-array(3) {
- [0]=>
- string(9) "changed.0"
- [1]=>
- string(9) "changed.1"
- [2]=>
- string(9) "changed.2"
-}
-
-Modifying the foreach $value.
-array(3) {
- [0]=>
- string(10) "original.1"
- [1]=>
- string(10) "original.2"
- [2]=>
- string(10) "original.3"
-}
-
-Modifying the foreach &$value.
-array(3) {
- [0]=>
- string(9) "changed.0"
- [1]=>
- string(9) "changed.1"
- [2]=>
- &string(9) "changed.2"
-}
-
-Pushing elements onto an unreferenced array.
-array(6) {
- [0]=>
- string(10) "original.1"
- [1]=>
- string(10) "original.2"
- [2]=>
- string(10) "original.3"
- [3]=>
- string(5) "new.0"
- [4]=>
- string(5) "new.1"
- [5]=>
- string(5) "new.2"
-}
-
-Pushing elements onto an unreferenced array, using &$value.
-Loop detected
-array(15) {
- [0]=>
- string(10) "original.1"
- [1]=>
- string(10) "original.2"
- [2]=>
- string(10) "original.3"
- [3]=>
- string(5) "new.0"
- [4]=>
- string(5) "new.1"
- [5]=>
- string(5) "new.2"
- [6]=>
- string(5) "new.3"
- [7]=>
- string(5) "new.4"
- [8]=>
- string(5) "new.5"
- [9]=>
- string(5) "new.6"
- [10]=>
- string(5) "new.7"
- [11]=>
- &string(5) "new.8"
- [12]=>
- string(5) "new.9"
- [13]=>
- string(6) "new.10"
- [14]=>
- string(6) "new.11"
-}
-
-Popping elements off an unreferenced array.
-string(10) "original.1"
-string(10) "original.2"
-string(10) "original.3"
-array(0) {
-}
-
-Popping elements off an unreferenced array, using &$value.
-string(10) "original.1"
-string(10) "original.2"
-array(1) {
- [0]=>
- string(10) "original.1"
+--TEST--
+Foreach loop tests - modifying the array during the loop.
+--FILE--
+<?php
+
+echo "\nDirectly changing array values.\n";
+$a = array("original.1","original.2","original.3");
+foreach ($a as $k=>$v) {
+ $a[$k]="changed.$k";
+ var_dump($v);
+}
+var_dump($a);
+
+echo "\nModifying the foreach \$value.\n";
+$a = array("original.1","original.2","original.3");
+foreach ($a as $k=>$v) {
+ $v="changed.$k";
+}
+var_dump($a);
+
+
+echo "\nModifying the foreach &\$value.\n";
+$a = array("original.1","original.2","original.3");
+foreach ($a as $k=>&$v) {
+ $v="changed.$k";
+}
+var_dump($a);
+
+echo "\nPushing elements onto an unreferenced array.\n";
+$a = array("original.1","original.2","original.3");
+$counter=0;
+foreach ($a as $v) {
+ array_push($a, "new.$counter");
+
+ //avoid infinite loop if test is failing
+ if ($counter++>10) {
+ echo "Loop detected\n";
+ break;
+ }
+}
+var_dump($a);
+
+echo "\nPushing elements onto an unreferenced array, using &\$value.\n";
+$a = array("original.1","original.2","original.3");
+$counter=0;
+foreach ($a as &$v) {
+ array_push($a, "new.$counter");
+
+ //avoid infinite loop if test is failing
+ if ($counter++>10) {
+ echo "Loop detected\n";
+ break;
+ }
+}
+var_dump($a);
+
+echo "\nPopping elements off an unreferenced array.\n";
+$a = array("original.1","original.2","original.3");
+foreach ($a as $v) {
+ array_pop($a);
+ var_dump($v);
+}
+var_dump($a);
+
+echo "\nPopping elements off an unreferenced array, using &\$value.\n";
+$a = array("original.1","original.2","original.3");
+foreach ($a as &$v) {
+ array_pop($a);
+ var_dump($v);
+}
+var_dump($a);
+
+?>
+--EXPECT--
+
+Directly changing array values.
+string(10) "original.1"
+string(10) "original.2"
+string(10) "original.3"
+array(3) {
+ [0]=>
+ string(9) "changed.0"
+ [1]=>
+ string(9) "changed.1"
+ [2]=>
+ string(9) "changed.2"
+}
+
+Modifying the foreach $value.
+array(3) {
+ [0]=>
+ string(10) "original.1"
+ [1]=>
+ string(10) "original.2"
+ [2]=>
+ string(10) "original.3"
+}
+
+Modifying the foreach &$value.
+array(3) {
+ [0]=>
+ string(9) "changed.0"
+ [1]=>
+ string(9) "changed.1"
+ [2]=>
+ &string(9) "changed.2"
+}
+
+Pushing elements onto an unreferenced array.
+array(6) {
+ [0]=>
+ string(10) "original.1"
+ [1]=>
+ string(10) "original.2"
+ [2]=>
+ string(10) "original.3"
+ [3]=>
+ string(5) "new.0"
+ [4]=>
+ string(5) "new.1"
+ [5]=>
+ string(5) "new.2"
+}
+
+Pushing elements onto an unreferenced array, using &$value.
+Loop detected
+array(15) {
+ [0]=>
+ string(10) "original.1"
+ [1]=>
+ string(10) "original.2"
+ [2]=>
+ string(10) "original.3"
+ [3]=>
+ string(5) "new.0"
+ [4]=>
+ string(5) "new.1"
+ [5]=>
+ string(5) "new.2"
+ [6]=>
+ string(5) "new.3"
+ [7]=>
+ string(5) "new.4"
+ [8]=>
+ string(5) "new.5"
+ [9]=>
+ string(5) "new.6"
+ [10]=>
+ string(5) "new.7"
+ [11]=>
+ &string(5) "new.8"
+ [12]=>
+ string(5) "new.9"
+ [13]=>
+ string(6) "new.10"
+ [14]=>
+ string(6) "new.11"
+}
+
+Popping elements off an unreferenced array.
+string(10) "original.1"
+string(10) "original.2"
+string(10) "original.3"
+array(0) {
+}
+
+Popping elements off an unreferenced array, using &$value.
+string(10) "original.1"
+string(10) "original.2"
+array(1) {
+ [0]=>
+ string(10) "original.1"
}
diff --git a/tests/lang/foreachLoop.003.phpt b/tests/lang/foreachLoop.003.phpt
index d554d0d87f..a62d5dbb3b 100644
--- a/tests/lang/foreachLoop.003.phpt
+++ b/tests/lang/foreachLoop.003.phpt
@@ -1,46 +1,46 @@
---TEST--
-Foreach loop tests - error case: not an array.
---FILE--
-<?php
-echo "\nNot an array.\n";
-$a = TRUE;
-foreach ($a as $v) {
- var_dump($v);
-}
-
-$a = null;
-foreach ($a as $v) {
- var_dump($v);
-}
-
-$a = 1;
-foreach ($a as $v) {
- var_dump($v);
-}
-
-$a = 1.5;
-foreach ($a as $v) {
- var_dump($v);
-}
-
-$a = "hello";
-foreach ($a as $v) {
- var_dump($v);
-}
-
-echo "done.\n";
-?>
---EXPECTF--
-
-Not an array.
-
-Warning: Invalid argument supplied for foreach() in %s on line 4
-
-Warning: Invalid argument supplied for foreach() in %s on line 9
-
-Warning: Invalid argument supplied for foreach() in %s on line 14
-
-Warning: Invalid argument supplied for foreach() in %s on line 19
-
-Warning: Invalid argument supplied for foreach() in %s on line 24
-done.
+--TEST--
+Foreach loop tests - error case: not an array.
+--FILE--
+<?php
+echo "\nNot an array.\n";
+$a = TRUE;
+foreach ($a as $v) {
+ var_dump($v);
+}
+
+$a = null;
+foreach ($a as $v) {
+ var_dump($v);
+}
+
+$a = 1;
+foreach ($a as $v) {
+ var_dump($v);
+}
+
+$a = 1.5;
+foreach ($a as $v) {
+ var_dump($v);
+}
+
+$a = "hello";
+foreach ($a as $v) {
+ var_dump($v);
+}
+
+echo "done.\n";
+?>
+--EXPECTF--
+
+Not an array.
+
+Warning: Invalid argument supplied for foreach() in %s on line 4
+
+Warning: Invalid argument supplied for foreach() in %s on line 9
+
+Warning: Invalid argument supplied for foreach() in %s on line 14
+
+Warning: Invalid argument supplied for foreach() in %s on line 19
+
+Warning: Invalid argument supplied for foreach() in %s on line 24
+done.
diff --git a/tests/lang/foreachLoop.004.phpt b/tests/lang/foreachLoop.004.phpt
index 178cad0981..3cc1960ca1 100644
--- a/tests/lang/foreachLoop.004.phpt
+++ b/tests/lang/foreachLoop.004.phpt
@@ -1,76 +1,76 @@
---TEST--
-Foreach loop tests - using an array element as the $value
---FILE--
-<?php
-
-$a=array("a", "b", "c");
-$v=array();
-foreach($a as $v[0]) {
- var_dump($v);
-}
-var_dump($a);
-var_dump($v);
-
-echo "\n";
-$a=array("a", "b", "c");
-$v=array();
-foreach($a as $k=>$v[0]) {
- var_dump($k, $v);
-}
-var_dump($a);
-var_dump($k, $v);
-?>
---EXPECT--
-array(1) {
- [0]=>
- string(1) "a"
-}
-array(1) {
- [0]=>
- string(1) "b"
-}
-array(1) {
- [0]=>
- string(1) "c"
-}
-array(3) {
- [0]=>
- string(1) "a"
- [1]=>
- string(1) "b"
- [2]=>
- string(1) "c"
-}
-array(1) {
- [0]=>
- string(1) "c"
-}
-
-int(0)
-array(1) {
- [0]=>
- string(1) "a"
-}
-int(1)
-array(1) {
- [0]=>
- string(1) "b"
-}
-int(2)
-array(1) {
- [0]=>
- string(1) "c"
-}
-array(3) {
- [0]=>
- string(1) "a"
- [1]=>
- string(1) "b"
- [2]=>
- string(1) "c"
-}
-int(2)
-array(1) {
- [0]=>
- string(1) "c"
+--TEST--
+Foreach loop tests - using an array element as the $value
+--FILE--
+<?php
+
+$a=array("a", "b", "c");
+$v=array();
+foreach($a as $v[0]) {
+ var_dump($v);
+}
+var_dump($a);
+var_dump($v);
+
+echo "\n";
+$a=array("a", "b", "c");
+$v=array();
+foreach($a as $k=>$v[0]) {
+ var_dump($k, $v);
+}
+var_dump($a);
+var_dump($k, $v);
+?>
+--EXPECT--
+array(1) {
+ [0]=>
+ string(1) "a"
+}
+array(1) {
+ [0]=>
+ string(1) "b"
+}
+array(1) {
+ [0]=>
+ string(1) "c"
+}
+array(3) {
+ [0]=>
+ string(1) "a"
+ [1]=>
+ string(1) "b"
+ [2]=>
+ string(1) "c"
+}
+array(1) {
+ [0]=>
+ string(1) "c"
+}
+
+int(0)
+array(1) {
+ [0]=>
+ string(1) "a"
+}
+int(1)
+array(1) {
+ [0]=>
+ string(1) "b"
+}
+int(2)
+array(1) {
+ [0]=>
+ string(1) "c"
+}
+array(3) {
+ [0]=>
+ string(1) "a"
+ [1]=>
+ string(1) "b"
+ [2]=>
+ string(1) "c"
+}
+int(2)
+array(1) {
+ [0]=>
+ string(1) "c"
}
diff --git a/tests/lang/foreachLoop.005.phpt b/tests/lang/foreachLoop.005.phpt
index ae6ed3aa28..c7e4ceb8e7 100644
--- a/tests/lang/foreachLoop.005.phpt
+++ b/tests/lang/foreachLoop.005.phpt
@@ -1,23 +1,23 @@
---TEST--
-Foreach loop tests - modifying the array during the loop: special case. Behaviour is good since php 5.2.2.
---FILE--
-<?php
-$a = array("original.0","original.1","original.2");
-foreach ($a as $k=>&$v){
- $a[$k] = "changed.$k";
- echo "After changing \$a directly, \$v@$k is: $v\n";
-}
-//--- Expected output:
-//After changing $a directly, $v@0 is: changed.0
-//After changing $a directly, $v@1 is: changed.1
-//After changing $a directly, $v@2 is: changed.2
-//--- Actual output from php.net before 5.2.2:
-//After changing $a directly, $v@0 is: changed.0
-//After changing $a directly, $v@1 is: original.1
-//After changing $a directly, $v@2 is: original.2
-
-?>
---EXPECT--
-After changing $a directly, $v@0 is: changed.0
-After changing $a directly, $v@1 is: changed.1
-After changing $a directly, $v@2 is: changed.2
+--TEST--
+Foreach loop tests - modifying the array during the loop: special case. Behaviour is good since php 5.2.2.
+--FILE--
+<?php
+$a = array("original.0","original.1","original.2");
+foreach ($a as $k=>&$v){
+ $a[$k] = "changed.$k";
+ echo "After changing \$a directly, \$v@$k is: $v\n";
+}
+//--- Expected output:
+//After changing $a directly, $v@0 is: changed.0
+//After changing $a directly, $v@1 is: changed.1
+//After changing $a directly, $v@2 is: changed.2
+//--- Actual output from php.net before 5.2.2:
+//After changing $a directly, $v@0 is: changed.0
+//After changing $a directly, $v@1 is: original.1
+//After changing $a directly, $v@2 is: original.2
+
+?>
+--EXPECT--
+After changing $a directly, $v@0 is: changed.0
+After changing $a directly, $v@1 is: changed.1
+After changing $a directly, $v@2 is: changed.2
diff --git a/tests/lang/foreachLoop.006.phpt b/tests/lang/foreachLoop.006.phpt
index d31ea64563..f7563dccd0 100644
--- a/tests/lang/foreachLoop.006.phpt
+++ b/tests/lang/foreachLoop.006.phpt
@@ -1,11 +1,11 @@
---TEST--
-Foreach loop tests - error case: key is a reference.
---FILE--
-<?php
-$a = array("a","b","c");
-foreach ($a as &$k=>$v) {
- var_dump($v);
-}
-?>
---EXPECTF--
+--TEST--
+Foreach loop tests - error case: key is a reference.
+--FILE--
+<?php
+$a = array("a","b","c");
+foreach ($a as &$k=>$v) {
+ var_dump($v);
+}
+?>
+--EXPECTF--
Fatal error: Key element cannot be a reference in %s on line 3
diff --git a/tests/lang/foreachLoop.009.phpt b/tests/lang/foreachLoop.009.phpt
index df51fd6be4..90aa33953b 100644
--- a/tests/lang/foreachLoop.009.phpt
+++ b/tests/lang/foreachLoop.009.phpt
@@ -1,78 +1,78 @@
---TEST--
-Foreach loop tests - foreach operates on the original array if the array is referenced outside the loop.
---FILE--
-<?php
-// From php.net/foreach:
-// "Unless the array is referenced, foreach operates on a copy of the specified array."
-
-echo "\nRemove elements from a referenced array during loop\n";
-$refedArray=array("original.0", "original.1", "original.2");
-$ref=&$refedArray;
-foreach ($refedArray as $k=>$v1) {
- array_pop($refedArray);
- echo "key: $k; value: $v1\n";
-}
-
-echo "\nRemove elements from a referenced array during loop, using &\$value\n";
-$refedArray=array("original.0", "original.1", "original.2");
-$ref=&$refedArray;
-foreach ($refedArray as $k=>&$v2) {
- array_pop($refedArray);
- echo "key: $k; value: $v2\n";
-}
-
-echo "\nAdd elements to a referenced array during loop\n";
-$refedArray=array("original.0", "original.1", "original.2");
-$ref=&$refedArray;
-$count=0;
-foreach ($refedArray as $k=>$v3) {
- array_push($refedArray, "new.$k");
- echo "key: $k; value: $v3\n";
-
- if ($count++>5) {
- echo "Loop detected, as expected.\n";
- break;
- }
-}
-
-echo "\nAdd elements to a referenced array during loop, using &\$value\n";
-$refedArray=array("original.0", "original.1", "original.2");
-$ref=&$refedArray;
-$count=0;
-foreach ($refedArray as $k=>&$v4) {
- array_push($refedArray, "new.$k");
- echo "key: $k; value: $v4\n";
-
- if ($count++>5) {
- echo "Loop detected, as expected.\n";
- break;
- }
-}
-
-?>
---EXPECT--
-
-Remove elements from a referenced array during loop
-key: 0; value: original.0
-key: 1; value: original.1
-key: 2; value: original.2
-
-Remove elements from a referenced array during loop, using &$value
-key: 0; value: original.0
-key: 1; value: original.1
-
-Add elements to a referenced array during loop
-key: 0; value: original.0
-key: 1; value: original.1
-key: 2; value: original.2
-
-Add elements to a referenced array during loop, using &$value
-key: 0; value: original.0
-key: 1; value: original.1
-key: 2; value: original.2
-key: 3; value: new.0
-key: 4; value: new.1
-key: 5; value: new.2
-key: 6; value: new.3
-Loop detected, as expected.
-
+--TEST--
+Foreach loop tests - foreach operates on the original array if the array is referenced outside the loop.
+--FILE--
+<?php
+// From php.net/foreach:
+// "Unless the array is referenced, foreach operates on a copy of the specified array."
+
+echo "\nRemove elements from a referenced array during loop\n";
+$refedArray=array("original.0", "original.1", "original.2");
+$ref=&$refedArray;
+foreach ($refedArray as $k=>$v1) {
+ array_pop($refedArray);
+ echo "key: $k; value: $v1\n";
+}
+
+echo "\nRemove elements from a referenced array during loop, using &\$value\n";
+$refedArray=array("original.0", "original.1", "original.2");
+$ref=&$refedArray;
+foreach ($refedArray as $k=>&$v2) {
+ array_pop($refedArray);
+ echo "key: $k; value: $v2\n";
+}
+
+echo "\nAdd elements to a referenced array during loop\n";
+$refedArray=array("original.0", "original.1", "original.2");
+$ref=&$refedArray;
+$count=0;
+foreach ($refedArray as $k=>$v3) {
+ array_push($refedArray, "new.$k");
+ echo "key: $k; value: $v3\n";
+
+ if ($count++>5) {
+ echo "Loop detected, as expected.\n";
+ break;
+ }
+}
+
+echo "\nAdd elements to a referenced array during loop, using &\$value\n";
+$refedArray=array("original.0", "original.1", "original.2");
+$ref=&$refedArray;
+$count=0;
+foreach ($refedArray as $k=>&$v4) {
+ array_push($refedArray, "new.$k");
+ echo "key: $k; value: $v4\n";
+
+ if ($count++>5) {
+ echo "Loop detected, as expected.\n";
+ break;
+ }
+}
+
+?>
+--EXPECT--
+
+Remove elements from a referenced array during loop
+key: 0; value: original.0
+key: 1; value: original.1
+key: 2; value: original.2
+
+Remove elements from a referenced array during loop, using &$value
+key: 0; value: original.0
+key: 1; value: original.1
+
+Add elements to a referenced array during loop
+key: 0; value: original.0
+key: 1; value: original.1
+key: 2; value: original.2
+
+Add elements to a referenced array during loop, using &$value
+key: 0; value: original.0
+key: 1; value: original.1
+key: 2; value: original.2
+key: 3; value: new.0
+key: 4; value: new.1
+key: 5; value: new.2
+key: 6; value: new.3
+Loop detected, as expected.
+
diff --git a/tests/lang/foreachLoop.010.phpt b/tests/lang/foreachLoop.010.phpt
index 31f6e8cc49..c021a80c39 100644
--- a/tests/lang/foreachLoop.010.phpt
+++ b/tests/lang/foreachLoop.010.phpt
@@ -1,40 +1,40 @@
---TEST--
-This test illustrates the impact of invoking destructors when refcount is decremented to 0 on foreach.
-It will pass only if the 'contentious code' in PHPValue.decReferences() is enabled.
---FILE--
-<?php
-
-$a = array(1,2,3);
-$container = array(&$a);
-
-// From php.net:
-// "Unless the array is referenced, foreach operates on a copy of
-// the specified array and not the array itself."
-// At this point, the array $a is referenced.
-
-// The following line ensures $a is no longer references as a consequence
-// of running the 'destructor' on $container.
-$container = null;
-
-// At this point the array $a is no longer referenced, so foreach should operate on a copy of the array.
-// However, P8 does not invoke 'destructors' when refcount is decremented to 0.
-// Consequently, $a thinks it is still referenced, and foreach will operate on the array itself.
-// This provokes a difference in behaviour when changing the number of elements in the array while
-// iterating over it.
-
-$i=0;
-foreach ($a as $v) {
- array_push($a, 'new');
- var_dump($v);
-
- if (++$i>10) {
- echo "Infinite loop detected\n";
- break;
- }
-}
-
-?>
---EXPECTF--
-int(1)
-int(2)
+--TEST--
+This test illustrates the impact of invoking destructors when refcount is decremented to 0 on foreach.
+It will pass only if the 'contentious code' in PHPValue.decReferences() is enabled.
+--FILE--
+<?php
+
+$a = array(1,2,3);
+$container = array(&$a);
+
+// From php.net:
+// "Unless the array is referenced, foreach operates on a copy of
+// the specified array and not the array itself."
+// At this point, the array $a is referenced.
+
+// The following line ensures $a is no longer references as a consequence
+// of running the 'destructor' on $container.
+$container = null;
+
+// At this point the array $a is no longer referenced, so foreach should operate on a copy of the array.
+// However, P8 does not invoke 'destructors' when refcount is decremented to 0.
+// Consequently, $a thinks it is still referenced, and foreach will operate on the array itself.
+// This provokes a difference in behaviour when changing the number of elements in the array while
+// iterating over it.
+
+$i=0;
+foreach ($a as $v) {
+ array_push($a, 'new');
+ var_dump($v);
+
+ if (++$i>10) {
+ echo "Infinite loop detected\n";
+ break;
+ }
+}
+
+?>
+--EXPECTF--
+int(1)
+int(2)
int(3)
diff --git a/tests/lang/foreachLoop.011.phpt b/tests/lang/foreachLoop.011.phpt
index 8527a8833e..6ceebd8a50 100644
--- a/tests/lang/foreachLoop.011.phpt
+++ b/tests/lang/foreachLoop.011.phpt
@@ -1,33 +1,33 @@
---TEST--
-Changing from an interable type to a non iterable type during the iteration
---FILE--
-<?php
-echo "\nChange from array to non iterable:\n";
-$a = array(1,2,3);
-$b=&$a;
-foreach ($a as $v) {
- var_dump($v);
- $b=1;
-}
-
-echo "\nChange from object to non iterable:\n";
-$a = new stdClass;
-$a->a=1;
-$a->b=2;
-$b=&$a;
-foreach ($a as $v) {
- var_dump($v);
- $b='x';
-}
-
-?>
---EXPECTF--
-
-Change from array to non iterable:
-int(1)
-int(2)
-int(3)
-
-Change from object to non iterable:
-int(1)
-int(2)
+--TEST--
+Changing from an interable type to a non iterable type during the iteration
+--FILE--
+<?php
+echo "\nChange from array to non iterable:\n";
+$a = array(1,2,3);
+$b=&$a;
+foreach ($a as $v) {
+ var_dump($v);
+ $b=1;
+}
+
+echo "\nChange from object to non iterable:\n";
+$a = new stdClass;
+$a->a=1;
+$a->b=2;
+$b=&$a;
+foreach ($a as $v) {
+ var_dump($v);
+ $b='x';
+}
+
+?>
+--EXPECTF--
+
+Change from array to non iterable:
+int(1)
+int(2)
+int(3)
+
+Change from object to non iterable:
+int(1)
+int(2)
diff --git a/tests/lang/foreachLoop.012.phpt b/tests/lang/foreachLoop.012.phpt
index 1165b74a58..3652a71aed 100644
--- a/tests/lang/foreachLoop.012.phpt
+++ b/tests/lang/foreachLoop.012.phpt
@@ -1,494 +1,494 @@
---TEST--
-Directly modifying an unreferenced array when foreach'ing over it.
---FILE--
-<?php
-
-define('MAX_LOOPS',5);
-
-function withRefValue($elements, $transform) {
- echo "\n---( Array with $elements element(s): )---\n";
- //Build array:
- for ($i=0; $i<$elements; $i++) {
- $a[] = "v.$i";
- }
- $counter=0;
-
- echo "--> State of array before loop:\n";
- var_dump($a);
-
- echo "--> Do loop:\n";
- foreach ($a as $k=>$v) {
- echo " iteration $counter: \$k=$k; \$v=$v\n";
- eval($transform);
- $counter++;
- if ($counter>MAX_LOOPS) {
- echo " ** Stuck in a loop! **\n";
- break;
- }
- }
-
- echo "--> State of array after loop:\n";
- var_dump($a);
-}
-
-
-echo "\nPopping elements off end of an unreferenced array";
-$transform = 'array_pop($a);';
-withRefValue(1, $transform);
-withRefValue(2, $transform);
-withRefValue(3, $transform);
-withRefValue(4, $transform);
-
-echo "\n\n\nShift elements off start of an unreferenced array";
-$transform = 'array_shift($a);';
-withRefValue(1, $transform);
-withRefValue(2, $transform);
-withRefValue(3, $transform);
-withRefValue(4, $transform);
-
-echo "\n\n\nRemove current element of an unreferenced array";
-$transform = 'unset($a[$k]);';
-withRefValue(1, $transform);
-withRefValue(2, $transform);
-withRefValue(3, $transform);
-withRefValue(4, $transform);
-
-echo "\n\n\nAdding elements to the end of an unreferenced array";
-$transform = 'array_push($a, "new.$counter");';
-withRefValue(1, $transform);
-withRefValue(2, $transform);
-withRefValue(3, $transform);
-withRefValue(4, $transform);
-
-echo "\n\n\nAdding elements to the start of an unreferenced array";
-$transform = 'array_unshift($a, "new.$counter");';
-withRefValue(1, $transform);
-withRefValue(2, $transform);
-withRefValue(3, $transform);
-withRefValue(4, $transform);
-
-?>
---EXPECTF--
-
-Popping elements off end of an unreferenced array
----( Array with 1 element(s): )---
---> State of array before loop:
-array(1) {
- [0]=>
- string(3) "v.0"
-}
---> Do loop:
- iteration 0: $k=0; $v=v.0
---> State of array after loop:
-array(0) {
-}
-
----( Array with 2 element(s): )---
---> State of array before loop:
-array(2) {
- [0]=>
- string(3) "v.0"
- [1]=>
- string(3) "v.1"
-}
---> Do loop:
- iteration 0: $k=0; $v=v.0
- iteration 1: $k=1; $v=v.1
---> State of array after loop:
-array(0) {
-}
-
----( Array with 3 element(s): )---
---> State of array before loop:
-array(3) {
- [0]=>
- string(3) "v.0"
- [1]=>
- string(3) "v.1"
- [2]=>
- string(3) "v.2"
-}
---> Do loop:
- iteration 0: $k=0; $v=v.0
- iteration 1: $k=1; $v=v.1
- iteration 2: $k=2; $v=v.2
---> State of array after loop:
-array(0) {
-}
-
----( Array with 4 element(s): )---
---> State of array before loop:
-array(4) {
- [0]=>
- string(3) "v.0"
- [1]=>
- string(3) "v.1"
- [2]=>
- string(3) "v.2"
- [3]=>
- string(3) "v.3"
-}
---> Do loop:
- iteration 0: $k=0; $v=v.0
- iteration 1: $k=1; $v=v.1
- iteration 2: $k=2; $v=v.2
- iteration 3: $k=3; $v=v.3
---> State of array after loop:
-array(0) {
-}
-
-
-
-Shift elements off start of an unreferenced array
----( Array with 1 element(s): )---
---> State of array before loop:
-array(1) {
- [0]=>
- string(3) "v.0"
-}
---> Do loop:
- iteration 0: $k=0; $v=v.0
---> State of array after loop:
-array(0) {
-}
-
----( Array with 2 element(s): )---
---> State of array before loop:
-array(2) {
- [0]=>
- string(3) "v.0"
- [1]=>
- string(3) "v.1"
-}
---> Do loop:
- iteration 0: $k=0; $v=v.0
- iteration 1: $k=1; $v=v.1
---> State of array after loop:
-array(0) {
-}
-
----( Array with 3 element(s): )---
---> State of array before loop:
-array(3) {
- [0]=>
- string(3) "v.0"
- [1]=>
- string(3) "v.1"
- [2]=>
- string(3) "v.2"
-}
---> Do loop:
- iteration 0: $k=0; $v=v.0
- iteration 1: $k=1; $v=v.1
- iteration 2: $k=2; $v=v.2
---> State of array after loop:
-array(0) {
-}
-
----( Array with 4 element(s): )---
---> State of array before loop:
-array(4) {
- [0]=>
- string(3) "v.0"
- [1]=>
- string(3) "v.1"
- [2]=>
- string(3) "v.2"
- [3]=>
- string(3) "v.3"
-}
---> Do loop:
- iteration 0: $k=0; $v=v.0
- iteration 1: $k=1; $v=v.1
- iteration 2: $k=2; $v=v.2
- iteration 3: $k=3; $v=v.3
---> State of array after loop:
-array(0) {
-}
-
-
-
-Remove current element of an unreferenced array
----( Array with 1 element(s): )---
---> State of array before loop:
-array(1) {
- [0]=>
- string(3) "v.0"
-}
---> Do loop:
- iteration 0: $k=0; $v=v.0
---> State of array after loop:
-array(0) {
-}
-
----( Array with 2 element(s): )---
---> State of array before loop:
-array(2) {
- [0]=>
- string(3) "v.0"
- [1]=>
- string(3) "v.1"
-}
---> Do loop:
- iteration 0: $k=0; $v=v.0
- iteration 1: $k=1; $v=v.1
---> State of array after loop:
-array(0) {
-}
-
----( Array with 3 element(s): )---
---> State of array before loop:
-array(3) {
- [0]=>
- string(3) "v.0"
- [1]=>
- string(3) "v.1"
- [2]=>
- string(3) "v.2"
-}
---> Do loop:
- iteration 0: $k=0; $v=v.0
- iteration 1: $k=1; $v=v.1
- iteration 2: $k=2; $v=v.2
---> State of array after loop:
-array(0) {
-}
-
----( Array with 4 element(s): )---
---> State of array before loop:
-array(4) {
- [0]=>
- string(3) "v.0"
- [1]=>
- string(3) "v.1"
- [2]=>
- string(3) "v.2"
- [3]=>
- string(3) "v.3"
-}
---> Do loop:
- iteration 0: $k=0; $v=v.0
- iteration 1: $k=1; $v=v.1
- iteration 2: $k=2; $v=v.2
- iteration 3: $k=3; $v=v.3
---> State of array after loop:
-array(0) {
-}
-
-
-
-Adding elements to the end of an unreferenced array
----( Array with 1 element(s): )---
---> State of array before loop:
-array(1) {
- [0]=>
- string(3) "v.0"
-}
---> Do loop:
- iteration 0: $k=0; $v=v.0
---> State of array after loop:
-array(2) {
- [0]=>
- string(3) "v.0"
- [1]=>
- string(5) "new.0"
-}
-
----( Array with 2 element(s): )---
---> State of array before loop:
-array(2) {
- [0]=>
- string(3) "v.0"
- [1]=>
- string(3) "v.1"
-}
---> Do loop:
- iteration 0: $k=0; $v=v.0
- iteration 1: $k=1; $v=v.1
---> State of array after loop:
-array(4) {
- [0]=>
- string(3) "v.0"
- [1]=>
- string(3) "v.1"
- [2]=>
- string(5) "new.0"
- [3]=>
- string(5) "new.1"
-}
-
----( Array with 3 element(s): )---
---> State of array before loop:
-array(3) {
- [0]=>
- string(3) "v.0"
- [1]=>
- string(3) "v.1"
- [2]=>
- string(3) "v.2"
-}
---> Do loop:
- iteration 0: $k=0; $v=v.0
- iteration 1: $k=1; $v=v.1
- iteration 2: $k=2; $v=v.2
---> State of array after loop:
-array(6) {
- [0]=>
- string(3) "v.0"
- [1]=>
- string(3) "v.1"
- [2]=>
- string(3) "v.2"
- [3]=>
- string(5) "new.0"
- [4]=>
- string(5) "new.1"
- [5]=>
- string(5) "new.2"
-}
-
----( Array with 4 element(s): )---
---> State of array before loop:
-array(4) {
- [0]=>
- string(3) "v.0"
- [1]=>
- string(3) "v.1"
- [2]=>
- string(3) "v.2"
- [3]=>
- string(3) "v.3"
-}
---> Do loop:
- iteration 0: $k=0; $v=v.0
- iteration 1: $k=1; $v=v.1
- iteration 2: $k=2; $v=v.2
- iteration 3: $k=3; $v=v.3
---> State of array after loop:
-array(8) {
- [0]=>
- string(3) "v.0"
- [1]=>
- string(3) "v.1"
- [2]=>
- string(3) "v.2"
- [3]=>
- string(3) "v.3"
- [4]=>
- string(5) "new.0"
- [5]=>
- string(5) "new.1"
- [6]=>
- string(5) "new.2"
- [7]=>
- string(5) "new.3"
-}
-
-
-
-Adding elements to the start of an unreferenced array
----( Array with 1 element(s): )---
---> State of array before loop:
-array(1) {
- [0]=>
- string(3) "v.0"
-}
---> Do loop:
- iteration 0: $k=0; $v=v.0
---> State of array after loop:
-array(2) {
- [0]=>
- string(5) "new.0"
- [1]=>
- string(3) "v.0"
-}
-
----( Array with 2 element(s): )---
---> State of array before loop:
-array(2) {
- [0]=>
- string(3) "v.0"
- [1]=>
- string(3) "v.1"
-}
---> Do loop:
- iteration 0: $k=0; $v=v.0
- iteration 1: $k=1; $v=v.1
---> State of array after loop:
-array(4) {
- [0]=>
- string(5) "new.1"
- [1]=>
- string(5) "new.0"
- [2]=>
- string(3) "v.0"
- [3]=>
- string(3) "v.1"
-}
-
----( Array with 3 element(s): )---
---> State of array before loop:
-array(3) {
- [0]=>
- string(3) "v.0"
- [1]=>
- string(3) "v.1"
- [2]=>
- string(3) "v.2"
-}
---> Do loop:
- iteration 0: $k=0; $v=v.0
- iteration 1: $k=1; $v=v.1
- iteration 2: $k=2; $v=v.2
---> State of array after loop:
-array(6) {
- [0]=>
- string(5) "new.2"
- [1]=>
- string(5) "new.1"
- [2]=>
- string(5) "new.0"
- [3]=>
- string(3) "v.0"
- [4]=>
- string(3) "v.1"
- [5]=>
- string(3) "v.2"
-}
-
----( Array with 4 element(s): )---
---> State of array before loop:
-array(4) {
- [0]=>
- string(3) "v.0"
- [1]=>
- string(3) "v.1"
- [2]=>
- string(3) "v.2"
- [3]=>
- string(3) "v.3"
-}
---> Do loop:
- iteration 0: $k=0; $v=v.0
- iteration 1: $k=1; $v=v.1
- iteration 2: $k=2; $v=v.2
- iteration 3: $k=3; $v=v.3
---> State of array after loop:
-array(8) {
- [0]=>
- string(5) "new.3"
- [1]=>
- string(5) "new.2"
- [2]=>
- string(5) "new.1"
- [3]=>
- string(5) "new.0"
- [4]=>
- string(3) "v.0"
- [5]=>
- string(3) "v.1"
- [6]=>
- string(3) "v.2"
- [7]=>
- string(3) "v.3"
-}
+--TEST--
+Directly modifying an unreferenced array when foreach'ing over it.
+--FILE--
+<?php
+
+define('MAX_LOOPS',5);
+
+function withRefValue($elements, $transform) {
+ echo "\n---( Array with $elements element(s): )---\n";
+ //Build array:
+ for ($i=0; $i<$elements; $i++) {
+ $a[] = "v.$i";
+ }
+ $counter=0;
+
+ echo "--> State of array before loop:\n";
+ var_dump($a);
+
+ echo "--> Do loop:\n";
+ foreach ($a as $k=>$v) {
+ echo " iteration $counter: \$k=$k; \$v=$v\n";
+ eval($transform);
+ $counter++;
+ if ($counter>MAX_LOOPS) {
+ echo " ** Stuck in a loop! **\n";
+ break;
+ }
+ }
+
+ echo "--> State of array after loop:\n";
+ var_dump($a);
+}
+
+
+echo "\nPopping elements off end of an unreferenced array";
+$transform = 'array_pop($a);';
+withRefValue(1, $transform);
+withRefValue(2, $transform);
+withRefValue(3, $transform);
+withRefValue(4, $transform);
+
+echo "\n\n\nShift elements off start of an unreferenced array";
+$transform = 'array_shift($a);';
+withRefValue(1, $transform);
+withRefValue(2, $transform);
+withRefValue(3, $transform);
+withRefValue(4, $transform);
+
+echo "\n\n\nRemove current element of an unreferenced array";
+$transform = 'unset($a[$k]);';
+withRefValue(1, $transform);
+withRefValue(2, $transform);
+withRefValue(3, $transform);
+withRefValue(4, $transform);
+
+echo "\n\n\nAdding elements to the end of an unreferenced array";
+$transform = 'array_push($a, "new.$counter");';
+withRefValue(1, $transform);
+withRefValue(2, $transform);
+withRefValue(3, $transform);
+withRefValue(4, $transform);
+
+echo "\n\n\nAdding elements to the start of an unreferenced array";
+$transform = 'array_unshift($a, "new.$counter");';
+withRefValue(1, $transform);
+withRefValue(2, $transform);
+withRefValue(3, $transform);
+withRefValue(4, $transform);
+
+?>
+--EXPECTF--
+
+Popping elements off end of an unreferenced array
+---( Array with 1 element(s): )---
+--> State of array before loop:
+array(1) {
+ [0]=>
+ string(3) "v.0"
+}
+--> Do loop:
+ iteration 0: $k=0; $v=v.0
+--> State of array after loop:
+array(0) {
+}
+
+---( Array with 2 element(s): )---
+--> State of array before loop:
+array(2) {
+ [0]=>
+ string(3) "v.0"
+ [1]=>
+ string(3) "v.1"
+}
+--> Do loop:
+ iteration 0: $k=0; $v=v.0
+ iteration 1: $k=1; $v=v.1
+--> State of array after loop:
+array(0) {
+}
+
+---( Array with 3 element(s): )---
+--> State of array before loop:
+array(3) {
+ [0]=>
+ string(3) "v.0"
+ [1]=>
+ string(3) "v.1"
+ [2]=>
+ string(3) "v.2"
+}
+--> Do loop:
+ iteration 0: $k=0; $v=v.0
+ iteration 1: $k=1; $v=v.1
+ iteration 2: $k=2; $v=v.2
+--> State of array after loop:
+array(0) {
+}
+
+---( Array with 4 element(s): )---
+--> State of array before loop:
+array(4) {
+ [0]=>
+ string(3) "v.0"
+ [1]=>
+ string(3) "v.1"
+ [2]=>
+ string(3) "v.2"
+ [3]=>
+ string(3) "v.3"
+}
+--> Do loop:
+ iteration 0: $k=0; $v=v.0
+ iteration 1: $k=1; $v=v.1
+ iteration 2: $k=2; $v=v.2
+ iteration 3: $k=3; $v=v.3
+--> State of array after loop:
+array(0) {
+}
+
+
+
+Shift elements off start of an unreferenced array
+---( Array with 1 element(s): )---
+--> State of array before loop:
+array(1) {
+ [0]=>
+ string(3) "v.0"
+}
+--> Do loop:
+ iteration 0: $k=0; $v=v.0
+--> State of array after loop:
+array(0) {
+}
+
+---( Array with 2 element(s): )---
+--> State of array before loop:
+array(2) {
+ [0]=>
+ string(3) "v.0"
+ [1]=>
+ string(3) "v.1"
+}
+--> Do loop:
+ iteration 0: $k=0; $v=v.0
+ iteration 1: $k=1; $v=v.1
+--> State of array after loop:
+array(0) {
+}
+
+---( Array with 3 element(s): )---
+--> State of array before loop:
+array(3) {
+ [0]=>
+ string(3) "v.0"
+ [1]=>
+ string(3) "v.1"
+ [2]=>
+ string(3) "v.2"
+}
+--> Do loop:
+ iteration 0: $k=0; $v=v.0
+ iteration 1: $k=1; $v=v.1
+ iteration 2: $k=2; $v=v.2
+--> State of array after loop:
+array(0) {
+}
+
+---( Array with 4 element(s): )---
+--> State of array before loop:
+array(4) {
+ [0]=>
+ string(3) "v.0"
+ [1]=>
+ string(3) "v.1"
+ [2]=>
+ string(3) "v.2"
+ [3]=>
+ string(3) "v.3"
+}
+--> Do loop:
+ iteration 0: $k=0; $v=v.0
+ iteration 1: $k=1; $v=v.1
+ iteration 2: $k=2; $v=v.2
+ iteration 3: $k=3; $v=v.3
+--> State of array after loop:
+array(0) {
+}
+
+
+
+Remove current element of an unreferenced array
+---( Array with 1 element(s): )---
+--> State of array before loop:
+array(1) {
+ [0]=>
+ string(3) "v.0"
+}
+--> Do loop:
+ iteration 0: $k=0; $v=v.0
+--> State of array after loop:
+array(0) {
+}
+
+---( Array with 2 element(s): )---
+--> State of array before loop:
+array(2) {
+ [0]=>
+ string(3) "v.0"
+ [1]=>
+ string(3) "v.1"
+}
+--> Do loop:
+ iteration 0: $k=0; $v=v.0
+ iteration 1: $k=1; $v=v.1
+--> State of array after loop:
+array(0) {
+}
+
+---( Array with 3 element(s): )---
+--> State of array before loop:
+array(3) {
+ [0]=>
+ string(3) "v.0"
+ [1]=>
+ string(3) "v.1"
+ [2]=>
+ string(3) "v.2"
+}
+--> Do loop:
+ iteration 0: $k=0; $v=v.0
+ iteration 1: $k=1; $v=v.1
+ iteration 2: $k=2; $v=v.2
+--> State of array after loop:
+array(0) {
+}
+
+---( Array with 4 element(s): )---
+--> State of array before loop:
+array(4) {
+ [0]=>
+ string(3) "v.0"
+ [1]=>
+ string(3) "v.1"
+ [2]=>
+ string(3) "v.2"
+ [3]=>
+ string(3) "v.3"
+}
+--> Do loop:
+ iteration 0: $k=0; $v=v.0
+ iteration 1: $k=1; $v=v.1
+ iteration 2: $k=2; $v=v.2
+ iteration 3: $k=3; $v=v.3
+--> State of array after loop:
+array(0) {
+}
+
+
+
+Adding elements to the end of an unreferenced array
+---( Array with 1 element(s): )---
+--> State of array before loop:
+array(1) {
+ [0]=>
+ string(3) "v.0"
+}
+--> Do loop:
+ iteration 0: $k=0; $v=v.0
+--> State of array after loop:
+array(2) {
+ [0]=>
+ string(3) "v.0"
+ [1]=>
+ string(5) "new.0"
+}
+
+---( Array with 2 element(s): )---
+--> State of array before loop:
+array(2) {
+ [0]=>
+ string(3) "v.0"
+ [1]=>
+ string(3) "v.1"
+}
+--> Do loop:
+ iteration 0: $k=0; $v=v.0
+ iteration 1: $k=1; $v=v.1
+--> State of array after loop:
+array(4) {
+ [0]=>
+ string(3) "v.0"
+ [1]=>
+ string(3) "v.1"
+ [2]=>
+ string(5) "new.0"
+ [3]=>
+ string(5) "new.1"
+}
+
+---( Array with 3 element(s): )---
+--> State of array before loop:
+array(3) {
+ [0]=>
+ string(3) "v.0"
+ [1]=>
+ string(3) "v.1"
+ [2]=>
+ string(3) "v.2"
+}
+--> Do loop:
+ iteration 0: $k=0; $v=v.0
+ iteration 1: $k=1; $v=v.1
+ iteration 2: $k=2; $v=v.2
+--> State of array after loop:
+array(6) {
+ [0]=>
+ string(3) "v.0"
+ [1]=>
+ string(3) "v.1"
+ [2]=>
+ string(3) "v.2"
+ [3]=>
+ string(5) "new.0"
+ [4]=>
+ string(5) "new.1"
+ [5]=>
+ string(5) "new.2"
+}
+
+---( Array with 4 element(s): )---
+--> State of array before loop:
+array(4) {
+ [0]=>
+ string(3) "v.0"
+ [1]=>
+ string(3) "v.1"
+ [2]=>
+ string(3) "v.2"
+ [3]=>
+ string(3) "v.3"
+}
+--> Do loop:
+ iteration 0: $k=0; $v=v.0
+ iteration 1: $k=1; $v=v.1
+ iteration 2: $k=2; $v=v.2
+ iteration 3: $k=3; $v=v.3
+--> State of array after loop:
+array(8) {
+ [0]=>
+ string(3) "v.0"
+ [1]=>
+ string(3) "v.1"
+ [2]=>
+ string(3) "v.2"
+ [3]=>
+ string(3) "v.3"
+ [4]=>
+ string(5) "new.0"
+ [5]=>
+ string(5) "new.1"
+ [6]=>
+ string(5) "new.2"
+ [7]=>
+ string(5) "new.3"
+}
+
+
+
+Adding elements to the start of an unreferenced array
+---( Array with 1 element(s): )---
+--> State of array before loop:
+array(1) {
+ [0]=>
+ string(3) "v.0"
+}
+--> Do loop:
+ iteration 0: $k=0; $v=v.0
+--> State of array after loop:
+array(2) {
+ [0]=>
+ string(5) "new.0"
+ [1]=>
+ string(3) "v.0"
+}
+
+---( Array with 2 element(s): )---
+--> State of array before loop:
+array(2) {
+ [0]=>
+ string(3) "v.0"
+ [1]=>
+ string(3) "v.1"
+}
+--> Do loop:
+ iteration 0: $k=0; $v=v.0
+ iteration 1: $k=1; $v=v.1
+--> State of array after loop:
+array(4) {
+ [0]=>
+ string(5) "new.1"
+ [1]=>
+ string(5) "new.0"
+ [2]=>
+ string(3) "v.0"
+ [3]=>
+ string(3) "v.1"
+}
+
+---( Array with 3 element(s): )---
+--> State of array before loop:
+array(3) {
+ [0]=>
+ string(3) "v.0"
+ [1]=>
+ string(3) "v.1"
+ [2]=>
+ string(3) "v.2"
+}
+--> Do loop:
+ iteration 0: $k=0; $v=v.0
+ iteration 1: $k=1; $v=v.1
+ iteration 2: $k=2; $v=v.2
+--> State of array after loop:
+array(6) {
+ [0]=>
+ string(5) "new.2"
+ [1]=>
+ string(5) "new.1"
+ [2]=>
+ string(5) "new.0"
+ [3]=>
+ string(3) "v.0"
+ [4]=>
+ string(3) "v.1"
+ [5]=>
+ string(3) "v.2"
+}
+
+---( Array with 4 element(s): )---
+--> State of array before loop:
+array(4) {
+ [0]=>
+ string(3) "v.0"
+ [1]=>
+ string(3) "v.1"
+ [2]=>
+ string(3) "v.2"
+ [3]=>
+ string(3) "v.3"
+}
+--> Do loop:
+ iteration 0: $k=0; $v=v.0
+ iteration 1: $k=1; $v=v.1
+ iteration 2: $k=2; $v=v.2
+ iteration 3: $k=3; $v=v.3
+--> State of array after loop:
+array(8) {
+ [0]=>
+ string(5) "new.3"
+ [1]=>
+ string(5) "new.2"
+ [2]=>
+ string(5) "new.1"
+ [3]=>
+ string(5) "new.0"
+ [4]=>
+ string(3) "v.0"
+ [5]=>
+ string(3) "v.1"
+ [6]=>
+ string(3) "v.2"
+ [7]=>
+ string(3) "v.3"
+}
diff --git a/tests/lang/foreachLoop.013.phpt b/tests/lang/foreachLoop.013.phpt
index ea728156f0..ba1bc89628 100644
--- a/tests/lang/foreachLoop.013.phpt
+++ b/tests/lang/foreachLoop.013.phpt
@@ -1,535 +1,535 @@
---TEST--
-Directly modifying an unreferenced array when foreach'ing over it while using &$value syntax.
---FILE--
-<?php
-
-define('MAX_LOOPS',5);
-
-function withRefValue($elements, $transform) {
- echo "\n---( Array with $elements element(s): )---\n";
- //Build array:
- for ($i=0; $i<$elements; $i++) {
- $a[] = "v.$i";
- }
- $counter=0;
-
- echo "--> State of array before loop:\n";
- var_dump($a);
-
- echo "--> Do loop:\n";
- foreach ($a as $k=>&$v) {
- echo " iteration $counter: \$k=$k; \$v=$v\n";
- eval($transform);
- $counter++;
- if ($counter>MAX_LOOPS) {
- echo " ** Stuck in a loop! **\n";
- break;
- }
- }
-
- echo "--> State of array after loop:\n";
- var_dump($a);
-}
-
-
-echo "\nPopping elements off end of an unreferenced array, using &\$value.";
-$transform = 'array_pop($a);';
-withRefValue(1, $transform);
-withRefValue(2, $transform);
-withRefValue(3, $transform);
-withRefValue(4, $transform);
-
-echo "\n\n\nShift elements off start of an unreferenced array, using &\$value.";
-$transform = 'array_shift($a);';
-withRefValue(1, $transform);
-withRefValue(2, $transform);
-withRefValue(3, $transform);
-withRefValue(4, $transform);
-
-echo "\n\n\nRemove current element of an unreferenced array, using &\$value.";
-$transform = 'unset($a[$k]);';
-withRefValue(1, $transform);
-withRefValue(2, $transform);
-withRefValue(3, $transform);
-withRefValue(4, $transform);
-
-echo "\n\n\nAdding elements to the end of an unreferenced array, using &\$value.";
-$transform = 'array_push($a, "new.$counter");';
-withRefValue(1, $transform);
-withRefValue(2, $transform);
-withRefValue(3, $transform);
-withRefValue(4, $transform);
-
-echo "\n\n\nAdding elements to the start of an unreferenced array, using &\$value.";
-$transform = 'array_unshift($a, "new.$counter");';
-withRefValue(1, $transform);
-withRefValue(2, $transform);
-withRefValue(3, $transform);
-withRefValue(4, $transform);
-
-?>
---EXPECT--
-
-Popping elements off end of an unreferenced array, using &$value.
----( Array with 1 element(s): )---
---> State of array before loop:
-array(1) {
- [0]=>
- string(3) "v.0"
-}
---> Do loop:
- iteration 0: $k=0; $v=v.0
---> State of array after loop:
-array(0) {
-}
-
----( Array with 2 element(s): )---
---> State of array before loop:
-array(2) {
- [0]=>
- string(3) "v.0"
- [1]=>
- string(3) "v.1"
-}
---> Do loop:
- iteration 0: $k=0; $v=v.0
---> State of array after loop:
-array(1) {
- [0]=>
- &string(3) "v.0"
-}
-
----( Array with 3 element(s): )---
---> State of array before loop:
-array(3) {
- [0]=>
- string(3) "v.0"
- [1]=>
- string(3) "v.1"
- [2]=>
- string(3) "v.2"
-}
---> Do loop:
- iteration 0: $k=0; $v=v.0
- iteration 1: $k=1; $v=v.1
---> State of array after loop:
-array(1) {
- [0]=>
- string(3) "v.0"
-}
-
----( Array with 4 element(s): )---
---> State of array before loop:
-array(4) {
- [0]=>
- string(3) "v.0"
- [1]=>
- string(3) "v.1"
- [2]=>
- string(3) "v.2"
- [3]=>
- string(3) "v.3"
-}
---> Do loop:
- iteration 0: $k=0; $v=v.0
- iteration 1: $k=1; $v=v.1
---> State of array after loop:
-array(2) {
- [0]=>
- string(3) "v.0"
- [1]=>
- &string(3) "v.1"
-}
-
-
-
-Shift elements off start of an unreferenced array, using &$value.
----( Array with 1 element(s): )---
---> State of array before loop:
-array(1) {
- [0]=>
- string(3) "v.0"
-}
---> Do loop:
- iteration 0: $k=0; $v=v.0
---> State of array after loop:
-array(0) {
-}
-
----( Array with 2 element(s): )---
---> State of array before loop:
-array(2) {
- [0]=>
- string(3) "v.0"
- [1]=>
- string(3) "v.1"
-}
---> Do loop:
- iteration 0: $k=0; $v=v.0
- iteration 1: $k=0; $v=v.1
---> State of array after loop:
-array(0) {
-}
-
----( Array with 3 element(s): )---
---> State of array before loop:
-array(3) {
- [0]=>
- string(3) "v.0"
- [1]=>
- string(3) "v.1"
- [2]=>
- string(3) "v.2"
-}
---> Do loop:
- iteration 0: $k=0; $v=v.0
- iteration 1: $k=0; $v=v.1
- iteration 2: $k=0; $v=v.2
---> State of array after loop:
-array(0) {
-}
-
----( Array with 4 element(s): )---
---> State of array before loop:
-array(4) {
- [0]=>
- string(3) "v.0"
- [1]=>
- string(3) "v.1"
- [2]=>
- string(3) "v.2"
- [3]=>
- string(3) "v.3"
-}
---> Do loop:
- iteration 0: $k=0; $v=v.0
- iteration 1: $k=0; $v=v.1
- iteration 2: $k=0; $v=v.2
- iteration 3: $k=0; $v=v.3
---> State of array after loop:
-array(0) {
-}
-
-
-
-Remove current element of an unreferenced array, using &$value.
----( Array with 1 element(s): )---
---> State of array before loop:
-array(1) {
- [0]=>
- string(3) "v.0"
-}
---> Do loop:
- iteration 0: $k=0; $v=v.0
---> State of array after loop:
-array(0) {
-}
-
----( Array with 2 element(s): )---
---> State of array before loop:
-array(2) {
- [0]=>
- string(3) "v.0"
- [1]=>
- string(3) "v.1"
-}
---> Do loop:
- iteration 0: $k=0; $v=v.0
- iteration 1: $k=1; $v=v.1
---> State of array after loop:
-array(0) {
-}
-
----( Array with 3 element(s): )---
---> State of array before loop:
-array(3) {
- [0]=>
- string(3) "v.0"
- [1]=>
- string(3) "v.1"
- [2]=>
- string(3) "v.2"
-}
---> Do loop:
- iteration 0: $k=0; $v=v.0
- iteration 1: $k=1; $v=v.1
- iteration 2: $k=2; $v=v.2
---> State of array after loop:
-array(0) {
-}
-
----( Array with 4 element(s): )---
---> State of array before loop:
-array(4) {
- [0]=>
- string(3) "v.0"
- [1]=>
- string(3) "v.1"
- [2]=>
- string(3) "v.2"
- [3]=>
- string(3) "v.3"
-}
---> Do loop:
- iteration 0: $k=0; $v=v.0
- iteration 1: $k=1; $v=v.1
- iteration 2: $k=2; $v=v.2
- iteration 3: $k=3; $v=v.3
---> State of array after loop:
-array(0) {
-}
-
-
-
-Adding elements to the end of an unreferenced array, using &$value.
----( Array with 1 element(s): )---
---> State of array before loop:
-array(1) {
- [0]=>
- string(3) "v.0"
-}
---> Do loop:
- iteration 0: $k=0; $v=v.0
- iteration 1: $k=1; $v=new.0
- iteration 2: $k=2; $v=new.1
- iteration 3: $k=3; $v=new.2
- iteration 4: $k=4; $v=new.3
- iteration 5: $k=5; $v=new.4
- ** Stuck in a loop! **
---> State of array after loop:
-array(7) {
- [0]=>
- string(3) "v.0"
- [1]=>
- string(5) "new.0"
- [2]=>
- string(5) "new.1"
- [3]=>
- string(5) "new.2"
- [4]=>
- string(5) "new.3"
- [5]=>
- &string(5) "new.4"
- [6]=>
- string(5) "new.5"
-}
-
----( Array with 2 element(s): )---
---> State of array before loop:
-array(2) {
- [0]=>
- string(3) "v.0"
- [1]=>
- string(3) "v.1"
-}
---> Do loop:
- iteration 0: $k=0; $v=v.0
- iteration 1: $k=1; $v=v.1
- iteration 2: $k=2; $v=new.0
- iteration 3: $k=3; $v=new.1
- iteration 4: $k=4; $v=new.2
- iteration 5: $k=5; $v=new.3
- ** Stuck in a loop! **
---> State of array after loop:
-array(8) {
- [0]=>
- string(3) "v.0"
- [1]=>
- string(3) "v.1"
- [2]=>
- string(5) "new.0"
- [3]=>
- string(5) "new.1"
- [4]=>
- string(5) "new.2"
- [5]=>
- &string(5) "new.3"
- [6]=>
- string(5) "new.4"
- [7]=>
- string(5) "new.5"
-}
-
----( Array with 3 element(s): )---
---> State of array before loop:
-array(3) {
- [0]=>
- string(3) "v.0"
- [1]=>
- string(3) "v.1"
- [2]=>
- string(3) "v.2"
-}
---> Do loop:
- iteration 0: $k=0; $v=v.0
- iteration 1: $k=1; $v=v.1
- iteration 2: $k=2; $v=v.2
- iteration 3: $k=3; $v=new.0
- iteration 4: $k=4; $v=new.1
- iteration 5: $k=5; $v=new.2
- ** Stuck in a loop! **
---> State of array after loop:
-array(9) {
- [0]=>
- string(3) "v.0"
- [1]=>
- string(3) "v.1"
- [2]=>
- string(3) "v.2"
- [3]=>
- string(5) "new.0"
- [4]=>
- string(5) "new.1"
- [5]=>
- &string(5) "new.2"
- [6]=>
- string(5) "new.3"
- [7]=>
- string(5) "new.4"
- [8]=>
- string(5) "new.5"
-}
-
----( Array with 4 element(s): )---
---> State of array before loop:
-array(4) {
- [0]=>
- string(3) "v.0"
- [1]=>
- string(3) "v.1"
- [2]=>
- string(3) "v.2"
- [3]=>
- string(3) "v.3"
-}
---> Do loop:
- iteration 0: $k=0; $v=v.0
- iteration 1: $k=1; $v=v.1
- iteration 2: $k=2; $v=v.2
- iteration 3: $k=3; $v=v.3
- iteration 4: $k=4; $v=new.0
- iteration 5: $k=5; $v=new.1
- ** Stuck in a loop! **
---> State of array after loop:
-array(10) {
- [0]=>
- string(3) "v.0"
- [1]=>
- string(3) "v.1"
- [2]=>
- string(3) "v.2"
- [3]=>
- string(3) "v.3"
- [4]=>
- string(5) "new.0"
- [5]=>
- &string(5) "new.1"
- [6]=>
- string(5) "new.2"
- [7]=>
- string(5) "new.3"
- [8]=>
- string(5) "new.4"
- [9]=>
- string(5) "new.5"
-}
-
-
-
-Adding elements to the start of an unreferenced array, using &$value.
----( Array with 1 element(s): )---
---> State of array before loop:
-array(1) {
- [0]=>
- string(3) "v.0"
-}
---> Do loop:
- iteration 0: $k=0; $v=v.0
---> State of array after loop:
-array(2) {
- [0]=>
- string(5) "new.0"
- [1]=>
- &string(3) "v.0"
-}
-
----( Array with 2 element(s): )---
---> State of array before loop:
-array(2) {
- [0]=>
- string(3) "v.0"
- [1]=>
- string(3) "v.1"
-}
---> Do loop:
- iteration 0: $k=0; $v=v.0
- iteration 1: $k=2; $v=v.1
---> State of array after loop:
-array(4) {
- [0]=>
- string(5) "new.1"
- [1]=>
- string(5) "new.0"
- [2]=>
- string(3) "v.0"
- [3]=>
- &string(3) "v.1"
-}
-
----( Array with 3 element(s): )---
---> State of array before loop:
-array(3) {
- [0]=>
- string(3) "v.0"
- [1]=>
- string(3) "v.1"
- [2]=>
- string(3) "v.2"
-}
---> Do loop:
- iteration 0: $k=0; $v=v.0
- iteration 1: $k=3; $v=v.2
---> State of array after loop:
-array(5) {
- [0]=>
- string(5) "new.1"
- [1]=>
- string(5) "new.0"
- [2]=>
- string(3) "v.0"
- [3]=>
- string(3) "v.1"
- [4]=>
- &string(3) "v.2"
-}
-
----( Array with 4 element(s): )---
---> State of array before loop:
-array(4) {
- [0]=>
- string(3) "v.0"
- [1]=>
- string(3) "v.1"
- [2]=>
- string(3) "v.2"
- [3]=>
- string(3) "v.3"
-}
---> Do loop:
- iteration 0: $k=0; $v=v.0
- iteration 1: $k=4; $v=v.3
---> State of array after loop:
-array(6) {
- [0]=>
- string(5) "new.1"
- [1]=>
- string(5) "new.0"
- [2]=>
- string(3) "v.0"
- [3]=>
- string(3) "v.1"
- [4]=>
- string(3) "v.2"
- [5]=>
- &string(3) "v.3"
-}
+--TEST--
+Directly modifying an unreferenced array when foreach'ing over it while using &$value syntax.
+--FILE--
+<?php
+
+define('MAX_LOOPS',5);
+
+function withRefValue($elements, $transform) {
+ echo "\n---( Array with $elements element(s): )---\n";
+ //Build array:
+ for ($i=0; $i<$elements; $i++) {
+ $a[] = "v.$i";
+ }
+ $counter=0;
+
+ echo "--> State of array before loop:\n";
+ var_dump($a);
+
+ echo "--> Do loop:\n";
+ foreach ($a as $k=>&$v) {
+ echo " iteration $counter: \$k=$k; \$v=$v\n";
+ eval($transform);
+ $counter++;
+ if ($counter>MAX_LOOPS) {
+ echo " ** Stuck in a loop! **\n";
+ break;
+ }
+ }
+
+ echo "--> State of array after loop:\n";
+ var_dump($a);
+}
+
+
+echo "\nPopping elements off end of an unreferenced array, using &\$value.";
+$transform = 'array_pop($a);';
+withRefValue(1, $transform);
+withRefValue(2, $transform);
+withRefValue(3, $transform);
+withRefValue(4, $transform);
+
+echo "\n\n\nShift elements off start of an unreferenced array, using &\$value.";
+$transform = 'array_shift($a);';
+withRefValue(1, $transform);
+withRefValue(2, $transform);
+withRefValue(3, $transform);
+withRefValue(4, $transform);
+
+echo "\n\n\nRemove current element of an unreferenced array, using &\$value.";
+$transform = 'unset($a[$k]);';
+withRefValue(1, $transform);
+withRefValue(2, $transform);
+withRefValue(3, $transform);
+withRefValue(4, $transform);
+
+echo "\n\n\nAdding elements to the end of an unreferenced array, using &\$value.";
+$transform = 'array_push($a, "new.$counter");';
+withRefValue(1, $transform);
+withRefValue(2, $transform);
+withRefValue(3, $transform);
+withRefValue(4, $transform);
+
+echo "\n\n\nAdding elements to the start of an unreferenced array, using &\$value.";
+$transform = 'array_unshift($a, "new.$counter");';
+withRefValue(1, $transform);
+withRefValue(2, $transform);
+withRefValue(3, $transform);
+withRefValue(4, $transform);
+
+?>
+--EXPECT--
+
+Popping elements off end of an unreferenced array, using &$value.
+---( Array with 1 element(s): )---
+--> State of array before loop:
+array(1) {
+ [0]=>
+ string(3) "v.0"
+}
+--> Do loop:
+ iteration 0: $k=0; $v=v.0
+--> State of array after loop:
+array(0) {
+}
+
+---( Array with 2 element(s): )---
+--> State of array before loop:
+array(2) {
+ [0]=>
+ string(3) "v.0"
+ [1]=>
+ string(3) "v.1"
+}
+--> Do loop:
+ iteration 0: $k=0; $v=v.0
+--> State of array after loop:
+array(1) {
+ [0]=>
+ &string(3) "v.0"
+}
+
+---( Array with 3 element(s): )---
+--> State of array before loop:
+array(3) {
+ [0]=>
+ string(3) "v.0"
+ [1]=>
+ string(3) "v.1"
+ [2]=>
+ string(3) "v.2"
+}
+--> Do loop:
+ iteration 0: $k=0; $v=v.0
+ iteration 1: $k=1; $v=v.1
+--> State of array after loop:
+array(1) {
+ [0]=>
+ string(3) "v.0"
+}
+
+---( Array with 4 element(s): )---
+--> State of array before loop:
+array(4) {
+ [0]=>
+ string(3) "v.0"
+ [1]=>
+ string(3) "v.1"
+ [2]=>
+ string(3) "v.2"
+ [3]=>
+ string(3) "v.3"
+}
+--> Do loop:
+ iteration 0: $k=0; $v=v.0
+ iteration 1: $k=1; $v=v.1
+--> State of array after loop:
+array(2) {
+ [0]=>
+ string(3) "v.0"
+ [1]=>
+ &string(3) "v.1"
+}
+
+
+
+Shift elements off start of an unreferenced array, using &$value.
+---( Array with 1 element(s): )---
+--> State of array before loop:
+array(1) {
+ [0]=>
+ string(3) "v.0"
+}
+--> Do loop:
+ iteration 0: $k=0; $v=v.0
+--> State of array after loop:
+array(0) {
+}
+
+---( Array with 2 element(s): )---
+--> State of array before loop:
+array(2) {
+ [0]=>
+ string(3) "v.0"
+ [1]=>
+ string(3) "v.1"
+}
+--> Do loop:
+ iteration 0: $k=0; $v=v.0
+ iteration 1: $k=0; $v=v.1
+--> State of array after loop:
+array(0) {
+}
+
+---( Array with 3 element(s): )---
+--> State of array before loop:
+array(3) {
+ [0]=>
+ string(3) "v.0"
+ [1]=>
+ string(3) "v.1"
+ [2]=>
+ string(3) "v.2"
+}
+--> Do loop:
+ iteration 0: $k=0; $v=v.0
+ iteration 1: $k=0; $v=v.1
+ iteration 2: $k=0; $v=v.2
+--> State of array after loop:
+array(0) {
+}
+
+---( Array with 4 element(s): )---
+--> State of array before loop:
+array(4) {
+ [0]=>
+ string(3) "v.0"
+ [1]=>
+ string(3) "v.1"
+ [2]=>
+ string(3) "v.2"
+ [3]=>
+ string(3) "v.3"
+}
+--> Do loop:
+ iteration 0: $k=0; $v=v.0
+ iteration 1: $k=0; $v=v.1
+ iteration 2: $k=0; $v=v.2
+ iteration 3: $k=0; $v=v.3
+--> State of array after loop:
+array(0) {
+}
+
+
+
+Remove current element of an unreferenced array, using &$value.
+---( Array with 1 element(s): )---
+--> State of array before loop:
+array(1) {
+ [0]=>
+ string(3) "v.0"
+}
+--> Do loop:
+ iteration 0: $k=0; $v=v.0
+--> State of array after loop:
+array(0) {
+}
+
+---( Array with 2 element(s): )---
+--> State of array before loop:
+array(2) {
+ [0]=>
+ string(3) "v.0"
+ [1]=>
+ string(3) "v.1"
+}
+--> Do loop:
+ iteration 0: $k=0; $v=v.0
+ iteration 1: $k=1; $v=v.1
+--> State of array after loop:
+array(0) {
+}
+
+---( Array with 3 element(s): )---
+--> State of array before loop:
+array(3) {
+ [0]=>
+ string(3) "v.0"
+ [1]=>
+ string(3) "v.1"
+ [2]=>
+ string(3) "v.2"
+}
+--> Do loop:
+ iteration 0: $k=0; $v=v.0
+ iteration 1: $k=1; $v=v.1
+ iteration 2: $k=2; $v=v.2
+--> State of array after loop:
+array(0) {
+}
+
+---( Array with 4 element(s): )---
+--> State of array before loop:
+array(4) {
+ [0]=>
+ string(3) "v.0"
+ [1]=>
+ string(3) "v.1"
+ [2]=>
+ string(3) "v.2"
+ [3]=>
+ string(3) "v.3"
+}
+--> Do loop:
+ iteration 0: $k=0; $v=v.0
+ iteration 1: $k=1; $v=v.1
+ iteration 2: $k=2; $v=v.2
+ iteration 3: $k=3; $v=v.3
+--> State of array after loop:
+array(0) {
+}
+
+
+
+Adding elements to the end of an unreferenced array, using &$value.
+---( Array with 1 element(s): )---
+--> State of array before loop:
+array(1) {
+ [0]=>
+ string(3) "v.0"
+}
+--> Do loop:
+ iteration 0: $k=0; $v=v.0
+ iteration 1: $k=1; $v=new.0
+ iteration 2: $k=2; $v=new.1
+ iteration 3: $k=3; $v=new.2
+ iteration 4: $k=4; $v=new.3
+ iteration 5: $k=5; $v=new.4
+ ** Stuck in a loop! **
+--> State of array after loop:
+array(7) {
+ [0]=>
+ string(3) "v.0"
+ [1]=>
+ string(5) "new.0"
+ [2]=>
+ string(5) "new.1"
+ [3]=>
+ string(5) "new.2"
+ [4]=>
+ string(5) "new.3"
+ [5]=>
+ &string(5) "new.4"
+ [6]=>
+ string(5) "new.5"
+}
+
+---( Array with 2 element(s): )---
+--> State of array before loop:
+array(2) {
+ [0]=>
+ string(3) "v.0"
+ [1]=>
+ string(3) "v.1"
+}
+--> Do loop:
+ iteration 0: $k=0; $v=v.0
+ iteration 1: $k=1; $v=v.1
+ iteration 2: $k=2; $v=new.0
+ iteration 3: $k=3; $v=new.1
+ iteration 4: $k=4; $v=new.2
+ iteration 5: $k=5; $v=new.3
+ ** Stuck in a loop! **
+--> State of array after loop:
+array(8) {
+ [0]=>
+ string(3) "v.0"
+ [1]=>
+ string(3) "v.1"
+ [2]=>
+ string(5) "new.0"
+ [3]=>
+ string(5) "new.1"
+ [4]=>
+ string(5) "new.2"
+ [5]=>
+ &string(5) "new.3"
+ [6]=>
+ string(5) "new.4"
+ [7]=>
+ string(5) "new.5"
+}
+
+---( Array with 3 element(s): )---
+--> State of array before loop:
+array(3) {
+ [0]=>
+ string(3) "v.0"
+ [1]=>
+ string(3) "v.1"
+ [2]=>
+ string(3) "v.2"
+}
+--> Do loop:
+ iteration 0: $k=0; $v=v.0
+ iteration 1: $k=1; $v=v.1
+ iteration 2: $k=2; $v=v.2
+ iteration 3: $k=3; $v=new.0
+ iteration 4: $k=4; $v=new.1
+ iteration 5: $k=5; $v=new.2
+ ** Stuck in a loop! **
+--> State of array after loop:
+array(9) {
+ [0]=>
+ string(3) "v.0"
+ [1]=>
+ string(3) "v.1"
+ [2]=>
+ string(3) "v.2"
+ [3]=>
+ string(5) "new.0"
+ [4]=>
+ string(5) "new.1"
+ [5]=>
+ &string(5) "new.2"
+ [6]=>
+ string(5) "new.3"
+ [7]=>
+ string(5) "new.4"
+ [8]=>
+ string(5) "new.5"
+}
+
+---( Array with 4 element(s): )---
+--> State of array before loop:
+array(4) {
+ [0]=>
+ string(3) "v.0"
+ [1]=>
+ string(3) "v.1"
+ [2]=>
+ string(3) "v.2"
+ [3]=>
+ string(3) "v.3"
+}
+--> Do loop:
+ iteration 0: $k=0; $v=v.0
+ iteration 1: $k=1; $v=v.1
+ iteration 2: $k=2; $v=v.2
+ iteration 3: $k=3; $v=v.3
+ iteration 4: $k=4; $v=new.0
+ iteration 5: $k=5; $v=new.1
+ ** Stuck in a loop! **
+--> State of array after loop:
+array(10) {
+ [0]=>
+ string(3) "v.0"
+ [1]=>
+ string(3) "v.1"
+ [2]=>
+ string(3) "v.2"
+ [3]=>
+ string(3) "v.3"
+ [4]=>
+ string(5) "new.0"
+ [5]=>
+ &string(5) "new.1"
+ [6]=>
+ string(5) "new.2"
+ [7]=>
+ string(5) "new.3"
+ [8]=>
+ string(5) "new.4"
+ [9]=>
+ string(5) "new.5"
+}
+
+
+
+Adding elements to the start of an unreferenced array, using &$value.
+---( Array with 1 element(s): )---
+--> State of array before loop:
+array(1) {
+ [0]=>
+ string(3) "v.0"
+}
+--> Do loop:
+ iteration 0: $k=0; $v=v.0
+--> State of array after loop:
+array(2) {
+ [0]=>
+ string(5) "new.0"
+ [1]=>
+ &string(3) "v.0"
+}
+
+---( Array with 2 element(s): )---
+--> State of array before loop:
+array(2) {
+ [0]=>
+ string(3) "v.0"
+ [1]=>
+ string(3) "v.1"
+}
+--> Do loop:
+ iteration 0: $k=0; $v=v.0
+ iteration 1: $k=2; $v=v.1
+--> State of array after loop:
+array(4) {
+ [0]=>
+ string(5) "new.1"
+ [1]=>
+ string(5) "new.0"
+ [2]=>
+ string(3) "v.0"
+ [3]=>
+ &string(3) "v.1"
+}
+
+---( Array with 3 element(s): )---
+--> State of array before loop:
+array(3) {
+ [0]=>
+ string(3) "v.0"
+ [1]=>
+ string(3) "v.1"
+ [2]=>
+ string(3) "v.2"
+}
+--> Do loop:
+ iteration 0: $k=0; $v=v.0
+ iteration 1: $k=3; $v=v.2
+--> State of array after loop:
+array(5) {
+ [0]=>
+ string(5) "new.1"
+ [1]=>
+ string(5) "new.0"
+ [2]=>
+ string(3) "v.0"
+ [3]=>
+ string(3) "v.1"
+ [4]=>
+ &string(3) "v.2"
+}
+
+---( Array with 4 element(s): )---
+--> State of array before loop:
+array(4) {
+ [0]=>
+ string(3) "v.0"
+ [1]=>
+ string(3) "v.1"
+ [2]=>
+ string(3) "v.2"
+ [3]=>
+ string(3) "v.3"
+}
+--> Do loop:
+ iteration 0: $k=0; $v=v.0
+ iteration 1: $k=4; $v=v.3
+--> State of array after loop:
+array(6) {
+ [0]=>
+ string(5) "new.1"
+ [1]=>
+ string(5) "new.0"
+ [2]=>
+ string(3) "v.0"
+ [3]=>
+ string(3) "v.1"
+ [4]=>
+ string(3) "v.2"
+ [5]=>
+ &string(3) "v.3"
+}
diff --git a/tests/lang/foreachLoop.014.phpt b/tests/lang/foreachLoop.014.phpt
index 9b179ab22a..770ee9f92e 100644
--- a/tests/lang/foreachLoop.014.phpt
+++ b/tests/lang/foreachLoop.014.phpt
@@ -1,495 +1,495 @@
---TEST--
-Directly modifying a REFERENCED array when foreach'ing over it.
---FILE--
-<?php
-
-define('MAX_LOOPS',5);
-
-function withRefValue($elements, $transform) {
- echo "\n---( Array with $elements element(s): )---\n";
- //Build array:
- for ($i=0; $i<$elements; $i++) {
- $a[] = "v.$i";
- }
- $counter=0;
-
- $ref = &$a;
-
- echo "--> State of referenced array before loop:\n";
- var_dump($a);
-
- echo "--> Do loop:\n";
- foreach ($a as $k=>$v) {
- echo " iteration $counter: \$k=$k; \$v=$v\n";
- eval($transform);
- $counter++;
- if ($counter>MAX_LOOPS) {
- echo " ** Stuck in a loop! **\n";
- break;
- }
- }
-
- echo "--> State of array after loop:\n";
- var_dump($a);
-}
-
-
-echo "\nPopping elements off end of a referenced array";
-$transform = 'array_pop($a);';
-withRefValue(1, $transform);
-withRefValue(2, $transform);
-withRefValue(3, $transform);
-withRefValue(4, $transform);
-
-echo "\n\n\nShift elements off start of a referenced array";
-$transform = 'array_shift($a);';
-withRefValue(1, $transform);
-withRefValue(2, $transform);
-withRefValue(3, $transform);
-withRefValue(4, $transform);
-
-echo "\n\n\nRemove current element of a referenced array";
-$transform = 'unset($a[$k]);';
-withRefValue(1, $transform);
-withRefValue(2, $transform);
-withRefValue(3, $transform);
-withRefValue(4, $transform);
-
-echo "\n\n\nAdding elements to the end of a referenced array";
-$transform = 'array_push($a, "new.$counter");';
-withRefValue(1, $transform);
-withRefValue(2, $transform);
-withRefValue(3, $transform);
-withRefValue(4, $transform);
-
-echo "\n\n\nAdding elements to the start of a referenced array";
-$transform = 'array_unshift($a, "new.$counter");';
-withRefValue(1, $transform);
-withRefValue(2, $transform);
-withRefValue(3, $transform);
-withRefValue(4, $transform);
-
-?>
---EXPECTF--
-Popping elements off end of a referenced array
----( Array with 1 element(s): )---
---> State of referenced array before loop:
-array(1) {
- [0]=>
- string(3) "v.0"
-}
---> Do loop:
- iteration 0: $k=0; $v=v.0
---> State of array after loop:
-array(0) {
-}
-
----( Array with 2 element(s): )---
---> State of referenced array before loop:
-array(2) {
- [0]=>
- string(3) "v.0"
- [1]=>
- string(3) "v.1"
-}
---> Do loop:
- iteration 0: $k=0; $v=v.0
- iteration 1: $k=1; $v=v.1
---> State of array after loop:
-array(0) {
-}
-
----( Array with 3 element(s): )---
---> State of referenced array before loop:
-array(3) {
- [0]=>
- string(3) "v.0"
- [1]=>
- string(3) "v.1"
- [2]=>
- string(3) "v.2"
-}
---> Do loop:
- iteration 0: $k=0; $v=v.0
- iteration 1: $k=1; $v=v.1
- iteration 2: $k=2; $v=v.2
---> State of array after loop:
-array(0) {
-}
-
----( Array with 4 element(s): )---
---> State of referenced array before loop:
-array(4) {
- [0]=>
- string(3) "v.0"
- [1]=>
- string(3) "v.1"
- [2]=>
- string(3) "v.2"
- [3]=>
- string(3) "v.3"
-}
---> Do loop:
- iteration 0: $k=0; $v=v.0
- iteration 1: $k=1; $v=v.1
- iteration 2: $k=2; $v=v.2
- iteration 3: $k=3; $v=v.3
---> State of array after loop:
-array(0) {
-}
-
-
-
-Shift elements off start of a referenced array
----( Array with 1 element(s): )---
---> State of referenced array before loop:
-array(1) {
- [0]=>
- string(3) "v.0"
-}
---> Do loop:
- iteration 0: $k=0; $v=v.0
---> State of array after loop:
-array(0) {
-}
-
----( Array with 2 element(s): )---
---> State of referenced array before loop:
-array(2) {
- [0]=>
- string(3) "v.0"
- [1]=>
- string(3) "v.1"
-}
---> Do loop:
- iteration 0: $k=0; $v=v.0
- iteration 1: $k=1; $v=v.1
---> State of array after loop:
-array(0) {
-}
-
----( Array with 3 element(s): )---
---> State of referenced array before loop:
-array(3) {
- [0]=>
- string(3) "v.0"
- [1]=>
- string(3) "v.1"
- [2]=>
- string(3) "v.2"
-}
---> Do loop:
- iteration 0: $k=0; $v=v.0
- iteration 1: $k=1; $v=v.1
- iteration 2: $k=2; $v=v.2
---> State of array after loop:
-array(0) {
-}
-
----( Array with 4 element(s): )---
---> State of referenced array before loop:
-array(4) {
- [0]=>
- string(3) "v.0"
- [1]=>
- string(3) "v.1"
- [2]=>
- string(3) "v.2"
- [3]=>
- string(3) "v.3"
-}
---> Do loop:
- iteration 0: $k=0; $v=v.0
- iteration 1: $k=1; $v=v.1
- iteration 2: $k=2; $v=v.2
- iteration 3: $k=3; $v=v.3
---> State of array after loop:
-array(0) {
-}
-
-
-
-Remove current element of a referenced array
----( Array with 1 element(s): )---
---> State of referenced array before loop:
-array(1) {
- [0]=>
- string(3) "v.0"
-}
---> Do loop:
- iteration 0: $k=0; $v=v.0
---> State of array after loop:
-array(0) {
-}
-
----( Array with 2 element(s): )---
---> State of referenced array before loop:
-array(2) {
- [0]=>
- string(3) "v.0"
- [1]=>
- string(3) "v.1"
-}
---> Do loop:
- iteration 0: $k=0; $v=v.0
- iteration 1: $k=1; $v=v.1
---> State of array after loop:
-array(0) {
-}
-
----( Array with 3 element(s): )---
---> State of referenced array before loop:
-array(3) {
- [0]=>
- string(3) "v.0"
- [1]=>
- string(3) "v.1"
- [2]=>
- string(3) "v.2"
-}
---> Do loop:
- iteration 0: $k=0; $v=v.0
- iteration 1: $k=1; $v=v.1
- iteration 2: $k=2; $v=v.2
---> State of array after loop:
-array(0) {
-}
-
----( Array with 4 element(s): )---
---> State of referenced array before loop:
-array(4) {
- [0]=>
- string(3) "v.0"
- [1]=>
- string(3) "v.1"
- [2]=>
- string(3) "v.2"
- [3]=>
- string(3) "v.3"
-}
---> Do loop:
- iteration 0: $k=0; $v=v.0
- iteration 1: $k=1; $v=v.1
- iteration 2: $k=2; $v=v.2
- iteration 3: $k=3; $v=v.3
---> State of array after loop:
-array(0) {
-}
-
-
-
-Adding elements to the end of a referenced array
----( Array with 1 element(s): )---
---> State of referenced array before loop:
-array(1) {
- [0]=>
- string(3) "v.0"
-}
---> Do loop:
- iteration 0: $k=0; $v=v.0
---> State of array after loop:
-array(2) {
- [0]=>
- string(3) "v.0"
- [1]=>
- string(5) "new.0"
-}
-
----( Array with 2 element(s): )---
---> State of referenced array before loop:
-array(2) {
- [0]=>
- string(3) "v.0"
- [1]=>
- string(3) "v.1"
-}
---> Do loop:
- iteration 0: $k=0; $v=v.0
- iteration 1: $k=1; $v=v.1
---> State of array after loop:
-array(4) {
- [0]=>
- string(3) "v.0"
- [1]=>
- string(3) "v.1"
- [2]=>
- string(5) "new.0"
- [3]=>
- string(5) "new.1"
-}
-
----( Array with 3 element(s): )---
---> State of referenced array before loop:
-array(3) {
- [0]=>
- string(3) "v.0"
- [1]=>
- string(3) "v.1"
- [2]=>
- string(3) "v.2"
-}
---> Do loop:
- iteration 0: $k=0; $v=v.0
- iteration 1: $k=1; $v=v.1
- iteration 2: $k=2; $v=v.2
---> State of array after loop:
-array(6) {
- [0]=>
- string(3) "v.0"
- [1]=>
- string(3) "v.1"
- [2]=>
- string(3) "v.2"
- [3]=>
- string(5) "new.0"
- [4]=>
- string(5) "new.1"
- [5]=>
- string(5) "new.2"
-}
-
----( Array with 4 element(s): )---
---> State of referenced array before loop:
-array(4) {
- [0]=>
- string(3) "v.0"
- [1]=>
- string(3) "v.1"
- [2]=>
- string(3) "v.2"
- [3]=>
- string(3) "v.3"
-}
---> Do loop:
- iteration 0: $k=0; $v=v.0
- iteration 1: $k=1; $v=v.1
- iteration 2: $k=2; $v=v.2
- iteration 3: $k=3; $v=v.3
---> State of array after loop:
-array(8) {
- [0]=>
- string(3) "v.0"
- [1]=>
- string(3) "v.1"
- [2]=>
- string(3) "v.2"
- [3]=>
- string(3) "v.3"
- [4]=>
- string(5) "new.0"
- [5]=>
- string(5) "new.1"
- [6]=>
- string(5) "new.2"
- [7]=>
- string(5) "new.3"
-}
-
-
-
-Adding elements to the start of a referenced array
----( Array with 1 element(s): )---
---> State of referenced array before loop:
-array(1) {
- [0]=>
- string(3) "v.0"
-}
---> Do loop:
- iteration 0: $k=0; $v=v.0
---> State of array after loop:
-array(2) {
- [0]=>
- string(5) "new.0"
- [1]=>
- string(3) "v.0"
-}
-
----( Array with 2 element(s): )---
---> State of referenced array before loop:
-array(2) {
- [0]=>
- string(3) "v.0"
- [1]=>
- string(3) "v.1"
-}
---> Do loop:
- iteration 0: $k=0; $v=v.0
- iteration 1: $k=1; $v=v.1
---> State of array after loop:
-array(4) {
- [0]=>
- string(5) "new.1"
- [1]=>
- string(5) "new.0"
- [2]=>
- string(3) "v.0"
- [3]=>
- string(3) "v.1"
-}
-
----( Array with 3 element(s): )---
---> State of referenced array before loop:
-array(3) {
- [0]=>
- string(3) "v.0"
- [1]=>
- string(3) "v.1"
- [2]=>
- string(3) "v.2"
-}
---> Do loop:
- iteration 0: $k=0; $v=v.0
- iteration 1: $k=1; $v=v.1
- iteration 2: $k=2; $v=v.2
---> State of array after loop:
-array(6) {
- [0]=>
- string(5) "new.2"
- [1]=>
- string(5) "new.1"
- [2]=>
- string(5) "new.0"
- [3]=>
- string(3) "v.0"
- [4]=>
- string(3) "v.1"
- [5]=>
- string(3) "v.2"
-}
-
----( Array with 4 element(s): )---
---> State of referenced array before loop:
-array(4) {
- [0]=>
- string(3) "v.0"
- [1]=>
- string(3) "v.1"
- [2]=>
- string(3) "v.2"
- [3]=>
- string(3) "v.3"
-}
---> Do loop:
- iteration 0: $k=0; $v=v.0
- iteration 1: $k=1; $v=v.1
- iteration 2: $k=2; $v=v.2
- iteration 3: $k=3; $v=v.3
---> State of array after loop:
-array(8) {
- [0]=>
- string(5) "new.3"
- [1]=>
- string(5) "new.2"
- [2]=>
- string(5) "new.1"
- [3]=>
- string(5) "new.0"
- [4]=>
- string(3) "v.0"
- [5]=>
- string(3) "v.1"
- [6]=>
- string(3) "v.2"
- [7]=>
- string(3) "v.3"
-}
+--TEST--
+Directly modifying a REFERENCED array when foreach'ing over it.
+--FILE--
+<?php
+
+define('MAX_LOOPS',5);
+
+function withRefValue($elements, $transform) {
+ echo "\n---( Array with $elements element(s): )---\n";
+ //Build array:
+ for ($i=0; $i<$elements; $i++) {
+ $a[] = "v.$i";
+ }
+ $counter=0;
+
+ $ref = &$a;
+
+ echo "--> State of referenced array before loop:\n";
+ var_dump($a);
+
+ echo "--> Do loop:\n";
+ foreach ($a as $k=>$v) {
+ echo " iteration $counter: \$k=$k; \$v=$v\n";
+ eval($transform);
+ $counter++;
+ if ($counter>MAX_LOOPS) {
+ echo " ** Stuck in a loop! **\n";
+ break;
+ }
+ }
+
+ echo "--> State of array after loop:\n";
+ var_dump($a);
+}
+
+
+echo "\nPopping elements off end of a referenced array";
+$transform = 'array_pop($a);';
+withRefValue(1, $transform);
+withRefValue(2, $transform);
+withRefValue(3, $transform);
+withRefValue(4, $transform);
+
+echo "\n\n\nShift elements off start of a referenced array";
+$transform = 'array_shift($a);';
+withRefValue(1, $transform);
+withRefValue(2, $transform);
+withRefValue(3, $transform);
+withRefValue(4, $transform);
+
+echo "\n\n\nRemove current element of a referenced array";
+$transform = 'unset($a[$k]);';
+withRefValue(1, $transform);
+withRefValue(2, $transform);
+withRefValue(3, $transform);
+withRefValue(4, $transform);
+
+echo "\n\n\nAdding elements to the end of a referenced array";
+$transform = 'array_push($a, "new.$counter");';
+withRefValue(1, $transform);
+withRefValue(2, $transform);
+withRefValue(3, $transform);
+withRefValue(4, $transform);
+
+echo "\n\n\nAdding elements to the start of a referenced array";
+$transform = 'array_unshift($a, "new.$counter");';
+withRefValue(1, $transform);
+withRefValue(2, $transform);
+withRefValue(3, $transform);
+withRefValue(4, $transform);
+
+?>
+--EXPECTF--
+Popping elements off end of a referenced array
+---( Array with 1 element(s): )---
+--> State of referenced array before loop:
+array(1) {
+ [0]=>
+ string(3) "v.0"
+}
+--> Do loop:
+ iteration 0: $k=0; $v=v.0
+--> State of array after loop:
+array(0) {
+}
+
+---( Array with 2 element(s): )---
+--> State of referenced array before loop:
+array(2) {
+ [0]=>
+ string(3) "v.0"
+ [1]=>
+ string(3) "v.1"
+}
+--> Do loop:
+ iteration 0: $k=0; $v=v.0
+ iteration 1: $k=1; $v=v.1
+--> State of array after loop:
+array(0) {
+}
+
+---( Array with 3 element(s): )---
+--> State of referenced array before loop:
+array(3) {
+ [0]=>
+ string(3) "v.0"
+ [1]=>
+ string(3) "v.1"
+ [2]=>
+ string(3) "v.2"
+}
+--> Do loop:
+ iteration 0: $k=0; $v=v.0
+ iteration 1: $k=1; $v=v.1
+ iteration 2: $k=2; $v=v.2
+--> State of array after loop:
+array(0) {
+}
+
+---( Array with 4 element(s): )---
+--> State of referenced array before loop:
+array(4) {
+ [0]=>
+ string(3) "v.0"
+ [1]=>
+ string(3) "v.1"
+ [2]=>
+ string(3) "v.2"
+ [3]=>
+ string(3) "v.3"
+}
+--> Do loop:
+ iteration 0: $k=0; $v=v.0
+ iteration 1: $k=1; $v=v.1
+ iteration 2: $k=2; $v=v.2
+ iteration 3: $k=3; $v=v.3
+--> State of array after loop:
+array(0) {
+}
+
+
+
+Shift elements off start of a referenced array
+---( Array with 1 element(s): )---
+--> State of referenced array before loop:
+array(1) {
+ [0]=>
+ string(3) "v.0"
+}
+--> Do loop:
+ iteration 0: $k=0; $v=v.0
+--> State of array after loop:
+array(0) {
+}
+
+---( Array with 2 element(s): )---
+--> State of referenced array before loop:
+array(2) {
+ [0]=>
+ string(3) "v.0"
+ [1]=>
+ string(3) "v.1"
+}
+--> Do loop:
+ iteration 0: $k=0; $v=v.0
+ iteration 1: $k=1; $v=v.1
+--> State of array after loop:
+array(0) {
+}
+
+---( Array with 3 element(s): )---
+--> State of referenced array before loop:
+array(3) {
+ [0]=>
+ string(3) "v.0"
+ [1]=>
+ string(3) "v.1"
+ [2]=>
+ string(3) "v.2"
+}
+--> Do loop:
+ iteration 0: $k=0; $v=v.0
+ iteration 1: $k=1; $v=v.1
+ iteration 2: $k=2; $v=v.2
+--> State of array after loop:
+array(0) {
+}
+
+---( Array with 4 element(s): )---
+--> State of referenced array before loop:
+array(4) {
+ [0]=>
+ string(3) "v.0"
+ [1]=>
+ string(3) "v.1"
+ [2]=>
+ string(3) "v.2"
+ [3]=>
+ string(3) "v.3"
+}
+--> Do loop:
+ iteration 0: $k=0; $v=v.0
+ iteration 1: $k=1; $v=v.1
+ iteration 2: $k=2; $v=v.2
+ iteration 3: $k=3; $v=v.3
+--> State of array after loop:
+array(0) {
+}
+
+
+
+Remove current element of a referenced array
+---( Array with 1 element(s): )---
+--> State of referenced array before loop:
+array(1) {
+ [0]=>
+ string(3) "v.0"
+}
+--> Do loop:
+ iteration 0: $k=0; $v=v.0
+--> State of array after loop:
+array(0) {
+}
+
+---( Array with 2 element(s): )---
+--> State of referenced array before loop:
+array(2) {
+ [0]=>
+ string(3) "v.0"
+ [1]=>
+ string(3) "v.1"
+}
+--> Do loop:
+ iteration 0: $k=0; $v=v.0
+ iteration 1: $k=1; $v=v.1
+--> State of array after loop:
+array(0) {
+}
+
+---( Array with 3 element(s): )---
+--> State of referenced array before loop:
+array(3) {
+ [0]=>
+ string(3) "v.0"
+ [1]=>
+ string(3) "v.1"
+ [2]=>
+ string(3) "v.2"
+}
+--> Do loop:
+ iteration 0: $k=0; $v=v.0
+ iteration 1: $k=1; $v=v.1
+ iteration 2: $k=2; $v=v.2
+--> State of array after loop:
+array(0) {
+}
+
+---( Array with 4 element(s): )---
+--> State of referenced array before loop:
+array(4) {
+ [0]=>
+ string(3) "v.0"
+ [1]=>
+ string(3) "v.1"
+ [2]=>
+ string(3) "v.2"
+ [3]=>
+ string(3) "v.3"
+}
+--> Do loop:
+ iteration 0: $k=0; $v=v.0
+ iteration 1: $k=1; $v=v.1
+ iteration 2: $k=2; $v=v.2
+ iteration 3: $k=3; $v=v.3
+--> State of array after loop:
+array(0) {
+}
+
+
+
+Adding elements to the end of a referenced array
+---( Array with 1 element(s): )---
+--> State of referenced array before loop:
+array(1) {
+ [0]=>
+ string(3) "v.0"
+}
+--> Do loop:
+ iteration 0: $k=0; $v=v.0
+--> State of array after loop:
+array(2) {
+ [0]=>
+ string(3) "v.0"
+ [1]=>
+ string(5) "new.0"
+}
+
+---( Array with 2 element(s): )---
+--> State of referenced array before loop:
+array(2) {
+ [0]=>
+ string(3) "v.0"
+ [1]=>
+ string(3) "v.1"
+}
+--> Do loop:
+ iteration 0: $k=0; $v=v.0
+ iteration 1: $k=1; $v=v.1
+--> State of array after loop:
+array(4) {
+ [0]=>
+ string(3) "v.0"
+ [1]=>
+ string(3) "v.1"
+ [2]=>
+ string(5) "new.0"
+ [3]=>
+ string(5) "new.1"
+}
+
+---( Array with 3 element(s): )---
+--> State of referenced array before loop:
+array(3) {
+ [0]=>
+ string(3) "v.0"
+ [1]=>
+ string(3) "v.1"
+ [2]=>
+ string(3) "v.2"
+}
+--> Do loop:
+ iteration 0: $k=0; $v=v.0
+ iteration 1: $k=1; $v=v.1
+ iteration 2: $k=2; $v=v.2
+--> State of array after loop:
+array(6) {
+ [0]=>
+ string(3) "v.0"
+ [1]=>
+ string(3) "v.1"
+ [2]=>
+ string(3) "v.2"
+ [3]=>
+ string(5) "new.0"
+ [4]=>
+ string(5) "new.1"
+ [5]=>
+ string(5) "new.2"
+}
+
+---( Array with 4 element(s): )---
+--> State of referenced array before loop:
+array(4) {
+ [0]=>
+ string(3) "v.0"
+ [1]=>
+ string(3) "v.1"
+ [2]=>
+ string(3) "v.2"
+ [3]=>
+ string(3) "v.3"
+}
+--> Do loop:
+ iteration 0: $k=0; $v=v.0
+ iteration 1: $k=1; $v=v.1
+ iteration 2: $k=2; $v=v.2
+ iteration 3: $k=3; $v=v.3
+--> State of array after loop:
+array(8) {
+ [0]=>
+ string(3) "v.0"
+ [1]=>
+ string(3) "v.1"
+ [2]=>
+ string(3) "v.2"
+ [3]=>
+ string(3) "v.3"
+ [4]=>
+ string(5) "new.0"
+ [5]=>
+ string(5) "new.1"
+ [6]=>
+ string(5) "new.2"
+ [7]=>
+ string(5) "new.3"
+}
+
+
+
+Adding elements to the start of a referenced array
+---( Array with 1 element(s): )---
+--> State of referenced array before loop:
+array(1) {
+ [0]=>
+ string(3) "v.0"
+}
+--> Do loop:
+ iteration 0: $k=0; $v=v.0
+--> State of array after loop:
+array(2) {
+ [0]=>
+ string(5) "new.0"
+ [1]=>
+ string(3) "v.0"
+}
+
+---( Array with 2 element(s): )---
+--> State of referenced array before loop:
+array(2) {
+ [0]=>
+ string(3) "v.0"
+ [1]=>
+ string(3) "v.1"
+}
+--> Do loop:
+ iteration 0: $k=0; $v=v.0
+ iteration 1: $k=1; $v=v.1
+--> State of array after loop:
+array(4) {
+ [0]=>
+ string(5) "new.1"
+ [1]=>
+ string(5) "new.0"
+ [2]=>
+ string(3) "v.0"
+ [3]=>
+ string(3) "v.1"
+}
+
+---( Array with 3 element(s): )---
+--> State of referenced array before loop:
+array(3) {
+ [0]=>
+ string(3) "v.0"
+ [1]=>
+ string(3) "v.1"
+ [2]=>
+ string(3) "v.2"
+}
+--> Do loop:
+ iteration 0: $k=0; $v=v.0
+ iteration 1: $k=1; $v=v.1
+ iteration 2: $k=2; $v=v.2
+--> State of array after loop:
+array(6) {
+ [0]=>
+ string(5) "new.2"
+ [1]=>
+ string(5) "new.1"
+ [2]=>
+ string(5) "new.0"
+ [3]=>
+ string(3) "v.0"
+ [4]=>
+ string(3) "v.1"
+ [5]=>
+ string(3) "v.2"
+}
+
+---( Array with 4 element(s): )---
+--> State of referenced array before loop:
+array(4) {
+ [0]=>
+ string(3) "v.0"
+ [1]=>
+ string(3) "v.1"
+ [2]=>
+ string(3) "v.2"
+ [3]=>
+ string(3) "v.3"
+}
+--> Do loop:
+ iteration 0: $k=0; $v=v.0
+ iteration 1: $k=1; $v=v.1
+ iteration 2: $k=2; $v=v.2
+ iteration 3: $k=3; $v=v.3
+--> State of array after loop:
+array(8) {
+ [0]=>
+ string(5) "new.3"
+ [1]=>
+ string(5) "new.2"
+ [2]=>
+ string(5) "new.1"
+ [3]=>
+ string(5) "new.0"
+ [4]=>
+ string(3) "v.0"
+ [5]=>
+ string(3) "v.1"
+ [6]=>
+ string(3) "v.2"
+ [7]=>
+ string(3) "v.3"
+}
diff --git a/tests/lang/foreachLoop.015.phpt b/tests/lang/foreachLoop.015.phpt
index a4ee09d6a9..f7f5389395 100644
--- a/tests/lang/foreachLoop.015.phpt
+++ b/tests/lang/foreachLoop.015.phpt
@@ -1,537 +1,537 @@
---TEST--
-Directly modifying a REFERENCED array when foreach'ing over it while using &$value syntax.
---FILE--
-<?php
-
-define('MAX_LOOPS',5);
-
-function withRefValue($elements, $transform) {
- echo "\n---( Array with $elements element(s): )---\n";
- //Build array:
- for ($i=0; $i<$elements; $i++) {
- $a[] = "v.$i";
- }
- $counter=0;
-
- $ref = &$a;
-
- echo "--> State of referenced array before loop:\n";
- var_dump($a);
-
- echo "--> Do loop:\n";
- foreach ($a as $k=>&$v) {
- echo " iteration $counter: \$k=$k; \$v=$v\n";
- eval($transform);
- $counter++;
- if ($counter>MAX_LOOPS) {
- echo " ** Stuck in a loop! **\n";
- break;
- }
- }
-
- echo "--> State of array after loop:\n";
- var_dump($a);
-}
-
-
-echo "\nPopping elements off end of a referenced array, using &\$value";
-$transform = 'array_pop($a);';
-withRefValue(1, $transform);
-withRefValue(2, $transform);
-withRefValue(3, $transform);
-withRefValue(4, $transform);
-
-echo "\n\n\nShift elements off start of a referenced array, using &\$value";
-$transform = 'array_shift($a);';
-withRefValue(1, $transform);
-withRefValue(2, $transform);
-withRefValue(3, $transform);
-withRefValue(4, $transform);
-
-echo "\n\n\nRemove current element of a referenced array, using &\$value";
-$transform = 'unset($a[$k]);';
-withRefValue(1, $transform);
-withRefValue(2, $transform);
-withRefValue(3, $transform);
-withRefValue(4, $transform);
-
-echo "\n\n\nAdding elements to the end of a referenced array, using &\$value";
-$transform = 'array_push($a, "new.$counter");';
-withRefValue(1, $transform);
-withRefValue(2, $transform);
-withRefValue(3, $transform);
-withRefValue(4, $transform);
-
-echo "\n\n\nAdding elements to the start of a referenced array, using &\$value";
-$transform = 'array_unshift($a, "new.$counter");';
-withRefValue(1, $transform);
-withRefValue(2, $transform);
-withRefValue(3, $transform);
-withRefValue(4, $transform);
-
-?>
---EXPECT--
-
-Popping elements off end of a referenced array, using &$value
----( Array with 1 element(s): )---
---> State of referenced array before loop:
-array(1) {
- [0]=>
- string(3) "v.0"
-}
---> Do loop:
- iteration 0: $k=0; $v=v.0
---> State of array after loop:
-array(0) {
-}
-
----( Array with 2 element(s): )---
---> State of referenced array before loop:
-array(2) {
- [0]=>
- string(3) "v.0"
- [1]=>
- string(3) "v.1"
-}
---> Do loop:
- iteration 0: $k=0; $v=v.0
---> State of array after loop:
-array(1) {
- [0]=>
- &string(3) "v.0"
-}
-
----( Array with 3 element(s): )---
---> State of referenced array before loop:
-array(3) {
- [0]=>
- string(3) "v.0"
- [1]=>
- string(3) "v.1"
- [2]=>
- string(3) "v.2"
-}
---> Do loop:
- iteration 0: $k=0; $v=v.0
- iteration 1: $k=1; $v=v.1
---> State of array after loop:
-array(1) {
- [0]=>
- string(3) "v.0"
-}
-
----( Array with 4 element(s): )---
---> State of referenced array before loop:
-array(4) {
- [0]=>
- string(3) "v.0"
- [1]=>
- string(3) "v.1"
- [2]=>
- string(3) "v.2"
- [3]=>
- string(3) "v.3"
-}
---> Do loop:
- iteration 0: $k=0; $v=v.0
- iteration 1: $k=1; $v=v.1
---> State of array after loop:
-array(2) {
- [0]=>
- string(3) "v.0"
- [1]=>
- &string(3) "v.1"
-}
-
-
-
-Shift elements off start of a referenced array, using &$value
----( Array with 1 element(s): )---
---> State of referenced array before loop:
-array(1) {
- [0]=>
- string(3) "v.0"
-}
---> Do loop:
- iteration 0: $k=0; $v=v.0
---> State of array after loop:
-array(0) {
-}
-
----( Array with 2 element(s): )---
---> State of referenced array before loop:
-array(2) {
- [0]=>
- string(3) "v.0"
- [1]=>
- string(3) "v.1"
-}
---> Do loop:
- iteration 0: $k=0; $v=v.0
- iteration 1: $k=0; $v=v.1
---> State of array after loop:
-array(0) {
-}
-
----( Array with 3 element(s): )---
---> State of referenced array before loop:
-array(3) {
- [0]=>
- string(3) "v.0"
- [1]=>
- string(3) "v.1"
- [2]=>
- string(3) "v.2"
-}
---> Do loop:
- iteration 0: $k=0; $v=v.0
- iteration 1: $k=0; $v=v.1
- iteration 2: $k=0; $v=v.2
---> State of array after loop:
-array(0) {
-}
-
----( Array with 4 element(s): )---
---> State of referenced array before loop:
-array(4) {
- [0]=>
- string(3) "v.0"
- [1]=>
- string(3) "v.1"
- [2]=>
- string(3) "v.2"
- [3]=>
- string(3) "v.3"
-}
---> Do loop:
- iteration 0: $k=0; $v=v.0
- iteration 1: $k=0; $v=v.1
- iteration 2: $k=0; $v=v.2
- iteration 3: $k=0; $v=v.3
---> State of array after loop:
-array(0) {
-}
-
-
-
-Remove current element of a referenced array, using &$value
----( Array with 1 element(s): )---
---> State of referenced array before loop:
-array(1) {
- [0]=>
- string(3) "v.0"
-}
---> Do loop:
- iteration 0: $k=0; $v=v.0
---> State of array after loop:
-array(0) {
-}
-
----( Array with 2 element(s): )---
---> State of referenced array before loop:
-array(2) {
- [0]=>
- string(3) "v.0"
- [1]=>
- string(3) "v.1"
-}
---> Do loop:
- iteration 0: $k=0; $v=v.0
- iteration 1: $k=1; $v=v.1
---> State of array after loop:
-array(0) {
-}
-
----( Array with 3 element(s): )---
---> State of referenced array before loop:
-array(3) {
- [0]=>
- string(3) "v.0"
- [1]=>
- string(3) "v.1"
- [2]=>
- string(3) "v.2"
-}
---> Do loop:
- iteration 0: $k=0; $v=v.0
- iteration 1: $k=1; $v=v.1
- iteration 2: $k=2; $v=v.2
---> State of array after loop:
-array(0) {
-}
-
----( Array with 4 element(s): )---
---> State of referenced array before loop:
-array(4) {
- [0]=>
- string(3) "v.0"
- [1]=>
- string(3) "v.1"
- [2]=>
- string(3) "v.2"
- [3]=>
- string(3) "v.3"
-}
---> Do loop:
- iteration 0: $k=0; $v=v.0
- iteration 1: $k=1; $v=v.1
- iteration 2: $k=2; $v=v.2
- iteration 3: $k=3; $v=v.3
---> State of array after loop:
-array(0) {
-}
-
-
-
-Adding elements to the end of a referenced array, using &$value
----( Array with 1 element(s): )---
---> State of referenced array before loop:
-array(1) {
- [0]=>
- string(3) "v.0"
-}
---> Do loop:
- iteration 0: $k=0; $v=v.0
- iteration 1: $k=1; $v=new.0
- iteration 2: $k=2; $v=new.1
- iteration 3: $k=3; $v=new.2
- iteration 4: $k=4; $v=new.3
- iteration 5: $k=5; $v=new.4
- ** Stuck in a loop! **
---> State of array after loop:
-array(7) {
- [0]=>
- string(3) "v.0"
- [1]=>
- string(5) "new.0"
- [2]=>
- string(5) "new.1"
- [3]=>
- string(5) "new.2"
- [4]=>
- string(5) "new.3"
- [5]=>
- &string(5) "new.4"
- [6]=>
- string(5) "new.5"
-}
-
----( Array with 2 element(s): )---
---> State of referenced array before loop:
-array(2) {
- [0]=>
- string(3) "v.0"
- [1]=>
- string(3) "v.1"
-}
---> Do loop:
- iteration 0: $k=0; $v=v.0
- iteration 1: $k=1; $v=v.1
- iteration 2: $k=2; $v=new.0
- iteration 3: $k=3; $v=new.1
- iteration 4: $k=4; $v=new.2
- iteration 5: $k=5; $v=new.3
- ** Stuck in a loop! **
---> State of array after loop:
-array(8) {
- [0]=>
- string(3) "v.0"
- [1]=>
- string(3) "v.1"
- [2]=>
- string(5) "new.0"
- [3]=>
- string(5) "new.1"
- [4]=>
- string(5) "new.2"
- [5]=>
- &string(5) "new.3"
- [6]=>
- string(5) "new.4"
- [7]=>
- string(5) "new.5"
-}
-
----( Array with 3 element(s): )---
---> State of referenced array before loop:
-array(3) {
- [0]=>
- string(3) "v.0"
- [1]=>
- string(3) "v.1"
- [2]=>
- string(3) "v.2"
-}
---> Do loop:
- iteration 0: $k=0; $v=v.0
- iteration 1: $k=1; $v=v.1
- iteration 2: $k=2; $v=v.2
- iteration 3: $k=3; $v=new.0
- iteration 4: $k=4; $v=new.1
- iteration 5: $k=5; $v=new.2
- ** Stuck in a loop! **
---> State of array after loop:
-array(9) {
- [0]=>
- string(3) "v.0"
- [1]=>
- string(3) "v.1"
- [2]=>
- string(3) "v.2"
- [3]=>
- string(5) "new.0"
- [4]=>
- string(5) "new.1"
- [5]=>
- &string(5) "new.2"
- [6]=>
- string(5) "new.3"
- [7]=>
- string(5) "new.4"
- [8]=>
- string(5) "new.5"
-}
-
----( Array with 4 element(s): )---
---> State of referenced array before loop:
-array(4) {
- [0]=>
- string(3) "v.0"
- [1]=>
- string(3) "v.1"
- [2]=>
- string(3) "v.2"
- [3]=>
- string(3) "v.3"
-}
---> Do loop:
- iteration 0: $k=0; $v=v.0
- iteration 1: $k=1; $v=v.1
- iteration 2: $k=2; $v=v.2
- iteration 3: $k=3; $v=v.3
- iteration 4: $k=4; $v=new.0
- iteration 5: $k=5; $v=new.1
- ** Stuck in a loop! **
---> State of array after loop:
-array(10) {
- [0]=>
- string(3) "v.0"
- [1]=>
- string(3) "v.1"
- [2]=>
- string(3) "v.2"
- [3]=>
- string(3) "v.3"
- [4]=>
- string(5) "new.0"
- [5]=>
- &string(5) "new.1"
- [6]=>
- string(5) "new.2"
- [7]=>
- string(5) "new.3"
- [8]=>
- string(5) "new.4"
- [9]=>
- string(5) "new.5"
-}
-
-
-
-Adding elements to the start of a referenced array, using &$value
----( Array with 1 element(s): )---
---> State of referenced array before loop:
-array(1) {
- [0]=>
- string(3) "v.0"
-}
---> Do loop:
- iteration 0: $k=0; $v=v.0
---> State of array after loop:
-array(2) {
- [0]=>
- string(5) "new.0"
- [1]=>
- &string(3) "v.0"
-}
-
----( Array with 2 element(s): )---
---> State of referenced array before loop:
-array(2) {
- [0]=>
- string(3) "v.0"
- [1]=>
- string(3) "v.1"
-}
---> Do loop:
- iteration 0: $k=0; $v=v.0
- iteration 1: $k=2; $v=v.1
---> State of array after loop:
-array(4) {
- [0]=>
- string(5) "new.1"
- [1]=>
- string(5) "new.0"
- [2]=>
- string(3) "v.0"
- [3]=>
- &string(3) "v.1"
-}
-
----( Array with 3 element(s): )---
---> State of referenced array before loop:
-array(3) {
- [0]=>
- string(3) "v.0"
- [1]=>
- string(3) "v.1"
- [2]=>
- string(3) "v.2"
-}
---> Do loop:
- iteration 0: $k=0; $v=v.0
- iteration 1: $k=3; $v=v.2
---> State of array after loop:
-array(5) {
- [0]=>
- string(5) "new.1"
- [1]=>
- string(5) "new.0"
- [2]=>
- string(3) "v.0"
- [3]=>
- string(3) "v.1"
- [4]=>
- &string(3) "v.2"
-}
-
----( Array with 4 element(s): )---
---> State of referenced array before loop:
-array(4) {
- [0]=>
- string(3) "v.0"
- [1]=>
- string(3) "v.1"
- [2]=>
- string(3) "v.2"
- [3]=>
- string(3) "v.3"
-}
---> Do loop:
- iteration 0: $k=0; $v=v.0
- iteration 1: $k=4; $v=v.3
---> State of array after loop:
-array(6) {
- [0]=>
- string(5) "new.1"
- [1]=>
- string(5) "new.0"
- [2]=>
- string(3) "v.0"
- [3]=>
- string(3) "v.1"
- [4]=>
- string(3) "v.2"
- [5]=>
- &string(3) "v.3"
-}
+--TEST--
+Directly modifying a REFERENCED array when foreach'ing over it while using &$value syntax.
+--FILE--
+<?php
+
+define('MAX_LOOPS',5);
+
+function withRefValue($elements, $transform) {
+ echo "\n---( Array with $elements element(s): )---\n";
+ //Build array:
+ for ($i=0; $i<$elements; $i++) {
+ $a[] = "v.$i";
+ }
+ $counter=0;
+
+ $ref = &$a;
+
+ echo "--> State of referenced array before loop:\n";
+ var_dump($a);
+
+ echo "--> Do loop:\n";
+ foreach ($a as $k=>&$v) {
+ echo " iteration $counter: \$k=$k; \$v=$v\n";
+ eval($transform);
+ $counter++;
+ if ($counter>MAX_LOOPS) {
+ echo " ** Stuck in a loop! **\n";
+ break;
+ }
+ }
+
+ echo "--> State of array after loop:\n";
+ var_dump($a);
+}
+
+
+echo "\nPopping elements off end of a referenced array, using &\$value";
+$transform = 'array_pop($a);';
+withRefValue(1, $transform);
+withRefValue(2, $transform);
+withRefValue(3, $transform);
+withRefValue(4, $transform);
+
+echo "\n\n\nShift elements off start of a referenced array, using &\$value";
+$transform = 'array_shift($a);';
+withRefValue(1, $transform);
+withRefValue(2, $transform);
+withRefValue(3, $transform);
+withRefValue(4, $transform);
+
+echo "\n\n\nRemove current element of a referenced array, using &\$value";
+$transform = 'unset($a[$k]);';
+withRefValue(1, $transform);
+withRefValue(2, $transform);
+withRefValue(3, $transform);
+withRefValue(4, $transform);
+
+echo "\n\n\nAdding elements to the end of a referenced array, using &\$value";
+$transform = 'array_push($a, "new.$counter");';
+withRefValue(1, $transform);
+withRefValue(2, $transform);
+withRefValue(3, $transform);
+withRefValue(4, $transform);
+
+echo "\n\n\nAdding elements to the start of a referenced array, using &\$value";
+$transform = 'array_unshift($a, "new.$counter");';
+withRefValue(1, $transform);
+withRefValue(2, $transform);
+withRefValue(3, $transform);
+withRefValue(4, $transform);
+
+?>
+--EXPECT--
+
+Popping elements off end of a referenced array, using &$value
+---( Array with 1 element(s): )---
+--> State of referenced array before loop:
+array(1) {
+ [0]=>
+ string(3) "v.0"
+}
+--> Do loop:
+ iteration 0: $k=0; $v=v.0
+--> State of array after loop:
+array(0) {
+}
+
+---( Array with 2 element(s): )---
+--> State of referenced array before loop:
+array(2) {
+ [0]=>
+ string(3) "v.0"
+ [1]=>
+ string(3) "v.1"
+}
+--> Do loop:
+ iteration 0: $k=0; $v=v.0
+--> State of array after loop:
+array(1) {
+ [0]=>
+ &string(3) "v.0"
+}
+
+---( Array with 3 element(s): )---
+--> State of referenced array before loop:
+array(3) {
+ [0]=>
+ string(3) "v.0"
+ [1]=>
+ string(3) "v.1"
+ [2]=>
+ string(3) "v.2"
+}
+--> Do loop:
+ iteration 0: $k=0; $v=v.0
+ iteration 1: $k=1; $v=v.1
+--> State of array after loop:
+array(1) {
+ [0]=>
+ string(3) "v.0"
+}
+
+---( Array with 4 element(s): )---
+--> State of referenced array before loop:
+array(4) {
+ [0]=>
+ string(3) "v.0"
+ [1]=>
+ string(3) "v.1"
+ [2]=>
+ string(3) "v.2"
+ [3]=>
+ string(3) "v.3"
+}
+--> Do loop:
+ iteration 0: $k=0; $v=v.0
+ iteration 1: $k=1; $v=v.1
+--> State of array after loop:
+array(2) {
+ [0]=>
+ string(3) "v.0"
+ [1]=>
+ &string(3) "v.1"
+}
+
+
+
+Shift elements off start of a referenced array, using &$value
+---( Array with 1 element(s): )---
+--> State of referenced array before loop:
+array(1) {
+ [0]=>
+ string(3) "v.0"
+}
+--> Do loop:
+ iteration 0: $k=0; $v=v.0
+--> State of array after loop:
+array(0) {
+}
+
+---( Array with 2 element(s): )---
+--> State of referenced array before loop:
+array(2) {
+ [0]=>
+ string(3) "v.0"
+ [1]=>
+ string(3) "v.1"
+}
+--> Do loop:
+ iteration 0: $k=0; $v=v.0
+ iteration 1: $k=0; $v=v.1
+--> State of array after loop:
+array(0) {
+}
+
+---( Array with 3 element(s): )---
+--> State of referenced array before loop:
+array(3) {
+ [0]=>
+ string(3) "v.0"
+ [1]=>
+ string(3) "v.1"
+ [2]=>
+ string(3) "v.2"
+}
+--> Do loop:
+ iteration 0: $k=0; $v=v.0
+ iteration 1: $k=0; $v=v.1
+ iteration 2: $k=0; $v=v.2
+--> State of array after loop:
+array(0) {
+}
+
+---( Array with 4 element(s): )---
+--> State of referenced array before loop:
+array(4) {
+ [0]=>
+ string(3) "v.0"
+ [1]=>
+ string(3) "v.1"
+ [2]=>
+ string(3) "v.2"
+ [3]=>
+ string(3) "v.3"
+}
+--> Do loop:
+ iteration 0: $k=0; $v=v.0
+ iteration 1: $k=0; $v=v.1
+ iteration 2: $k=0; $v=v.2
+ iteration 3: $k=0; $v=v.3
+--> State of array after loop:
+array(0) {
+}
+
+
+
+Remove current element of a referenced array, using &$value
+---( Array with 1 element(s): )---
+--> State of referenced array before loop:
+array(1) {
+ [0]=>
+ string(3) "v.0"
+}
+--> Do loop:
+ iteration 0: $k=0; $v=v.0
+--> State of array after loop:
+array(0) {
+}
+
+---( Array with 2 element(s): )---
+--> State of referenced array before loop:
+array(2) {
+ [0]=>
+ string(3) "v.0"
+ [1]=>
+ string(3) "v.1"
+}
+--> Do loop:
+ iteration 0: $k=0; $v=v.0
+ iteration 1: $k=1; $v=v.1
+--> State of array after loop:
+array(0) {
+}
+
+---( Array with 3 element(s): )---
+--> State of referenced array before loop:
+array(3) {
+ [0]=>
+ string(3) "v.0"
+ [1]=>
+ string(3) "v.1"
+ [2]=>
+ string(3) "v.2"
+}
+--> Do loop:
+ iteration 0: $k=0; $v=v.0
+ iteration 1: $k=1; $v=v.1
+ iteration 2: $k=2; $v=v.2
+--> State of array after loop:
+array(0) {
+}
+
+---( Array with 4 element(s): )---
+--> State of referenced array before loop:
+array(4) {
+ [0]=>
+ string(3) "v.0"
+ [1]=>
+ string(3) "v.1"
+ [2]=>
+ string(3) "v.2"
+ [3]=>
+ string(3) "v.3"
+}
+--> Do loop:
+ iteration 0: $k=0; $v=v.0
+ iteration 1: $k=1; $v=v.1
+ iteration 2: $k=2; $v=v.2
+ iteration 3: $k=3; $v=v.3
+--> State of array after loop:
+array(0) {
+}
+
+
+
+Adding elements to the end of a referenced array, using &$value
+---( Array with 1 element(s): )---
+--> State of referenced array before loop:
+array(1) {
+ [0]=>
+ string(3) "v.0"
+}
+--> Do loop:
+ iteration 0: $k=0; $v=v.0
+ iteration 1: $k=1; $v=new.0
+ iteration 2: $k=2; $v=new.1
+ iteration 3: $k=3; $v=new.2
+ iteration 4: $k=4; $v=new.3
+ iteration 5: $k=5; $v=new.4
+ ** Stuck in a loop! **
+--> State of array after loop:
+array(7) {
+ [0]=>
+ string(3) "v.0"
+ [1]=>
+ string(5) "new.0"
+ [2]=>
+ string(5) "new.1"
+ [3]=>
+ string(5) "new.2"
+ [4]=>
+ string(5) "new.3"
+ [5]=>
+ &string(5) "new.4"
+ [6]=>
+ string(5) "new.5"
+}
+
+---( Array with 2 element(s): )---
+--> State of referenced array before loop:
+array(2) {
+ [0]=>
+ string(3) "v.0"
+ [1]=>
+ string(3) "v.1"
+}
+--> Do loop:
+ iteration 0: $k=0; $v=v.0
+ iteration 1: $k=1; $v=v.1
+ iteration 2: $k=2; $v=new.0
+ iteration 3: $k=3; $v=new.1
+ iteration 4: $k=4; $v=new.2
+ iteration 5: $k=5; $v=new.3
+ ** Stuck in a loop! **
+--> State of array after loop:
+array(8) {
+ [0]=>
+ string(3) "v.0"
+ [1]=>
+ string(3) "v.1"
+ [2]=>
+ string(5) "new.0"
+ [3]=>
+ string(5) "new.1"
+ [4]=>
+ string(5) "new.2"
+ [5]=>
+ &string(5) "new.3"
+ [6]=>
+ string(5) "new.4"
+ [7]=>
+ string(5) "new.5"
+}
+
+---( Array with 3 element(s): )---
+--> State of referenced array before loop:
+array(3) {
+ [0]=>
+ string(3) "v.0"
+ [1]=>
+ string(3) "v.1"
+ [2]=>
+ string(3) "v.2"
+}
+--> Do loop:
+ iteration 0: $k=0; $v=v.0
+ iteration 1: $k=1; $v=v.1
+ iteration 2: $k=2; $v=v.2
+ iteration 3: $k=3; $v=new.0
+ iteration 4: $k=4; $v=new.1
+ iteration 5: $k=5; $v=new.2
+ ** Stuck in a loop! **
+--> State of array after loop:
+array(9) {
+ [0]=>
+ string(3) "v.0"
+ [1]=>
+ string(3) "v.1"
+ [2]=>
+ string(3) "v.2"
+ [3]=>
+ string(5) "new.0"
+ [4]=>
+ string(5) "new.1"
+ [5]=>
+ &string(5) "new.2"
+ [6]=>
+ string(5) "new.3"
+ [7]=>
+ string(5) "new.4"
+ [8]=>
+ string(5) "new.5"
+}
+
+---( Array with 4 element(s): )---
+--> State of referenced array before loop:
+array(4) {
+ [0]=>
+ string(3) "v.0"
+ [1]=>
+ string(3) "v.1"
+ [2]=>
+ string(3) "v.2"
+ [3]=>
+ string(3) "v.3"
+}
+--> Do loop:
+ iteration 0: $k=0; $v=v.0
+ iteration 1: $k=1; $v=v.1
+ iteration 2: $k=2; $v=v.2
+ iteration 3: $k=3; $v=v.3
+ iteration 4: $k=4; $v=new.0
+ iteration 5: $k=5; $v=new.1
+ ** Stuck in a loop! **
+--> State of array after loop:
+array(10) {
+ [0]=>
+ string(3) "v.0"
+ [1]=>
+ string(3) "v.1"
+ [2]=>
+ string(3) "v.2"
+ [3]=>
+ string(3) "v.3"
+ [4]=>
+ string(5) "new.0"
+ [5]=>
+ &string(5) "new.1"
+ [6]=>
+ string(5) "new.2"
+ [7]=>
+ string(5) "new.3"
+ [8]=>
+ string(5) "new.4"
+ [9]=>
+ string(5) "new.5"
+}
+
+
+
+Adding elements to the start of a referenced array, using &$value
+---( Array with 1 element(s): )---
+--> State of referenced array before loop:
+array(1) {
+ [0]=>
+ string(3) "v.0"
+}
+--> Do loop:
+ iteration 0: $k=0; $v=v.0
+--> State of array after loop:
+array(2) {
+ [0]=>
+ string(5) "new.0"
+ [1]=>
+ &string(3) "v.0"
+}
+
+---( Array with 2 element(s): )---
+--> State of referenced array before loop:
+array(2) {
+ [0]=>
+ string(3) "v.0"
+ [1]=>
+ string(3) "v.1"
+}
+--> Do loop:
+ iteration 0: $k=0; $v=v.0
+ iteration 1: $k=2; $v=v.1
+--> State of array after loop:
+array(4) {
+ [0]=>
+ string(5) "new.1"
+ [1]=>
+ string(5) "new.0"
+ [2]=>
+ string(3) "v.0"
+ [3]=>
+ &string(3) "v.1"
+}
+
+---( Array with 3 element(s): )---
+--> State of referenced array before loop:
+array(3) {
+ [0]=>
+ string(3) "v.0"
+ [1]=>
+ string(3) "v.1"
+ [2]=>
+ string(3) "v.2"
+}
+--> Do loop:
+ iteration 0: $k=0; $v=v.0
+ iteration 1: $k=3; $v=v.2
+--> State of array after loop:
+array(5) {
+ [0]=>
+ string(5) "new.1"
+ [1]=>
+ string(5) "new.0"
+ [2]=>
+ string(3) "v.0"
+ [3]=>
+ string(3) "v.1"
+ [4]=>
+ &string(3) "v.2"
+}
+
+---( Array with 4 element(s): )---
+--> State of referenced array before loop:
+array(4) {
+ [0]=>
+ string(3) "v.0"
+ [1]=>
+ string(3) "v.1"
+ [2]=>
+ string(3) "v.2"
+ [3]=>
+ string(3) "v.3"
+}
+--> Do loop:
+ iteration 0: $k=0; $v=v.0
+ iteration 1: $k=4; $v=v.3
+--> State of array after loop:
+array(6) {
+ [0]=>
+ string(5) "new.1"
+ [1]=>
+ string(5) "new.0"
+ [2]=>
+ string(3) "v.0"
+ [3]=>
+ string(3) "v.1"
+ [4]=>
+ string(3) "v.2"
+ [5]=>
+ &string(3) "v.3"
+}
diff --git a/tests/lang/foreachLoop.016.phpt b/tests/lang/foreachLoop.016.phpt
index d570aba316..91c96f694d 100644
--- a/tests/lang/foreachLoop.016.phpt
+++ b/tests/lang/foreachLoop.016.phpt
@@ -1,206 +1,206 @@
---TEST--
-Ensure foreach splits the iterated entity from its cow reference set, for all sorts of iterated entities.
---FILE--
-<?php
- error_reporting(E_ALL & ~E_STRICT);
-
- echo "\n" . '$a' . "\n";
- $b = $a = array('original');
- foreach($a as $k=>&$v) {
- $v = 'changed';
- }
- var_dump($b);
- unset($a, $b);
-
- echo "\n" . '${\'a\'}' . "\n";
- $b = $a = array('original');
- foreach(${'a'} as $k=>&$v) {
- $v = 'changed';
- }
- var_dump($b);
- unset($a, $b);
-
- echo "\n" . '$$a' . "\n";
- $a = 'blah';
- $$a = array('original');
- $b = $$a;
- foreach($$a as $k=>&$v) {
- $v = 'changed';
- }
- var_dump($b);
- unset($a, $b);
-
- echo "\n" . '$a[0]' . "\n";
- $b = $a[0] = array('original');
- foreach($a[0] as $k=>&$v) {
- $v = 'changed';
- }
- var_dump($b);
- unset($a, $b);
-
- echo "\n" . '$a[0][0]' . "\n";
- $b = $a[0][0] = array('original');
- foreach($a[0][0] as $k=>&$v) {
- $v = 'changed';
- }
- var_dump($b);
- unset($a, $b);
-
- echo "\n" . '$a->b' . "\n";
- $b = $a->b = array('original');
- foreach($a->b as $k=>&$v) {
- $v = 'changed';
- }
- var_dump($b);
- unset($a, $b);
-
- echo "\n" . '$a->b->c' . "\n";
- $b = $a->b->c = array('original');
- foreach($a->b as $k=>&$v) {
- $v = 'changed';
- }
- var_dump($b);
- unset($a, $b);
-
- echo "\n" . '$a->b[0]' . "\n";
- $b = $a->b[0] = array('original');
- foreach($a->b[0] as $k=>&$v) {
- $v = 'changed';
- }
- var_dump($b);
- unset($a, $b);
-
- echo "\n" . '$a->b[0][0]' . "\n";
- $b = $a->b[0][0] = array('original');
- foreach($a->b[0][0] as $k=>&$v) {
- $v = 'changed';
- }
- var_dump($b);
- unset($a, $b);
-
- echo "\n" . '$a->b[0]->c' . "\n";
- $b = $a->b[0]->c = array('original');
- foreach($a->b[0]->c as $k=>&$v) {
- $v = 'changed';
- }
- var_dump($b);
- unset($a, $b);
-
- class C {
- public static $a;
- }
-
- echo "\n" . 'C::$a' . "\n";
- C::$a = array('original');
- $b = C::$a;
- foreach(C::$a as $k=>&$v) {
- $v = 'changed';
- }
- var_dump($b);
- unset($a, $b);
-
- echo "\n" . 'C::$a[0]' . "\n";
- C::$a[0] = array('original');
- $b = C::$a[0];
- foreach(C::$a[0] as $k=>&$v) {
- $v = 'changed';
- }
- var_dump($b);
- unset(C::$a[0], $b);
-
- echo "\n" . 'C::$a[0]->b' . "\n";
- C::$a[0]->b = array('original');
- $b = C::$a[0]->b;
- foreach(C::$a[0]->b as $k=>&$v) {
- $v = 'changed';
- }
- var_dump($b);
- unset(C::$a[0]->b, $b);
-?>
---EXPECTF--
-
-$a
-array(1) {
- [0]=>
- string(8) "original"
-}
-
-${'a'}
-array(1) {
- [0]=>
- string(8) "original"
-}
-
-$$a
-array(1) {
- [0]=>
- string(8) "original"
-}
-
-$a[0]
-array(1) {
- [0]=>
- string(8) "original"
-}
-
-$a[0][0]
-array(1) {
- [0]=>
- string(8) "original"
-}
-
-$a->b
-
-Warning: Creating default object from empty value in %s on line %d
-array(1) {
- [0]=>
- string(8) "original"
-}
-
-$a->b->c
-
-Warning: Creating default object from empty value in %s on line %d
-array(1) {
- [0]=>
- string(8) "original"
-}
-
-$a->b[0]
-array(1) {
- [0]=>
- string(8) "original"
-}
-
-$a->b[0][0]
-array(1) {
- [0]=>
- string(8) "original"
-}
-
-$a->b[0]->c
-
-Warning: Creating default object from empty value in %s on line %d
-array(1) {
- [0]=>
- string(8) "original"
-}
-
-C::$a
-array(1) {
- [0]=>
- string(8) "original"
-}
-
-C::$a[0]
-array(1) {
- [0]=>
- string(8) "original"
-}
-
-C::$a[0]->b
-
-Warning: Creating default object from empty value in %s on line %d
-array(1) {
- [0]=>
- string(8) "original"
-}
+--TEST--
+Ensure foreach splits the iterated entity from its cow reference set, for all sorts of iterated entities.
+--FILE--
+<?php
+ error_reporting(E_ALL & ~E_STRICT);
+
+ echo "\n" . '$a' . "\n";
+ $b = $a = array('original');
+ foreach($a as $k=>&$v) {
+ $v = 'changed';
+ }
+ var_dump($b);
+ unset($a, $b);
+
+ echo "\n" . '${\'a\'}' . "\n";
+ $b = $a = array('original');
+ foreach(${'a'} as $k=>&$v) {
+ $v = 'changed';
+ }
+ var_dump($b);
+ unset($a, $b);
+
+ echo "\n" . '$$a' . "\n";
+ $a = 'blah';
+ $$a = array('original');
+ $b = $$a;
+ foreach($$a as $k=>&$v) {
+ $v = 'changed';
+ }
+ var_dump($b);
+ unset($a, $b);
+
+ echo "\n" . '$a[0]' . "\n";
+ $b = $a[0] = array('original');
+ foreach($a[0] as $k=>&$v) {
+ $v = 'changed';
+ }
+ var_dump($b);
+ unset($a, $b);
+
+ echo "\n" . '$a[0][0]' . "\n";
+ $b = $a[0][0] = array('original');
+ foreach($a[0][0] as $k=>&$v) {
+ $v = 'changed';
+ }
+ var_dump($b);
+ unset($a, $b);
+
+ echo "\n" . '$a->b' . "\n";
+ $b = $a->b = array('original');
+ foreach($a->b as $k=>&$v) {
+ $v = 'changed';
+ }
+ var_dump($b);
+ unset($a, $b);
+
+ echo "\n" . '$a->b->c' . "\n";
+ $b = $a->b->c = array('original');
+ foreach($a->b as $k=>&$v) {
+ $v = 'changed';
+ }
+ var_dump($b);
+ unset($a, $b);
+
+ echo "\n" . '$a->b[0]' . "\n";
+ $b = $a->b[0] = array('original');
+ foreach($a->b[0] as $k=>&$v) {
+ $v = 'changed';
+ }
+ var_dump($b);
+ unset($a, $b);
+
+ echo "\n" . '$a->b[0][0]' . "\n";
+ $b = $a->b[0][0] = array('original');
+ foreach($a->b[0][0] as $k=>&$v) {
+ $v = 'changed';
+ }
+ var_dump($b);
+ unset($a, $b);
+
+ echo "\n" . '$a->b[0]->c' . "\n";
+ $b = $a->b[0]->c = array('original');
+ foreach($a->b[0]->c as $k=>&$v) {
+ $v = 'changed';
+ }
+ var_dump($b);
+ unset($a, $b);
+
+ class C {
+ public static $a;
+ }
+
+ echo "\n" . 'C::$a' . "\n";
+ C::$a = array('original');
+ $b = C::$a;
+ foreach(C::$a as $k=>&$v) {
+ $v = 'changed';
+ }
+ var_dump($b);
+ unset($a, $b);
+
+ echo "\n" . 'C::$a[0]' . "\n";
+ C::$a[0] = array('original');
+ $b = C::$a[0];
+ foreach(C::$a[0] as $k=>&$v) {
+ $v = 'changed';
+ }
+ var_dump($b);
+ unset(C::$a[0], $b);
+
+ echo "\n" . 'C::$a[0]->b' . "\n";
+ C::$a[0]->b = array('original');
+ $b = C::$a[0]->b;
+ foreach(C::$a[0]->b as $k=>&$v) {
+ $v = 'changed';
+ }
+ var_dump($b);
+ unset(C::$a[0]->b, $b);
+?>
+--EXPECTF--
+
+$a
+array(1) {
+ [0]=>
+ string(8) "original"
+}
+
+${'a'}
+array(1) {
+ [0]=>
+ string(8) "original"
+}
+
+$$a
+array(1) {
+ [0]=>
+ string(8) "original"
+}
+
+$a[0]
+array(1) {
+ [0]=>
+ string(8) "original"
+}
+
+$a[0][0]
+array(1) {
+ [0]=>
+ string(8) "original"
+}
+
+$a->b
+
+Warning: Creating default object from empty value in %s on line %d
+array(1) {
+ [0]=>
+ string(8) "original"
+}
+
+$a->b->c
+
+Warning: Creating default object from empty value in %s on line %d
+array(1) {
+ [0]=>
+ string(8) "original"
+}
+
+$a->b[0]
+array(1) {
+ [0]=>
+ string(8) "original"
+}
+
+$a->b[0][0]
+array(1) {
+ [0]=>
+ string(8) "original"
+}
+
+$a->b[0]->c
+
+Warning: Creating default object from empty value in %s on line %d
+array(1) {
+ [0]=>
+ string(8) "original"
+}
+
+C::$a
+array(1) {
+ [0]=>
+ string(8) "original"
+}
+
+C::$a[0]
+array(1) {
+ [0]=>
+ string(8) "original"
+}
+
+C::$a[0]->b
+
+Warning: Creating default object from empty value in %s on line %d
+array(1) {
+ [0]=>
+ string(8) "original"
+}
diff --git a/tests/lang/foreachLoop.017.phpt b/tests/lang/foreachLoop.017.phpt
index 4c3a1f6c3e..987fe3cb27 100644
--- a/tests/lang/foreachLoop.017.phpt
+++ b/tests/lang/foreachLoop.017.phpt
@@ -1,11 +1,11 @@
---TEST--
-Ensure foreach works with arrays with Binary keys.
---FILE--
-<?php
-$a = array ( "\x90" => 10 );
-foreach ($a as $val=>$key) echo $key;
-echo "\nDone\n";
-?>
---EXPECTF--
-10
+--TEST--
+Ensure foreach works with arrays with Binary keys.
+--FILE--
+<?php
+$a = array ( "\x90" => 10 );
+foreach ($a as $val=>$key) echo $key;
+echo "\nDone\n";
+?>
+--EXPECTF--
+10
Done
diff --git a/tests/lang/operators/add_basiclong_64bit.phpt b/tests/lang/operators/add_basiclong_64bit.phpt
index cae8f4f1fb..eb55d5f210 100644
--- a/tests/lang/operators/add_basiclong_64bit.phpt
+++ b/tests/lang/operators/add_basiclong_64bit.phpt
@@ -1,44 +1,44 @@
---TEST--
-Test + operator : 64bit long tests
---SKIPIF--
-<?php
-if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platform only");
-?>
---FILE--
-<?php
-
-define("MAX_64Bit", 9223372036854775807);
-define("MAX_32Bit", 2147483647);
-define("MIN_64Bit", -9223372036854775807 - 1);
-define("MIN_32Bit", -2147483647 - 1);
-
-$longVals = array(
- MAX_64Bit, MIN_64Bit, MAX_32Bit, MIN_32Bit, MAX_64Bit - MAX_32Bit, MIN_64Bit - MIN_32Bit,
- MAX_32Bit + 1, MIN_32Bit - 1, MAX_32Bit * 2, (MAX_32Bit * 2) + 1, (MAX_32Bit * 2) - 1,
- MAX_64Bit -1, MAX_64Bit + 1, MIN_64Bit + 1, MIN_64Bit - 1
-);
-
-$otherVals = array(0, 1, -1, 7, 9, 65, -44, MAX_32Bit, MAX_64Bit);
-
-error_reporting(E_ERROR);
-
-foreach ($longVals as $longVal) {
- foreach($otherVals as $otherVal) {
- echo "--- testing: $longVal + $otherVal ---\n";
- var_dump($longVal+$otherVal);
- }
-}
-
-foreach ($otherVals as $otherVal) {
- foreach($longVals as $longVal) {
- echo "--- testing: $otherVal + $longVal ---\n";
- var_dump($otherVal+$longVal);
- }
-}
-
-?>
-===DONE===
---EXPECT--
+--TEST--
+Test + operator : 64bit long tests
+--SKIPIF--
+<?php
+if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platform only");
+?>
+--FILE--
+<?php
+
+define("MAX_64Bit", 9223372036854775807);
+define("MAX_32Bit", 2147483647);
+define("MIN_64Bit", -9223372036854775807 - 1);
+define("MIN_32Bit", -2147483647 - 1);
+
+$longVals = array(
+ MAX_64Bit, MIN_64Bit, MAX_32Bit, MIN_32Bit, MAX_64Bit - MAX_32Bit, MIN_64Bit - MIN_32Bit,
+ MAX_32Bit + 1, MIN_32Bit - 1, MAX_32Bit * 2, (MAX_32Bit * 2) + 1, (MAX_32Bit * 2) - 1,
+ MAX_64Bit -1, MAX_64Bit + 1, MIN_64Bit + 1, MIN_64Bit - 1
+);
+
+$otherVals = array(0, 1, -1, 7, 9, 65, -44, MAX_32Bit, MAX_64Bit);
+
+error_reporting(E_ERROR);
+
+foreach ($longVals as $longVal) {
+ foreach($otherVals as $otherVal) {
+ echo "--- testing: $longVal + $otherVal ---\n";
+ var_dump($longVal+$otherVal);
+ }
+}
+
+foreach ($otherVals as $otherVal) {
+ foreach($longVals as $longVal) {
+ echo "--- testing: $otherVal + $longVal ---\n";
+ var_dump($otherVal+$longVal);
+ }
+}
+
+?>
+===DONE===
+--EXPECT--
--- testing: 9223372036854775807 + 0 ---
int(9223372036854775807)
--- testing: 9223372036854775807 + 1 ---
@@ -578,5 +578,5 @@ float(1.844674407371E+19)
--- testing: 9223372036854775807 + -9223372036854775807 ---
int(0)
--- testing: 9223372036854775807 + -9.2233720368548E+18 ---
-float(0)
-===DONE===
+float(0)
+===DONE===
diff --git a/tests/lang/operators/add_variationStr.phpt b/tests/lang/operators/add_variationStr.phpt
index 264c5c1bb9..9bf11ec698 100644
--- a/tests/lang/operators/add_variationStr.phpt
+++ b/tests/lang/operators/add_variationStr.phpt
@@ -1,26 +1,26 @@
---TEST--
-Test + operator : various numbers as strings
---FILE--
-<?php
-
-$strVals = array(
- "0","65","-44", "1.2", "-7.7", "abc", "123abc", "123e5", "123e5xyz", " 123abc", "123 abc", "123abc ", "3.4a",
- "a5.9"
-);
-
-error_reporting(E_ERROR);
-
-foreach ($strVals as $strVal) {
- foreach($strVals as $otherVal) {
- echo "--- testing: '$strVal' + '$otherVal' ---\n";
- var_dump($strVal+$otherVal);
- }
-}
-
-
-?>
-===DONE===
---EXPECT--
+--TEST--
+Test + operator : various numbers as strings
+--FILE--
+<?php
+
+$strVals = array(
+ "0","65","-44", "1.2", "-7.7", "abc", "123abc", "123e5", "123e5xyz", " 123abc", "123 abc", "123abc ", "3.4a",
+ "a5.9"
+);
+
+error_reporting(E_ERROR);
+
+foreach ($strVals as $strVal) {
+ foreach($strVals as $otherVal) {
+ echo "--- testing: '$strVal' + '$otherVal' ---\n";
+ var_dump($strVal+$otherVal);
+ }
+}
+
+
+?>
+===DONE===
+--EXPECT--
--- testing: '0' + '0' ---
int(0)
--- testing: '0' + '65' ---
@@ -412,5 +412,5 @@ int(123)
--- testing: 'a5.9' + '3.4a' ---
float(3.4)
--- testing: 'a5.9' + 'a5.9' ---
-int(0)
-===DONE===
+int(0)
+===DONE===
diff --git a/tests/lang/operators/bitwiseAnd_variationStr.phpt b/tests/lang/operators/bitwiseAnd_variationStr.phpt
index 26022705fc..5b7cb10b12 100644
--- a/tests/lang/operators/bitwiseAnd_variationStr.phpt
+++ b/tests/lang/operators/bitwiseAnd_variationStr.phpt
@@ -1,26 +1,26 @@
---TEST--
-Test & operator : various numbers as strings
---FILE--
-<?php
-
-$strVals = array(
- "0","65","-44", "1.2", "-7.7", "abc", "123abc", "123e5", "123e5xyz", " 123abc", "123 abc", "123abc ", "3.4a",
- "a5.9"
-);
-
-error_reporting(E_ERROR);
-
-foreach ($strVals as $strVal) {
- foreach($strVals as $otherVal) {
- echo "--- testing: '$strVal' & '$otherVal' ---\n";
- var_dump(bin2hex($strVal&$otherVal));
- }
-}
-
-
-?>
-===DONE===
---EXPECT--
+--TEST--
+Test & operator : various numbers as strings
+--FILE--
+<?php
+
+$strVals = array(
+ "0","65","-44", "1.2", "-7.7", "abc", "123abc", "123e5", "123e5xyz", " 123abc", "123 abc", "123abc ", "3.4a",
+ "a5.9"
+);
+
+error_reporting(E_ERROR);
+
+foreach ($strVals as $strVal) {
+ foreach($strVals as $otherVal) {
+ echo "--- testing: '$strVal' & '$otherVal' ---\n";
+ var_dump(bin2hex($strVal&$otherVal));
+ }
+}
+
+
+?>
+===DONE===
+--EXPECT--
--- testing: '0' & '0' ---
string(2) "30"
--- testing: '0' & '65' ---
@@ -412,5 +412,5 @@ string(8) "21302221"
--- testing: 'a5.9' & '3.4a' ---
string(8) "21242421"
--- testing: 'a5.9' & 'a5.9' ---
-string(8) "61352e39"
-===DONE===
+string(8) "61352e39"
+===DONE===
diff --git a/tests/lang/operators/bitwiseNot_variationStr.phpt b/tests/lang/operators/bitwiseNot_variationStr.phpt
index 3e7b698680..98bca9e473 100644
--- a/tests/lang/operators/bitwiseNot_variationStr.phpt
+++ b/tests/lang/operators/bitwiseNot_variationStr.phpt
@@ -1,22 +1,22 @@
---TEST--
-Test ~N operator : various numbers as strings
---FILE--
-<?php
-
-$strVals = array(
- "0","65","-44", "1.2", "-7.7", "abc", "123abc", "123e5", "123e5xyz", " 123abc", "123 abc", "123abc ", "3.4a",
- "a5.9"
-);
-
-
-foreach ($strVals as $strVal) {
- echo "--- testing: '$strVal' ---\n";
- var_dump(bin2hex(~$strVal));
-}
-
-?>
-===DONE===
---EXPECT--
+--TEST--
+Test ~N operator : various numbers as strings
+--FILE--
+<?php
+
+$strVals = array(
+ "0","65","-44", "1.2", "-7.7", "abc", "123abc", "123e5", "123e5xyz", " 123abc", "123 abc", "123abc ", "3.4a",
+ "a5.9"
+);
+
+
+foreach ($strVals as $strVal) {
+ echo "--- testing: '$strVal' ---\n";
+ var_dump(bin2hex(~$strVal));
+}
+
+?>
+===DONE===
+--EXPECT--
--- testing: '0' ---
string(2) "cf"
--- testing: '65' ---
@@ -44,5 +44,5 @@ string(14) "cecdcc9e9d9cdf"
--- testing: '3.4a' ---
string(8) "ccd1cb9e"
--- testing: 'a5.9' ---
-string(8) "9ecad1c6"
-===DONE===
+string(8) "9ecad1c6"
+===DONE===
diff --git a/tests/lang/operators/bitwiseOr_variationStr.phpt b/tests/lang/operators/bitwiseOr_variationStr.phpt
index 6c31477884..2d1d353788 100644
--- a/tests/lang/operators/bitwiseOr_variationStr.phpt
+++ b/tests/lang/operators/bitwiseOr_variationStr.phpt
@@ -1,26 +1,26 @@
---TEST--
-Test | operator : various numbers as strings
---FILE--
-<?php
-
-$strVals = array(
- "0","65","-44", "1.2", "-7.7", "abc", "123abc", "123e5", "123e5xyz", " 123abc", "123 abc", "123abc ", "3.4a",
- "a5.9"
-);
-
-error_reporting(E_ERROR);
-
-foreach ($strVals as $strVal) {
- foreach($strVals as $otherVal) {
- echo "--- testing: '$strVal' | '$otherVal' ---\n";
- var_dump(bin2hex($strVal|$otherVal));
- }
-}
-
-
-?>
-===DONE===
---EXPECT--
+--TEST--
+Test | operator : various numbers as strings
+--FILE--
+<?php
+
+$strVals = array(
+ "0","65","-44", "1.2", "-7.7", "abc", "123abc", "123e5", "123e5xyz", " 123abc", "123 abc", "123abc ", "3.4a",
+ "a5.9"
+);
+
+error_reporting(E_ERROR);
+
+foreach ($strVals as $strVal) {
+ foreach($strVals as $otherVal) {
+ echo "--- testing: '$strVal' | '$otherVal' ---\n";
+ var_dump(bin2hex($strVal|$otherVal));
+ }
+}
+
+
+?>
+===DONE===
+--EXPECT--
--- testing: '0' | '0' ---
string(2) "30"
--- testing: '0' | '65' ---
@@ -412,5 +412,5 @@ string(14) "71373f79626320"
--- testing: 'a5.9' | '3.4a' ---
string(8) "733f3e79"
--- testing: 'a5.9' | 'a5.9' ---
-string(8) "61352e39"
-===DONE===
+string(8) "61352e39"
+===DONE===
diff --git a/tests/lang/operators/bitwiseShiftLeft_variationStr_64bit.phpt b/tests/lang/operators/bitwiseShiftLeft_variationStr_64bit.phpt
index 69fd90f1c8..ddfd2f7c6d 100644
--- a/tests/lang/operators/bitwiseShiftLeft_variationStr_64bit.phpt
+++ b/tests/lang/operators/bitwiseShiftLeft_variationStr_64bit.phpt
@@ -1,424 +1,424 @@
---TEST--
-Test << operator : various numbers as strings
---SKIPIF--
-<?php
-if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platform only");
-?>
---FILE--
-<?php
-
-$strVals = array(
- "0","65","-44", "1.2", "-7.7", "abc", "123abc", "123e5", "123e5xyz", " 123abc", "123 abc", "123abc ", "3.4a",
- "a5.9"
-);
-
-error_reporting(E_ERROR);
-
-foreach ($strVals as $strVal) {
- foreach($strVals as $otherVal) {
- echo "--- testing: '$strVal' << '$otherVal' ---\n";
- try {
- var_dump($strVal<<$otherVal);
- } catch (ArithmeticError $e) {
- echo "Exception: " . $e->getMessage() . "\n";
- }
- }
-}
-
-
-?>
-===DONE===
---EXPECT--
---- testing: '0' << '0' ---
-int(0)
---- testing: '0' << '65' ---
-int(0)
---- testing: '0' << '-44' ---
-Exception: Bit shift by negative number
---- testing: '0' << '1.2' ---
-int(0)
---- testing: '0' << '-7.7' ---
-Exception: Bit shift by negative number
---- testing: '0' << 'abc' ---
-int(0)
---- testing: '0' << '123abc' ---
-int(0)
---- testing: '0' << '123e5' ---
-int(0)
---- testing: '0' << '123e5xyz' ---
-int(0)
---- testing: '0' << ' 123abc' ---
-int(0)
---- testing: '0' << '123 abc' ---
-int(0)
---- testing: '0' << '123abc ' ---
-int(0)
---- testing: '0' << '3.4a' ---
-int(0)
---- testing: '0' << 'a5.9' ---
-int(0)
---- testing: '65' << '0' ---
-int(65)
---- testing: '65' << '65' ---
-int(0)
---- testing: '65' << '-44' ---
-Exception: Bit shift by negative number
---- testing: '65' << '1.2' ---
-int(130)
---- testing: '65' << '-7.7' ---
-Exception: Bit shift by negative number
---- testing: '65' << 'abc' ---
-int(65)
---- testing: '65' << '123abc' ---
-int(0)
---- testing: '65' << '123e5' ---
-int(0)
---- testing: '65' << '123e5xyz' ---
-int(0)
---- testing: '65' << ' 123abc' ---
-int(0)
---- testing: '65' << '123 abc' ---
-int(0)
---- testing: '65' << '123abc ' ---
-int(0)
---- testing: '65' << '3.4a' ---
-int(520)
---- testing: '65' << 'a5.9' ---
-int(65)
---- testing: '-44' << '0' ---
-int(-44)
---- testing: '-44' << '65' ---
-int(0)
---- testing: '-44' << '-44' ---
-Exception: Bit shift by negative number
---- testing: '-44' << '1.2' ---
-int(-88)
---- testing: '-44' << '-7.7' ---
-Exception: Bit shift by negative number
---- testing: '-44' << 'abc' ---
-int(-44)
---- testing: '-44' << '123abc' ---
-int(0)
---- testing: '-44' << '123e5' ---
-int(0)
---- testing: '-44' << '123e5xyz' ---
-int(0)
---- testing: '-44' << ' 123abc' ---
-int(0)
---- testing: '-44' << '123 abc' ---
-int(0)
---- testing: '-44' << '123abc ' ---
-int(0)
---- testing: '-44' << '3.4a' ---
-int(-352)
---- testing: '-44' << 'a5.9' ---
-int(-44)
---- testing: '1.2' << '0' ---
-int(1)
---- testing: '1.2' << '65' ---
-int(0)
---- testing: '1.2' << '-44' ---
-Exception: Bit shift by negative number
---- testing: '1.2' << '1.2' ---
-int(2)
---- testing: '1.2' << '-7.7' ---
-Exception: Bit shift by negative number
---- testing: '1.2' << 'abc' ---
-int(1)
---- testing: '1.2' << '123abc' ---
-int(0)
---- testing: '1.2' << '123e5' ---
-int(0)
---- testing: '1.2' << '123e5xyz' ---
-int(0)
---- testing: '1.2' << ' 123abc' ---
-int(0)
---- testing: '1.2' << '123 abc' ---
-int(0)
---- testing: '1.2' << '123abc ' ---
-int(0)
---- testing: '1.2' << '3.4a' ---
-int(8)
---- testing: '1.2' << 'a5.9' ---
-int(1)
---- testing: '-7.7' << '0' ---
-int(-7)
---- testing: '-7.7' << '65' ---
-int(0)
---- testing: '-7.7' << '-44' ---
-Exception: Bit shift by negative number
---- testing: '-7.7' << '1.2' ---
-int(-14)
---- testing: '-7.7' << '-7.7' ---
-Exception: Bit shift by negative number
---- testing: '-7.7' << 'abc' ---
-int(-7)
---- testing: '-7.7' << '123abc' ---
-int(0)
---- testing: '-7.7' << '123e5' ---
-int(0)
---- testing: '-7.7' << '123e5xyz' ---
-int(0)
---- testing: '-7.7' << ' 123abc' ---
-int(0)
---- testing: '-7.7' << '123 abc' ---
-int(0)
---- testing: '-7.7' << '123abc ' ---
-int(0)
---- testing: '-7.7' << '3.4a' ---
-int(-56)
---- testing: '-7.7' << 'a5.9' ---
-int(-7)
---- testing: 'abc' << '0' ---
-int(0)
---- testing: 'abc' << '65' ---
-int(0)
---- testing: 'abc' << '-44' ---
-Exception: Bit shift by negative number
---- testing: 'abc' << '1.2' ---
-int(0)
---- testing: 'abc' << '-7.7' ---
-Exception: Bit shift by negative number
---- testing: 'abc' << 'abc' ---
-int(0)
---- testing: 'abc' << '123abc' ---
-int(0)
---- testing: 'abc' << '123e5' ---
-int(0)
---- testing: 'abc' << '123e5xyz' ---
-int(0)
---- testing: 'abc' << ' 123abc' ---
-int(0)
---- testing: 'abc' << '123 abc' ---
-int(0)
---- testing: 'abc' << '123abc ' ---
-int(0)
---- testing: 'abc' << '3.4a' ---
-int(0)
---- testing: 'abc' << 'a5.9' ---
-int(0)
---- testing: '123abc' << '0' ---
-int(123)
---- testing: '123abc' << '65' ---
-int(0)
---- testing: '123abc' << '-44' ---
-Exception: Bit shift by negative number
---- testing: '123abc' << '1.2' ---
-int(246)
---- testing: '123abc' << '-7.7' ---
-Exception: Bit shift by negative number
---- testing: '123abc' << 'abc' ---
-int(123)
---- testing: '123abc' << '123abc' ---
-int(0)
---- testing: '123abc' << '123e5' ---
-int(0)
---- testing: '123abc' << '123e5xyz' ---
-int(0)
---- testing: '123abc' << ' 123abc' ---
-int(0)
---- testing: '123abc' << '123 abc' ---
-int(0)
---- testing: '123abc' << '123abc ' ---
-int(0)
---- testing: '123abc' << '3.4a' ---
-int(984)
---- testing: '123abc' << 'a5.9' ---
-int(123)
---- testing: '123e5' << '0' ---
-int(12300000)
---- testing: '123e5' << '65' ---
-int(0)
---- testing: '123e5' << '-44' ---
-Exception: Bit shift by negative number
---- testing: '123e5' << '1.2' ---
-int(24600000)
---- testing: '123e5' << '-7.7' ---
-Exception: Bit shift by negative number
---- testing: '123e5' << 'abc' ---
-int(12300000)
---- testing: '123e5' << '123abc' ---
-int(0)
---- testing: '123e5' << '123e5' ---
-int(0)
---- testing: '123e5' << '123e5xyz' ---
-int(0)
---- testing: '123e5' << ' 123abc' ---
-int(0)
---- testing: '123e5' << '123 abc' ---
-int(0)
---- testing: '123e5' << '123abc ' ---
-int(0)
---- testing: '123e5' << '3.4a' ---
-int(98400000)
---- testing: '123e5' << 'a5.9' ---
-int(12300000)
---- testing: '123e5xyz' << '0' ---
-int(12300000)
---- testing: '123e5xyz' << '65' ---
-int(0)
---- testing: '123e5xyz' << '-44' ---
-Exception: Bit shift by negative number
---- testing: '123e5xyz' << '1.2' ---
-int(24600000)
---- testing: '123e5xyz' << '-7.7' ---
-Exception: Bit shift by negative number
---- testing: '123e5xyz' << 'abc' ---
-int(12300000)
---- testing: '123e5xyz' << '123abc' ---
-int(0)
---- testing: '123e5xyz' << '123e5' ---
-int(0)
---- testing: '123e5xyz' << '123e5xyz' ---
-int(0)
---- testing: '123e5xyz' << ' 123abc' ---
-int(0)
---- testing: '123e5xyz' << '123 abc' ---
-int(0)
---- testing: '123e5xyz' << '123abc ' ---
-int(0)
---- testing: '123e5xyz' << '3.4a' ---
-int(98400000)
---- testing: '123e5xyz' << 'a5.9' ---
-int(12300000)
---- testing: ' 123abc' << '0' ---
-int(123)
---- testing: ' 123abc' << '65' ---
-int(0)
---- testing: ' 123abc' << '-44' ---
-Exception: Bit shift by negative number
---- testing: ' 123abc' << '1.2' ---
-int(246)
---- testing: ' 123abc' << '-7.7' ---
-Exception: Bit shift by negative number
---- testing: ' 123abc' << 'abc' ---
-int(123)
---- testing: ' 123abc' << '123abc' ---
-int(0)
---- testing: ' 123abc' << '123e5' ---
-int(0)
---- testing: ' 123abc' << '123e5xyz' ---
-int(0)
---- testing: ' 123abc' << ' 123abc' ---
-int(0)
---- testing: ' 123abc' << '123 abc' ---
-int(0)
---- testing: ' 123abc' << '123abc ' ---
-int(0)
---- testing: ' 123abc' << '3.4a' ---
-int(984)
---- testing: ' 123abc' << 'a5.9' ---
-int(123)
---- testing: '123 abc' << '0' ---
-int(123)
---- testing: '123 abc' << '65' ---
-int(0)
---- testing: '123 abc' << '-44' ---
-Exception: Bit shift by negative number
---- testing: '123 abc' << '1.2' ---
-int(246)
---- testing: '123 abc' << '-7.7' ---
-Exception: Bit shift by negative number
---- testing: '123 abc' << 'abc' ---
-int(123)
---- testing: '123 abc' << '123abc' ---
-int(0)
---- testing: '123 abc' << '123e5' ---
-int(0)
---- testing: '123 abc' << '123e5xyz' ---
-int(0)
---- testing: '123 abc' << ' 123abc' ---
-int(0)
---- testing: '123 abc' << '123 abc' ---
-int(0)
---- testing: '123 abc' << '123abc ' ---
-int(0)
---- testing: '123 abc' << '3.4a' ---
-int(984)
---- testing: '123 abc' << 'a5.9' ---
-int(123)
---- testing: '123abc ' << '0' ---
-int(123)
---- testing: '123abc ' << '65' ---
-int(0)
---- testing: '123abc ' << '-44' ---
-Exception: Bit shift by negative number
---- testing: '123abc ' << '1.2' ---
-int(246)
---- testing: '123abc ' << '-7.7' ---
-Exception: Bit shift by negative number
---- testing: '123abc ' << 'abc' ---
-int(123)
---- testing: '123abc ' << '123abc' ---
-int(0)
---- testing: '123abc ' << '123e5' ---
-int(0)
---- testing: '123abc ' << '123e5xyz' ---
-int(0)
---- testing: '123abc ' << ' 123abc' ---
-int(0)
---- testing: '123abc ' << '123 abc' ---
-int(0)
---- testing: '123abc ' << '123abc ' ---
-int(0)
---- testing: '123abc ' << '3.4a' ---
-int(984)
---- testing: '123abc ' << 'a5.9' ---
-int(123)
---- testing: '3.4a' << '0' ---
-int(3)
---- testing: '3.4a' << '65' ---
-int(0)
---- testing: '3.4a' << '-44' ---
-Exception: Bit shift by negative number
---- testing: '3.4a' << '1.2' ---
-int(6)
---- testing: '3.4a' << '-7.7' ---
-Exception: Bit shift by negative number
---- testing: '3.4a' << 'abc' ---
-int(3)
---- testing: '3.4a' << '123abc' ---
-int(0)
---- testing: '3.4a' << '123e5' ---
-int(0)
---- testing: '3.4a' << '123e5xyz' ---
-int(0)
---- testing: '3.4a' << ' 123abc' ---
-int(0)
---- testing: '3.4a' << '123 abc' ---
-int(0)
---- testing: '3.4a' << '123abc ' ---
-int(0)
---- testing: '3.4a' << '3.4a' ---
-int(24)
---- testing: '3.4a' << 'a5.9' ---
-int(3)
---- testing: 'a5.9' << '0' ---
-int(0)
---- testing: 'a5.9' << '65' ---
-int(0)
---- testing: 'a5.9' << '-44' ---
-Exception: Bit shift by negative number
---- testing: 'a5.9' << '1.2' ---
-int(0)
---- testing: 'a5.9' << '-7.7' ---
-Exception: Bit shift by negative number
---- testing: 'a5.9' << 'abc' ---
-int(0)
---- testing: 'a5.9' << '123abc' ---
-int(0)
---- testing: 'a5.9' << '123e5' ---
-int(0)
---- testing: 'a5.9' << '123e5xyz' ---
-int(0)
---- testing: 'a5.9' << ' 123abc' ---
-int(0)
---- testing: 'a5.9' << '123 abc' ---
-int(0)
---- testing: 'a5.9' << '123abc ' ---
-int(0)
---- testing: 'a5.9' << '3.4a' ---
-int(0)
---- testing: 'a5.9' << 'a5.9' ---
-int(0)
-===DONE===
+--TEST--
+Test << operator : various numbers as strings
+--SKIPIF--
+<?php
+if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platform only");
+?>
+--FILE--
+<?php
+
+$strVals = array(
+ "0","65","-44", "1.2", "-7.7", "abc", "123abc", "123e5", "123e5xyz", " 123abc", "123 abc", "123abc ", "3.4a",
+ "a5.9"
+);
+
+error_reporting(E_ERROR);
+
+foreach ($strVals as $strVal) {
+ foreach($strVals as $otherVal) {
+ echo "--- testing: '$strVal' << '$otherVal' ---\n";
+ try {
+ var_dump($strVal<<$otherVal);
+ } catch (ArithmeticError $e) {
+ echo "Exception: " . $e->getMessage() . "\n";
+ }
+ }
+}
+
+
+?>
+===DONE===
+--EXPECT--
+--- testing: '0' << '0' ---
+int(0)
+--- testing: '0' << '65' ---
+int(0)
+--- testing: '0' << '-44' ---
+Exception: Bit shift by negative number
+--- testing: '0' << '1.2' ---
+int(0)
+--- testing: '0' << '-7.7' ---
+Exception: Bit shift by negative number
+--- testing: '0' << 'abc' ---
+int(0)
+--- testing: '0' << '123abc' ---
+int(0)
+--- testing: '0' << '123e5' ---
+int(0)
+--- testing: '0' << '123e5xyz' ---
+int(0)
+--- testing: '0' << ' 123abc' ---
+int(0)
+--- testing: '0' << '123 abc' ---
+int(0)
+--- testing: '0' << '123abc ' ---
+int(0)
+--- testing: '0' << '3.4a' ---
+int(0)
+--- testing: '0' << 'a5.9' ---
+int(0)
+--- testing: '65' << '0' ---
+int(65)
+--- testing: '65' << '65' ---
+int(0)
+--- testing: '65' << '-44' ---
+Exception: Bit shift by negative number
+--- testing: '65' << '1.2' ---
+int(130)
+--- testing: '65' << '-7.7' ---
+Exception: Bit shift by negative number
+--- testing: '65' << 'abc' ---
+int(65)
+--- testing: '65' << '123abc' ---
+int(0)
+--- testing: '65' << '123e5' ---
+int(0)
+--- testing: '65' << '123e5xyz' ---
+int(0)
+--- testing: '65' << ' 123abc' ---
+int(0)
+--- testing: '65' << '123 abc' ---
+int(0)
+--- testing: '65' << '123abc ' ---
+int(0)
+--- testing: '65' << '3.4a' ---
+int(520)
+--- testing: '65' << 'a5.9' ---
+int(65)
+--- testing: '-44' << '0' ---
+int(-44)
+--- testing: '-44' << '65' ---
+int(0)
+--- testing: '-44' << '-44' ---
+Exception: Bit shift by negative number
+--- testing: '-44' << '1.2' ---
+int(-88)
+--- testing: '-44' << '-7.7' ---
+Exception: Bit shift by negative number
+--- testing: '-44' << 'abc' ---
+int(-44)
+--- testing: '-44' << '123abc' ---
+int(0)
+--- testing: '-44' << '123e5' ---
+int(0)
+--- testing: '-44' << '123e5xyz' ---
+int(0)
+--- testing: '-44' << ' 123abc' ---
+int(0)
+--- testing: '-44' << '123 abc' ---
+int(0)
+--- testing: '-44' << '123abc ' ---
+int(0)
+--- testing: '-44' << '3.4a' ---
+int(-352)
+--- testing: '-44' << 'a5.9' ---
+int(-44)
+--- testing: '1.2' << '0' ---
+int(1)
+--- testing: '1.2' << '65' ---
+int(0)
+--- testing: '1.2' << '-44' ---
+Exception: Bit shift by negative number
+--- testing: '1.2' << '1.2' ---
+int(2)
+--- testing: '1.2' << '-7.7' ---
+Exception: Bit shift by negative number
+--- testing: '1.2' << 'abc' ---
+int(1)
+--- testing: '1.2' << '123abc' ---
+int(0)
+--- testing: '1.2' << '123e5' ---
+int(0)
+--- testing: '1.2' << '123e5xyz' ---
+int(0)
+--- testing: '1.2' << ' 123abc' ---
+int(0)
+--- testing: '1.2' << '123 abc' ---
+int(0)
+--- testing: '1.2' << '123abc ' ---
+int(0)
+--- testing: '1.2' << '3.4a' ---
+int(8)
+--- testing: '1.2' << 'a5.9' ---
+int(1)
+--- testing: '-7.7' << '0' ---
+int(-7)
+--- testing: '-7.7' << '65' ---
+int(0)
+--- testing: '-7.7' << '-44' ---
+Exception: Bit shift by negative number
+--- testing: '-7.7' << '1.2' ---
+int(-14)
+--- testing: '-7.7' << '-7.7' ---
+Exception: Bit shift by negative number
+--- testing: '-7.7' << 'abc' ---
+int(-7)
+--- testing: '-7.7' << '123abc' ---
+int(0)
+--- testing: '-7.7' << '123e5' ---
+int(0)
+--- testing: '-7.7' << '123e5xyz' ---
+int(0)
+--- testing: '-7.7' << ' 123abc' ---
+int(0)
+--- testing: '-7.7' << '123 abc' ---
+int(0)
+--- testing: '-7.7' << '123abc ' ---
+int(0)
+--- testing: '-7.7' << '3.4a' ---
+int(-56)
+--- testing: '-7.7' << 'a5.9' ---
+int(-7)
+--- testing: 'abc' << '0' ---
+int(0)
+--- testing: 'abc' << '65' ---
+int(0)
+--- testing: 'abc' << '-44' ---
+Exception: Bit shift by negative number
+--- testing: 'abc' << '1.2' ---
+int(0)
+--- testing: 'abc' << '-7.7' ---
+Exception: Bit shift by negative number
+--- testing: 'abc' << 'abc' ---
+int(0)
+--- testing: 'abc' << '123abc' ---
+int(0)
+--- testing: 'abc' << '123e5' ---
+int(0)
+--- testing: 'abc' << '123e5xyz' ---
+int(0)
+--- testing: 'abc' << ' 123abc' ---
+int(0)
+--- testing: 'abc' << '123 abc' ---
+int(0)
+--- testing: 'abc' << '123abc ' ---
+int(0)
+--- testing: 'abc' << '3.4a' ---
+int(0)
+--- testing: 'abc' << 'a5.9' ---
+int(0)
+--- testing: '123abc' << '0' ---
+int(123)
+--- testing: '123abc' << '65' ---
+int(0)
+--- testing: '123abc' << '-44' ---
+Exception: Bit shift by negative number
+--- testing: '123abc' << '1.2' ---
+int(246)
+--- testing: '123abc' << '-7.7' ---
+Exception: Bit shift by negative number
+--- testing: '123abc' << 'abc' ---
+int(123)
+--- testing: '123abc' << '123abc' ---
+int(0)
+--- testing: '123abc' << '123e5' ---
+int(0)
+--- testing: '123abc' << '123e5xyz' ---
+int(0)
+--- testing: '123abc' << ' 123abc' ---
+int(0)
+--- testing: '123abc' << '123 abc' ---
+int(0)
+--- testing: '123abc' << '123abc ' ---
+int(0)
+--- testing: '123abc' << '3.4a' ---
+int(984)
+--- testing: '123abc' << 'a5.9' ---
+int(123)
+--- testing: '123e5' << '0' ---
+int(12300000)
+--- testing: '123e5' << '65' ---
+int(0)
+--- testing: '123e5' << '-44' ---
+Exception: Bit shift by negative number
+--- testing: '123e5' << '1.2' ---
+int(24600000)
+--- testing: '123e5' << '-7.7' ---
+Exception: Bit shift by negative number
+--- testing: '123e5' << 'abc' ---
+int(12300000)
+--- testing: '123e5' << '123abc' ---
+int(0)
+--- testing: '123e5' << '123e5' ---
+int(0)
+--- testing: '123e5' << '123e5xyz' ---
+int(0)
+--- testing: '123e5' << ' 123abc' ---
+int(0)
+--- testing: '123e5' << '123 abc' ---
+int(0)
+--- testing: '123e5' << '123abc ' ---
+int(0)
+--- testing: '123e5' << '3.4a' ---
+int(98400000)
+--- testing: '123e5' << 'a5.9' ---
+int(12300000)
+--- testing: '123e5xyz' << '0' ---
+int(12300000)
+--- testing: '123e5xyz' << '65' ---
+int(0)
+--- testing: '123e5xyz' << '-44' ---
+Exception: Bit shift by negative number
+--- testing: '123e5xyz' << '1.2' ---
+int(24600000)
+--- testing: '123e5xyz' << '-7.7' ---
+Exception: Bit shift by negative number
+--- testing: '123e5xyz' << 'abc' ---
+int(12300000)
+--- testing: '123e5xyz' << '123abc' ---
+int(0)
+--- testing: '123e5xyz' << '123e5' ---
+int(0)
+--- testing: '123e5xyz' << '123e5xyz' ---
+int(0)
+--- testing: '123e5xyz' << ' 123abc' ---
+int(0)
+--- testing: '123e5xyz' << '123 abc' ---
+int(0)
+--- testing: '123e5xyz' << '123abc ' ---
+int(0)
+--- testing: '123e5xyz' << '3.4a' ---
+int(98400000)
+--- testing: '123e5xyz' << 'a5.9' ---
+int(12300000)
+--- testing: ' 123abc' << '0' ---
+int(123)
+--- testing: ' 123abc' << '65' ---
+int(0)
+--- testing: ' 123abc' << '-44' ---
+Exception: Bit shift by negative number
+--- testing: ' 123abc' << '1.2' ---
+int(246)
+--- testing: ' 123abc' << '-7.7' ---
+Exception: Bit shift by negative number
+--- testing: ' 123abc' << 'abc' ---
+int(123)
+--- testing: ' 123abc' << '123abc' ---
+int(0)
+--- testing: ' 123abc' << '123e5' ---
+int(0)
+--- testing: ' 123abc' << '123e5xyz' ---
+int(0)
+--- testing: ' 123abc' << ' 123abc' ---
+int(0)
+--- testing: ' 123abc' << '123 abc' ---
+int(0)
+--- testing: ' 123abc' << '123abc ' ---
+int(0)
+--- testing: ' 123abc' << '3.4a' ---
+int(984)
+--- testing: ' 123abc' << 'a5.9' ---
+int(123)
+--- testing: '123 abc' << '0' ---
+int(123)
+--- testing: '123 abc' << '65' ---
+int(0)
+--- testing: '123 abc' << '-44' ---
+Exception: Bit shift by negative number
+--- testing: '123 abc' << '1.2' ---
+int(246)
+--- testing: '123 abc' << '-7.7' ---
+Exception: Bit shift by negative number
+--- testing: '123 abc' << 'abc' ---
+int(123)
+--- testing: '123 abc' << '123abc' ---
+int(0)
+--- testing: '123 abc' << '123e5' ---
+int(0)
+--- testing: '123 abc' << '123e5xyz' ---
+int(0)
+--- testing: '123 abc' << ' 123abc' ---
+int(0)
+--- testing: '123 abc' << '123 abc' ---
+int(0)
+--- testing: '123 abc' << '123abc ' ---
+int(0)
+--- testing: '123 abc' << '3.4a' ---
+int(984)
+--- testing: '123 abc' << 'a5.9' ---
+int(123)
+--- testing: '123abc ' << '0' ---
+int(123)
+--- testing: '123abc ' << '65' ---
+int(0)
+--- testing: '123abc ' << '-44' ---
+Exception: Bit shift by negative number
+--- testing: '123abc ' << '1.2' ---
+int(246)
+--- testing: '123abc ' << '-7.7' ---
+Exception: Bit shift by negative number
+--- testing: '123abc ' << 'abc' ---
+int(123)
+--- testing: '123abc ' << '123abc' ---
+int(0)
+--- testing: '123abc ' << '123e5' ---
+int(0)
+--- testing: '123abc ' << '123e5xyz' ---
+int(0)
+--- testing: '123abc ' << ' 123abc' ---
+int(0)
+--- testing: '123abc ' << '123 abc' ---
+int(0)
+--- testing: '123abc ' << '123abc ' ---
+int(0)
+--- testing: '123abc ' << '3.4a' ---
+int(984)
+--- testing: '123abc ' << 'a5.9' ---
+int(123)
+--- testing: '3.4a' << '0' ---
+int(3)
+--- testing: '3.4a' << '65' ---
+int(0)
+--- testing: '3.4a' << '-44' ---
+Exception: Bit shift by negative number
+--- testing: '3.4a' << '1.2' ---
+int(6)
+--- testing: '3.4a' << '-7.7' ---
+Exception: Bit shift by negative number
+--- testing: '3.4a' << 'abc' ---
+int(3)
+--- testing: '3.4a' << '123abc' ---
+int(0)
+--- testing: '3.4a' << '123e5' ---
+int(0)
+--- testing: '3.4a' << '123e5xyz' ---
+int(0)
+--- testing: '3.4a' << ' 123abc' ---
+int(0)
+--- testing: '3.4a' << '123 abc' ---
+int(0)
+--- testing: '3.4a' << '123abc ' ---
+int(0)
+--- testing: '3.4a' << '3.4a' ---
+int(24)
+--- testing: '3.4a' << 'a5.9' ---
+int(3)
+--- testing: 'a5.9' << '0' ---
+int(0)
+--- testing: 'a5.9' << '65' ---
+int(0)
+--- testing: 'a5.9' << '-44' ---
+Exception: Bit shift by negative number
+--- testing: 'a5.9' << '1.2' ---
+int(0)
+--- testing: 'a5.9' << '-7.7' ---
+Exception: Bit shift by negative number
+--- testing: 'a5.9' << 'abc' ---
+int(0)
+--- testing: 'a5.9' << '123abc' ---
+int(0)
+--- testing: 'a5.9' << '123e5' ---
+int(0)
+--- testing: 'a5.9' << '123e5xyz' ---
+int(0)
+--- testing: 'a5.9' << ' 123abc' ---
+int(0)
+--- testing: 'a5.9' << '123 abc' ---
+int(0)
+--- testing: 'a5.9' << '123abc ' ---
+int(0)
+--- testing: 'a5.9' << '3.4a' ---
+int(0)
+--- testing: 'a5.9' << 'a5.9' ---
+int(0)
+===DONE===
diff --git a/tests/lang/operators/bitwiseXor_variationStr.phpt b/tests/lang/operators/bitwiseXor_variationStr.phpt
index 7dda65910a..64d5eb75d8 100644
--- a/tests/lang/operators/bitwiseXor_variationStr.phpt
+++ b/tests/lang/operators/bitwiseXor_variationStr.phpt
@@ -1,26 +1,26 @@
---TEST--
-Test ^ operator : various numbers as strings
---FILE--
-<?php
-
-$strVals = array(
- "0","65","-44", "1.2", "-7.7", "abc", "123abc", "123e5", "123e5xyz", " 123abc", "123 abc", "123abc ", "3.4a",
- "a5.9"
-);
-
-error_reporting(E_ERROR);
-
-foreach ($strVals as $strVal) {
- foreach($strVals as $otherVal) {
- echo "--- testing: '$strVal' ^ '$otherVal' ---\n";
- var_dump(bin2hex($strVal^$otherVal));
- }
-}
-
-
-?>
-===DONE===
---EXPECT--
+--TEST--
+Test ^ operator : various numbers as strings
+--FILE--
+<?php
+
+$strVals = array(
+ "0","65","-44", "1.2", "-7.7", "abc", "123abc", "123e5", "123e5xyz", " 123abc", "123 abc", "123abc ", "3.4a",
+ "a5.9"
+);
+
+error_reporting(E_ERROR);
+
+foreach ($strVals as $strVal) {
+ foreach($strVals as $otherVal) {
+ echo "--- testing: '$strVal' ^ '$otherVal' ---\n";
+ var_dump(bin2hex($strVal^$otherVal));
+ }
+}
+
+
+?>
+===DONE===
+--EXPECT--
--- testing: '0' ^ '0' ---
string(2) "00"
--- testing: '0' ^ '65' ---
@@ -412,5 +412,5 @@ string(8) "50071d58"
--- testing: 'a5.9' ^ '3.4a' ---
string(8) "521b1a58"
--- testing: 'a5.9' ^ 'a5.9' ---
-string(8) "00000000"
-===DONE===
+string(8) "00000000"
+===DONE===
diff --git a/tests/lang/operators/divide_basiclong_64bit.phpt b/tests/lang/operators/divide_basiclong_64bit.phpt
index c6bed0c88b..0dd08f534f 100644
--- a/tests/lang/operators/divide_basiclong_64bit.phpt
+++ b/tests/lang/operators/divide_basiclong_64bit.phpt
@@ -1,44 +1,44 @@
---TEST--
-Test / operator : 64bit long tests
---SKIPIF--
-<?php
-if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platform only");
-?>
---FILE--
-<?php
-
-define("MAX_64Bit", 9223372036854775807);
-define("MAX_32Bit", 2147483647);
-define("MIN_64Bit", -9223372036854775807 - 1);
-define("MIN_32Bit", -2147483647 - 1);
-
-$longVals = array(
- MAX_64Bit, MIN_64Bit, MAX_32Bit, MIN_32Bit, MAX_64Bit - MAX_32Bit, MIN_64Bit - MIN_32Bit,
- MAX_32Bit + 1, MIN_32Bit - 1, MAX_32Bit * 2, (MAX_32Bit * 2) + 1, (MAX_32Bit * 2) - 1,
- MAX_64Bit -1, MAX_64Bit + 1, MIN_64Bit + 1, MIN_64Bit - 1
-);
-
-$otherVals = array(0, 1, -1, 7, 9, 65, -44, MAX_32Bit, MAX_64Bit);
-
-error_reporting(E_ERROR);
-
-foreach ($longVals as $longVal) {
- foreach($otherVals as $otherVal) {
- echo "--- testing: $longVal / $otherVal ---\n";
- var_dump($longVal/$otherVal);
- }
-}
-
-foreach ($otherVals as $otherVal) {
- foreach($longVals as $longVal) {
- echo "--- testing: $otherVal / $longVal ---\n";
- var_dump($otherVal/$longVal);
- }
-}
-
-?>
-===DONE===
---EXPECT--
+--TEST--
+Test / operator : 64bit long tests
+--SKIPIF--
+<?php
+if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platform only");
+?>
+--FILE--
+<?php
+
+define("MAX_64Bit", 9223372036854775807);
+define("MAX_32Bit", 2147483647);
+define("MIN_64Bit", -9223372036854775807 - 1);
+define("MIN_32Bit", -2147483647 - 1);
+
+$longVals = array(
+ MAX_64Bit, MIN_64Bit, MAX_32Bit, MIN_32Bit, MAX_64Bit - MAX_32Bit, MIN_64Bit - MIN_32Bit,
+ MAX_32Bit + 1, MIN_32Bit - 1, MAX_32Bit * 2, (MAX_32Bit * 2) + 1, (MAX_32Bit * 2) - 1,
+ MAX_64Bit -1, MAX_64Bit + 1, MIN_64Bit + 1, MIN_64Bit - 1
+);
+
+$otherVals = array(0, 1, -1, 7, 9, 65, -44, MAX_32Bit, MAX_64Bit);
+
+error_reporting(E_ERROR);
+
+foreach ($longVals as $longVal) {
+ foreach($otherVals as $otherVal) {
+ echo "--- testing: $longVal / $otherVal ---\n";
+ var_dump($longVal/$otherVal);
+ }
+}
+
+foreach ($otherVals as $otherVal) {
+ foreach($longVals as $longVal) {
+ echo "--- testing: $otherVal / $longVal ---\n";
+ var_dump($otherVal/$longVal);
+ }
+}
+
+?>
+===DONE===
+--EXPECT--
--- testing: 9223372036854775807 / 0 ---
float(INF)
--- testing: 9223372036854775807 / 1 ---
@@ -578,5 +578,5 @@ float(1)
--- testing: 9223372036854775807 / -9223372036854775807 ---
int(-1)
--- testing: 9223372036854775807 / -9.2233720368548E+18 ---
-float(-1)
-===DONE===
+float(-1)
+===DONE===
diff --git a/tests/lang/operators/divide_variationStr.phpt b/tests/lang/operators/divide_variationStr.phpt
index f54013fcec..88ff8f1840 100644
--- a/tests/lang/operators/divide_variationStr.phpt
+++ b/tests/lang/operators/divide_variationStr.phpt
@@ -1,26 +1,26 @@
---TEST--
-Test / operator : various numbers as strings
---FILE--
-<?php
-
-$strVals = array(
- "0","65","-44", "1.2", "-7.7", "abc", "123abc", "123e5", "123e5xyz", " 123abc", "123 abc", "123abc ", "3.4a",
- "a5.9"
-);
-
-error_reporting(E_ERROR);
-
-foreach ($strVals as $strVal) {
- foreach($strVals as $otherVal) {
- echo "--- testing: '$strVal' / '$otherVal' ---\n";
- var_dump($strVal/$otherVal);
- }
-}
-
-
-?>
-===DONE===
---EXPECT--
+--TEST--
+Test / operator : various numbers as strings
+--FILE--
+<?php
+
+$strVals = array(
+ "0","65","-44", "1.2", "-7.7", "abc", "123abc", "123e5", "123e5xyz", " 123abc", "123 abc", "123abc ", "3.4a",
+ "a5.9"
+);
+
+error_reporting(E_ERROR);
+
+foreach ($strVals as $strVal) {
+ foreach($strVals as $otherVal) {
+ echo "--- testing: '$strVal' / '$otherVal' ---\n";
+ var_dump($strVal/$otherVal);
+ }
+}
+
+
+?>
+===DONE===
+--EXPECT--
--- testing: '0' / '0' ---
float(NAN)
--- testing: '0' / '65' ---
@@ -412,5 +412,5 @@ int(0)
--- testing: 'a5.9' / '3.4a' ---
float(0)
--- testing: 'a5.9' / 'a5.9' ---
-float(NAN)
-===DONE===
+float(NAN)
+===DONE===
diff --git a/tests/lang/operators/modulus_variationStr.phpt b/tests/lang/operators/modulus_variationStr.phpt
index 4cfd7768ff..6441428e3e 100644
--- a/tests/lang/operators/modulus_variationStr.phpt
+++ b/tests/lang/operators/modulus_variationStr.phpt
@@ -1,420 +1,420 @@
---TEST--
-Test % operator : various numbers as strings
---FILE--
-<?php
-
-$strVals = array(
- "0","65","-44", "1.2", "-7.7", "abc", "123abc", "123e5", "123e5xyz", " 123abc", "123 abc", "123abc ", "3.4a",
- "a5.9"
-);
-
-error_reporting(E_ERROR);
-
-foreach ($strVals as $strVal) {
- foreach($strVals as $otherVal) {
- echo "--- testing: '$strVal' % '$otherVal' ---\n";
- try {
- var_dump($strVal%$otherVal);
- } catch (DivisionByZeroError $e) {
- echo "Exception: " . $e->getMessage() . "\n";
- }
- }
-}
-
-
-?>
-===DONE===
---EXPECT--
---- testing: '0' % '0' ---
-Exception: Modulo by zero
---- testing: '0' % '65' ---
-int(0)
---- testing: '0' % '-44' ---
-int(0)
---- testing: '0' % '1.2' ---
-int(0)
---- testing: '0' % '-7.7' ---
-int(0)
---- testing: '0' % 'abc' ---
-Exception: Modulo by zero
---- testing: '0' % '123abc' ---
-int(0)
---- testing: '0' % '123e5' ---
-int(0)
---- testing: '0' % '123e5xyz' ---
-int(0)
---- testing: '0' % ' 123abc' ---
-int(0)
---- testing: '0' % '123 abc' ---
-int(0)
---- testing: '0' % '123abc ' ---
-int(0)
---- testing: '0' % '3.4a' ---
-int(0)
---- testing: '0' % 'a5.9' ---
-Exception: Modulo by zero
---- testing: '65' % '0' ---
-Exception: Modulo by zero
---- testing: '65' % '65' ---
-int(0)
---- testing: '65' % '-44' ---
-int(21)
---- testing: '65' % '1.2' ---
-int(0)
---- testing: '65' % '-7.7' ---
-int(2)
---- testing: '65' % 'abc' ---
-Exception: Modulo by zero
---- testing: '65' % '123abc' ---
-int(65)
---- testing: '65' % '123e5' ---
-int(65)
---- testing: '65' % '123e5xyz' ---
-int(65)
---- testing: '65' % ' 123abc' ---
-int(65)
---- testing: '65' % '123 abc' ---
-int(65)
---- testing: '65' % '123abc ' ---
-int(65)
---- testing: '65' % '3.4a' ---
-int(2)
---- testing: '65' % 'a5.9' ---
-Exception: Modulo by zero
---- testing: '-44' % '0' ---
-Exception: Modulo by zero
---- testing: '-44' % '65' ---
-int(-44)
---- testing: '-44' % '-44' ---
-int(0)
---- testing: '-44' % '1.2' ---
-int(0)
---- testing: '-44' % '-7.7' ---
-int(-2)
---- testing: '-44' % 'abc' ---
-Exception: Modulo by zero
---- testing: '-44' % '123abc' ---
-int(-44)
---- testing: '-44' % '123e5' ---
-int(-44)
---- testing: '-44' % '123e5xyz' ---
-int(-44)
---- testing: '-44' % ' 123abc' ---
-int(-44)
---- testing: '-44' % '123 abc' ---
-int(-44)
---- testing: '-44' % '123abc ' ---
-int(-44)
---- testing: '-44' % '3.4a' ---
-int(-2)
---- testing: '-44' % 'a5.9' ---
-Exception: Modulo by zero
---- testing: '1.2' % '0' ---
-Exception: Modulo by zero
---- testing: '1.2' % '65' ---
-int(1)
---- testing: '1.2' % '-44' ---
-int(1)
---- testing: '1.2' % '1.2' ---
-int(0)
---- testing: '1.2' % '-7.7' ---
-int(1)
---- testing: '1.2' % 'abc' ---
-Exception: Modulo by zero
---- testing: '1.2' % '123abc' ---
-int(1)
---- testing: '1.2' % '123e5' ---
-int(1)
---- testing: '1.2' % '123e5xyz' ---
-int(1)
---- testing: '1.2' % ' 123abc' ---
-int(1)
---- testing: '1.2' % '123 abc' ---
-int(1)
---- testing: '1.2' % '123abc ' ---
-int(1)
---- testing: '1.2' % '3.4a' ---
-int(1)
---- testing: '1.2' % 'a5.9' ---
-Exception: Modulo by zero
---- testing: '-7.7' % '0' ---
-Exception: Modulo by zero
---- testing: '-7.7' % '65' ---
-int(-7)
---- testing: '-7.7' % '-44' ---
-int(-7)
---- testing: '-7.7' % '1.2' ---
-int(0)
---- testing: '-7.7' % '-7.7' ---
-int(0)
---- testing: '-7.7' % 'abc' ---
-Exception: Modulo by zero
---- testing: '-7.7' % '123abc' ---
-int(-7)
---- testing: '-7.7' % '123e5' ---
-int(-7)
---- testing: '-7.7' % '123e5xyz' ---
-int(-7)
---- testing: '-7.7' % ' 123abc' ---
-int(-7)
---- testing: '-7.7' % '123 abc' ---
-int(-7)
---- testing: '-7.7' % '123abc ' ---
-int(-7)
---- testing: '-7.7' % '3.4a' ---
-int(-1)
---- testing: '-7.7' % 'a5.9' ---
-Exception: Modulo by zero
---- testing: 'abc' % '0' ---
-Exception: Modulo by zero
---- testing: 'abc' % '65' ---
-int(0)
---- testing: 'abc' % '-44' ---
-int(0)
---- testing: 'abc' % '1.2' ---
-int(0)
---- testing: 'abc' % '-7.7' ---
-int(0)
---- testing: 'abc' % 'abc' ---
-Exception: Modulo by zero
---- testing: 'abc' % '123abc' ---
-int(0)
---- testing: 'abc' % '123e5' ---
-int(0)
---- testing: 'abc' % '123e5xyz' ---
-int(0)
---- testing: 'abc' % ' 123abc' ---
-int(0)
---- testing: 'abc' % '123 abc' ---
-int(0)
---- testing: 'abc' % '123abc ' ---
-int(0)
---- testing: 'abc' % '3.4a' ---
-int(0)
---- testing: 'abc' % 'a5.9' ---
-Exception: Modulo by zero
---- testing: '123abc' % '0' ---
-Exception: Modulo by zero
---- testing: '123abc' % '65' ---
-int(58)
---- testing: '123abc' % '-44' ---
-int(35)
---- testing: '123abc' % '1.2' ---
-int(0)
---- testing: '123abc' % '-7.7' ---
-int(4)
---- testing: '123abc' % 'abc' ---
-Exception: Modulo by zero
---- testing: '123abc' % '123abc' ---
-int(0)
---- testing: '123abc' % '123e5' ---
-int(123)
---- testing: '123abc' % '123e5xyz' ---
-int(123)
---- testing: '123abc' % ' 123abc' ---
-int(0)
---- testing: '123abc' % '123 abc' ---
-int(0)
---- testing: '123abc' % '123abc ' ---
-int(0)
---- testing: '123abc' % '3.4a' ---
-int(0)
---- testing: '123abc' % 'a5.9' ---
-Exception: Modulo by zero
---- testing: '123e5' % '0' ---
-Exception: Modulo by zero
---- testing: '123e5' % '65' ---
-int(50)
---- testing: '123e5' % '-44' ---
-int(20)
---- testing: '123e5' % '1.2' ---
-int(0)
---- testing: '123e5' % '-7.7' ---
-int(6)
---- testing: '123e5' % 'abc' ---
-Exception: Modulo by zero
---- testing: '123e5' % '123abc' ---
-int(0)
---- testing: '123e5' % '123e5' ---
-int(0)
---- testing: '123e5' % '123e5xyz' ---
-int(0)
---- testing: '123e5' % ' 123abc' ---
-int(0)
---- testing: '123e5' % '123 abc' ---
-int(0)
---- testing: '123e5' % '123abc ' ---
-int(0)
---- testing: '123e5' % '3.4a' ---
-int(0)
---- testing: '123e5' % 'a5.9' ---
-Exception: Modulo by zero
---- testing: '123e5xyz' % '0' ---
-Exception: Modulo by zero
---- testing: '123e5xyz' % '65' ---
-int(50)
---- testing: '123e5xyz' % '-44' ---
-int(20)
---- testing: '123e5xyz' % '1.2' ---
-int(0)
---- testing: '123e5xyz' % '-7.7' ---
-int(6)
---- testing: '123e5xyz' % 'abc' ---
-Exception: Modulo by zero
---- testing: '123e5xyz' % '123abc' ---
-int(0)
---- testing: '123e5xyz' % '123e5' ---
-int(0)
---- testing: '123e5xyz' % '123e5xyz' ---
-int(0)
---- testing: '123e5xyz' % ' 123abc' ---
-int(0)
---- testing: '123e5xyz' % '123 abc' ---
-int(0)
---- testing: '123e5xyz' % '123abc ' ---
-int(0)
---- testing: '123e5xyz' % '3.4a' ---
-int(0)
---- testing: '123e5xyz' % 'a5.9' ---
-Exception: Modulo by zero
---- testing: ' 123abc' % '0' ---
-Exception: Modulo by zero
---- testing: ' 123abc' % '65' ---
-int(58)
---- testing: ' 123abc' % '-44' ---
-int(35)
---- testing: ' 123abc' % '1.2' ---
-int(0)
---- testing: ' 123abc' % '-7.7' ---
-int(4)
---- testing: ' 123abc' % 'abc' ---
-Exception: Modulo by zero
---- testing: ' 123abc' % '123abc' ---
-int(0)
---- testing: ' 123abc' % '123e5' ---
-int(123)
---- testing: ' 123abc' % '123e5xyz' ---
-int(123)
---- testing: ' 123abc' % ' 123abc' ---
-int(0)
---- testing: ' 123abc' % '123 abc' ---
-int(0)
---- testing: ' 123abc' % '123abc ' ---
-int(0)
---- testing: ' 123abc' % '3.4a' ---
-int(0)
---- testing: ' 123abc' % 'a5.9' ---
-Exception: Modulo by zero
---- testing: '123 abc' % '0' ---
-Exception: Modulo by zero
---- testing: '123 abc' % '65' ---
-int(58)
---- testing: '123 abc' % '-44' ---
-int(35)
---- testing: '123 abc' % '1.2' ---
-int(0)
---- testing: '123 abc' % '-7.7' ---
-int(4)
---- testing: '123 abc' % 'abc' ---
-Exception: Modulo by zero
---- testing: '123 abc' % '123abc' ---
-int(0)
---- testing: '123 abc' % '123e5' ---
-int(123)
---- testing: '123 abc' % '123e5xyz' ---
-int(123)
---- testing: '123 abc' % ' 123abc' ---
-int(0)
---- testing: '123 abc' % '123 abc' ---
-int(0)
---- testing: '123 abc' % '123abc ' ---
-int(0)
---- testing: '123 abc' % '3.4a' ---
-int(0)
---- testing: '123 abc' % 'a5.9' ---
-Exception: Modulo by zero
---- testing: '123abc ' % '0' ---
-Exception: Modulo by zero
---- testing: '123abc ' % '65' ---
-int(58)
---- testing: '123abc ' % '-44' ---
-int(35)
---- testing: '123abc ' % '1.2' ---
-int(0)
---- testing: '123abc ' % '-7.7' ---
-int(4)
---- testing: '123abc ' % 'abc' ---
-Exception: Modulo by zero
---- testing: '123abc ' % '123abc' ---
-int(0)
---- testing: '123abc ' % '123e5' ---
-int(123)
---- testing: '123abc ' % '123e5xyz' ---
-int(123)
---- testing: '123abc ' % ' 123abc' ---
-int(0)
---- testing: '123abc ' % '123 abc' ---
-int(0)
---- testing: '123abc ' % '123abc ' ---
-int(0)
---- testing: '123abc ' % '3.4a' ---
-int(0)
---- testing: '123abc ' % 'a5.9' ---
-Exception: Modulo by zero
---- testing: '3.4a' % '0' ---
-Exception: Modulo by zero
---- testing: '3.4a' % '65' ---
-int(3)
---- testing: '3.4a' % '-44' ---
-int(3)
---- testing: '3.4a' % '1.2' ---
-int(0)
---- testing: '3.4a' % '-7.7' ---
-int(3)
---- testing: '3.4a' % 'abc' ---
-Exception: Modulo by zero
---- testing: '3.4a' % '123abc' ---
-int(3)
---- testing: '3.4a' % '123e5' ---
-int(3)
---- testing: '3.4a' % '123e5xyz' ---
-int(3)
---- testing: '3.4a' % ' 123abc' ---
-int(3)
---- testing: '3.4a' % '123 abc' ---
-int(3)
---- testing: '3.4a' % '123abc ' ---
-int(3)
---- testing: '3.4a' % '3.4a' ---
-int(0)
---- testing: '3.4a' % 'a5.9' ---
-Exception: Modulo by zero
---- testing: 'a5.9' % '0' ---
-Exception: Modulo by zero
---- testing: 'a5.9' % '65' ---
-int(0)
---- testing: 'a5.9' % '-44' ---
-int(0)
---- testing: 'a5.9' % '1.2' ---
-int(0)
---- testing: 'a5.9' % '-7.7' ---
-int(0)
---- testing: 'a5.9' % 'abc' ---
-Exception: Modulo by zero
---- testing: 'a5.9' % '123abc' ---
-int(0)
---- testing: 'a5.9' % '123e5' ---
-int(0)
---- testing: 'a5.9' % '123e5xyz' ---
-int(0)
---- testing: 'a5.9' % ' 123abc' ---
-int(0)
---- testing: 'a5.9' % '123 abc' ---
-int(0)
---- testing: 'a5.9' % '123abc ' ---
-int(0)
---- testing: 'a5.9' % '3.4a' ---
-int(0)
---- testing: 'a5.9' % 'a5.9' ---
-Exception: Modulo by zero
-===DONE===
+--TEST--
+Test % operator : various numbers as strings
+--FILE--
+<?php
+
+$strVals = array(
+ "0","65","-44", "1.2", "-7.7", "abc", "123abc", "123e5", "123e5xyz", " 123abc", "123 abc", "123abc ", "3.4a",
+ "a5.9"
+);
+
+error_reporting(E_ERROR);
+
+foreach ($strVals as $strVal) {
+ foreach($strVals as $otherVal) {
+ echo "--- testing: '$strVal' % '$otherVal' ---\n";
+ try {
+ var_dump($strVal%$otherVal);
+ } catch (DivisionByZeroError $e) {
+ echo "Exception: " . $e->getMessage() . "\n";
+ }
+ }
+}
+
+
+?>
+===DONE===
+--EXPECT--
+--- testing: '0' % '0' ---
+Exception: Modulo by zero
+--- testing: '0' % '65' ---
+int(0)
+--- testing: '0' % '-44' ---
+int(0)
+--- testing: '0' % '1.2' ---
+int(0)
+--- testing: '0' % '-7.7' ---
+int(0)
+--- testing: '0' % 'abc' ---
+Exception: Modulo by zero
+--- testing: '0' % '123abc' ---
+int(0)
+--- testing: '0' % '123e5' ---
+int(0)
+--- testing: '0' % '123e5xyz' ---
+int(0)
+--- testing: '0' % ' 123abc' ---
+int(0)
+--- testing: '0' % '123 abc' ---
+int(0)
+--- testing: '0' % '123abc ' ---
+int(0)
+--- testing: '0' % '3.4a' ---
+int(0)
+--- testing: '0' % 'a5.9' ---
+Exception: Modulo by zero
+--- testing: '65' % '0' ---
+Exception: Modulo by zero
+--- testing: '65' % '65' ---
+int(0)
+--- testing: '65' % '-44' ---
+int(21)
+--- testing: '65' % '1.2' ---
+int(0)
+--- testing: '65' % '-7.7' ---
+int(2)
+--- testing: '65' % 'abc' ---
+Exception: Modulo by zero
+--- testing: '65' % '123abc' ---
+int(65)
+--- testing: '65' % '123e5' ---
+int(65)
+--- testing: '65' % '123e5xyz' ---
+int(65)
+--- testing: '65' % ' 123abc' ---
+int(65)
+--- testing: '65' % '123 abc' ---
+int(65)
+--- testing: '65' % '123abc ' ---
+int(65)
+--- testing: '65' % '3.4a' ---
+int(2)
+--- testing: '65' % 'a5.9' ---
+Exception: Modulo by zero
+--- testing: '-44' % '0' ---
+Exception: Modulo by zero
+--- testing: '-44' % '65' ---
+int(-44)
+--- testing: '-44' % '-44' ---
+int(0)
+--- testing: '-44' % '1.2' ---
+int(0)
+--- testing: '-44' % '-7.7' ---
+int(-2)
+--- testing: '-44' % 'abc' ---
+Exception: Modulo by zero
+--- testing: '-44' % '123abc' ---
+int(-44)
+--- testing: '-44' % '123e5' ---
+int(-44)
+--- testing: '-44' % '123e5xyz' ---
+int(-44)
+--- testing: '-44' % ' 123abc' ---
+int(-44)
+--- testing: '-44' % '123 abc' ---
+int(-44)
+--- testing: '-44' % '123abc ' ---
+int(-44)
+--- testing: '-44' % '3.4a' ---
+int(-2)
+--- testing: '-44' % 'a5.9' ---
+Exception: Modulo by zero
+--- testing: '1.2' % '0' ---
+Exception: Modulo by zero
+--- testing: '1.2' % '65' ---
+int(1)
+--- testing: '1.2' % '-44' ---
+int(1)
+--- testing: '1.2' % '1.2' ---
+int(0)
+--- testing: '1.2' % '-7.7' ---
+int(1)
+--- testing: '1.2' % 'abc' ---
+Exception: Modulo by zero
+--- testing: '1.2' % '123abc' ---
+int(1)
+--- testing: '1.2' % '123e5' ---
+int(1)
+--- testing: '1.2' % '123e5xyz' ---
+int(1)
+--- testing: '1.2' % ' 123abc' ---
+int(1)
+--- testing: '1.2' % '123 abc' ---
+int(1)
+--- testing: '1.2' % '123abc ' ---
+int(1)
+--- testing: '1.2' % '3.4a' ---
+int(1)
+--- testing: '1.2' % 'a5.9' ---
+Exception: Modulo by zero
+--- testing: '-7.7' % '0' ---
+Exception: Modulo by zero
+--- testing: '-7.7' % '65' ---
+int(-7)
+--- testing: '-7.7' % '-44' ---
+int(-7)
+--- testing: '-7.7' % '1.2' ---
+int(0)
+--- testing: '-7.7' % '-7.7' ---
+int(0)
+--- testing: '-7.7' % 'abc' ---
+Exception: Modulo by zero
+--- testing: '-7.7' % '123abc' ---
+int(-7)
+--- testing: '-7.7' % '123e5' ---
+int(-7)
+--- testing: '-7.7' % '123e5xyz' ---
+int(-7)
+--- testing: '-7.7' % ' 123abc' ---
+int(-7)
+--- testing: '-7.7' % '123 abc' ---
+int(-7)
+--- testing: '-7.7' % '123abc ' ---
+int(-7)
+--- testing: '-7.7' % '3.4a' ---
+int(-1)
+--- testing: '-7.7' % 'a5.9' ---
+Exception: Modulo by zero
+--- testing: 'abc' % '0' ---
+Exception: Modulo by zero
+--- testing: 'abc' % '65' ---
+int(0)
+--- testing: 'abc' % '-44' ---
+int(0)
+--- testing: 'abc' % '1.2' ---
+int(0)
+--- testing: 'abc' % '-7.7' ---
+int(0)
+--- testing: 'abc' % 'abc' ---
+Exception: Modulo by zero
+--- testing: 'abc' % '123abc' ---
+int(0)
+--- testing: 'abc' % '123e5' ---
+int(0)
+--- testing: 'abc' % '123e5xyz' ---
+int(0)
+--- testing: 'abc' % ' 123abc' ---
+int(0)
+--- testing: 'abc' % '123 abc' ---
+int(0)
+--- testing: 'abc' % '123abc ' ---
+int(0)
+--- testing: 'abc' % '3.4a' ---
+int(0)
+--- testing: 'abc' % 'a5.9' ---
+Exception: Modulo by zero
+--- testing: '123abc' % '0' ---
+Exception: Modulo by zero
+--- testing: '123abc' % '65' ---
+int(58)
+--- testing: '123abc' % '-44' ---
+int(35)
+--- testing: '123abc' % '1.2' ---
+int(0)
+--- testing: '123abc' % '-7.7' ---
+int(4)
+--- testing: '123abc' % 'abc' ---
+Exception: Modulo by zero
+--- testing: '123abc' % '123abc' ---
+int(0)
+--- testing: '123abc' % '123e5' ---
+int(123)
+--- testing: '123abc' % '123e5xyz' ---
+int(123)
+--- testing: '123abc' % ' 123abc' ---
+int(0)
+--- testing: '123abc' % '123 abc' ---
+int(0)
+--- testing: '123abc' % '123abc ' ---
+int(0)
+--- testing: '123abc' % '3.4a' ---
+int(0)
+--- testing: '123abc' % 'a5.9' ---
+Exception: Modulo by zero
+--- testing: '123e5' % '0' ---
+Exception: Modulo by zero
+--- testing: '123e5' % '65' ---
+int(50)
+--- testing: '123e5' % '-44' ---
+int(20)
+--- testing: '123e5' % '1.2' ---
+int(0)
+--- testing: '123e5' % '-7.7' ---
+int(6)
+--- testing: '123e5' % 'abc' ---
+Exception: Modulo by zero
+--- testing: '123e5' % '123abc' ---
+int(0)
+--- testing: '123e5' % '123e5' ---
+int(0)
+--- testing: '123e5' % '123e5xyz' ---
+int(0)
+--- testing: '123e5' % ' 123abc' ---
+int(0)
+--- testing: '123e5' % '123 abc' ---
+int(0)
+--- testing: '123e5' % '123abc ' ---
+int(0)
+--- testing: '123e5' % '3.4a' ---
+int(0)
+--- testing: '123e5' % 'a5.9' ---
+Exception: Modulo by zero
+--- testing: '123e5xyz' % '0' ---
+Exception: Modulo by zero
+--- testing: '123e5xyz' % '65' ---
+int(50)
+--- testing: '123e5xyz' % '-44' ---
+int(20)
+--- testing: '123e5xyz' % '1.2' ---
+int(0)
+--- testing: '123e5xyz' % '-7.7' ---
+int(6)
+--- testing: '123e5xyz' % 'abc' ---
+Exception: Modulo by zero
+--- testing: '123e5xyz' % '123abc' ---
+int(0)
+--- testing: '123e5xyz' % '123e5' ---
+int(0)
+--- testing: '123e5xyz' % '123e5xyz' ---
+int(0)
+--- testing: '123e5xyz' % ' 123abc' ---
+int(0)
+--- testing: '123e5xyz' % '123 abc' ---
+int(0)
+--- testing: '123e5xyz' % '123abc ' ---
+int(0)
+--- testing: '123e5xyz' % '3.4a' ---
+int(0)
+--- testing: '123e5xyz' % 'a5.9' ---
+Exception: Modulo by zero
+--- testing: ' 123abc' % '0' ---
+Exception: Modulo by zero
+--- testing: ' 123abc' % '65' ---
+int(58)
+--- testing: ' 123abc' % '-44' ---
+int(35)
+--- testing: ' 123abc' % '1.2' ---
+int(0)
+--- testing: ' 123abc' % '-7.7' ---
+int(4)
+--- testing: ' 123abc' % 'abc' ---
+Exception: Modulo by zero
+--- testing: ' 123abc' % '123abc' ---
+int(0)
+--- testing: ' 123abc' % '123e5' ---
+int(123)
+--- testing: ' 123abc' % '123e5xyz' ---
+int(123)
+--- testing: ' 123abc' % ' 123abc' ---
+int(0)
+--- testing: ' 123abc' % '123 abc' ---
+int(0)
+--- testing: ' 123abc' % '123abc ' ---
+int(0)
+--- testing: ' 123abc' % '3.4a' ---
+int(0)
+--- testing: ' 123abc' % 'a5.9' ---
+Exception: Modulo by zero
+--- testing: '123 abc' % '0' ---
+Exception: Modulo by zero
+--- testing: '123 abc' % '65' ---
+int(58)
+--- testing: '123 abc' % '-44' ---
+int(35)
+--- testing: '123 abc' % '1.2' ---
+int(0)
+--- testing: '123 abc' % '-7.7' ---
+int(4)
+--- testing: '123 abc' % 'abc' ---
+Exception: Modulo by zero
+--- testing: '123 abc' % '123abc' ---
+int(0)
+--- testing: '123 abc' % '123e5' ---
+int(123)
+--- testing: '123 abc' % '123e5xyz' ---
+int(123)
+--- testing: '123 abc' % ' 123abc' ---
+int(0)
+--- testing: '123 abc' % '123 abc' ---
+int(0)
+--- testing: '123 abc' % '123abc ' ---
+int(0)
+--- testing: '123 abc' % '3.4a' ---
+int(0)
+--- testing: '123 abc' % 'a5.9' ---
+Exception: Modulo by zero
+--- testing: '123abc ' % '0' ---
+Exception: Modulo by zero
+--- testing: '123abc ' % '65' ---
+int(58)
+--- testing: '123abc ' % '-44' ---
+int(35)
+--- testing: '123abc ' % '1.2' ---
+int(0)
+--- testing: '123abc ' % '-7.7' ---
+int(4)
+--- testing: '123abc ' % 'abc' ---
+Exception: Modulo by zero
+--- testing: '123abc ' % '123abc' ---
+int(0)
+--- testing: '123abc ' % '123e5' ---
+int(123)
+--- testing: '123abc ' % '123e5xyz' ---
+int(123)
+--- testing: '123abc ' % ' 123abc' ---
+int(0)
+--- testing: '123abc ' % '123 abc' ---
+int(0)
+--- testing: '123abc ' % '123abc ' ---
+int(0)
+--- testing: '123abc ' % '3.4a' ---
+int(0)
+--- testing: '123abc ' % 'a5.9' ---
+Exception: Modulo by zero
+--- testing: '3.4a' % '0' ---
+Exception: Modulo by zero
+--- testing: '3.4a' % '65' ---
+int(3)
+--- testing: '3.4a' % '-44' ---
+int(3)
+--- testing: '3.4a' % '1.2' ---
+int(0)
+--- testing: '3.4a' % '-7.7' ---
+int(3)
+--- testing: '3.4a' % 'abc' ---
+Exception: Modulo by zero
+--- testing: '3.4a' % '123abc' ---
+int(3)
+--- testing: '3.4a' % '123e5' ---
+int(3)
+--- testing: '3.4a' % '123e5xyz' ---
+int(3)
+--- testing: '3.4a' % ' 123abc' ---
+int(3)
+--- testing: '3.4a' % '123 abc' ---
+int(3)
+--- testing: '3.4a' % '123abc ' ---
+int(3)
+--- testing: '3.4a' % '3.4a' ---
+int(0)
+--- testing: '3.4a' % 'a5.9' ---
+Exception: Modulo by zero
+--- testing: 'a5.9' % '0' ---
+Exception: Modulo by zero
+--- testing: 'a5.9' % '65' ---
+int(0)
+--- testing: 'a5.9' % '-44' ---
+int(0)
+--- testing: 'a5.9' % '1.2' ---
+int(0)
+--- testing: 'a5.9' % '-7.7' ---
+int(0)
+--- testing: 'a5.9' % 'abc' ---
+Exception: Modulo by zero
+--- testing: 'a5.9' % '123abc' ---
+int(0)
+--- testing: 'a5.9' % '123e5' ---
+int(0)
+--- testing: 'a5.9' % '123e5xyz' ---
+int(0)
+--- testing: 'a5.9' % ' 123abc' ---
+int(0)
+--- testing: 'a5.9' % '123 abc' ---
+int(0)
+--- testing: 'a5.9' % '123abc ' ---
+int(0)
+--- testing: 'a5.9' % '3.4a' ---
+int(0)
+--- testing: 'a5.9' % 'a5.9' ---
+Exception: Modulo by zero
+===DONE===
diff --git a/tests/lang/operators/multiply_basiclong_64bit.phpt b/tests/lang/operators/multiply_basiclong_64bit.phpt
index 4c7077bf3b..31d9188a77 100644
--- a/tests/lang/operators/multiply_basiclong_64bit.phpt
+++ b/tests/lang/operators/multiply_basiclong_64bit.phpt
@@ -1,44 +1,44 @@
---TEST--
-Test * operator : 64bit long tests
---SKIPIF--
-<?php
-if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platform only");
-?>
---FILE--
-<?php
-
-define("MAX_64Bit", 9223372036854775807);
-define("MAX_32Bit", 2147483647);
-define("MIN_64Bit", -9223372036854775807 - 1);
-define("MIN_32Bit", -2147483647 - 1);
-
-$longVals = array(
- MAX_64Bit, MIN_64Bit, MAX_32Bit, MIN_32Bit, MAX_64Bit - MAX_32Bit, MIN_64Bit - MIN_32Bit,
- MAX_32Bit + 1, MIN_32Bit - 1, MAX_32Bit * 2, (MAX_32Bit * 2) + 1, (MAX_32Bit * 2) - 1,
- MAX_64Bit -1, MAX_64Bit + 1, MIN_64Bit + 1, MIN_64Bit - 1
-);
-
-$otherVals = array(0, 1, -1, 7, 9, 65, -44, MAX_32Bit, MAX_64Bit);
-
-error_reporting(E_ERROR);
-
-foreach ($longVals as $longVal) {
- foreach($otherVals as $otherVal) {
- echo "--- testing: $longVal * $otherVal ---\n";
- var_dump($longVal*$otherVal);
- }
-}
-
-foreach ($otherVals as $otherVal) {
- foreach($longVals as $longVal) {
- echo "--- testing: $otherVal * $longVal ---\n";
- var_dump($otherVal*$longVal);
- }
-}
-
-?>
-===DONE===
---EXPECT--
+--TEST--
+Test * operator : 64bit long tests
+--SKIPIF--
+<?php
+if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platform only");
+?>
+--FILE--
+<?php
+
+define("MAX_64Bit", 9223372036854775807);
+define("MAX_32Bit", 2147483647);
+define("MIN_64Bit", -9223372036854775807 - 1);
+define("MIN_32Bit", -2147483647 - 1);
+
+$longVals = array(
+ MAX_64Bit, MIN_64Bit, MAX_32Bit, MIN_32Bit, MAX_64Bit - MAX_32Bit, MIN_64Bit - MIN_32Bit,
+ MAX_32Bit + 1, MIN_32Bit - 1, MAX_32Bit * 2, (MAX_32Bit * 2) + 1, (MAX_32Bit * 2) - 1,
+ MAX_64Bit -1, MAX_64Bit + 1, MIN_64Bit + 1, MIN_64Bit - 1
+);
+
+$otherVals = array(0, 1, -1, 7, 9, 65, -44, MAX_32Bit, MAX_64Bit);
+
+error_reporting(E_ERROR);
+
+foreach ($longVals as $longVal) {
+ foreach($otherVals as $otherVal) {
+ echo "--- testing: $longVal * $otherVal ---\n";
+ var_dump($longVal*$otherVal);
+ }
+}
+
+foreach ($otherVals as $otherVal) {
+ foreach($longVals as $longVal) {
+ echo "--- testing: $otherVal * $longVal ---\n";
+ var_dump($otherVal*$longVal);
+ }
+}
+
+?>
+===DONE===
+--EXPECT--
--- testing: 9223372036854775807 * 0 ---
int(0)
--- testing: 9223372036854775807 * 1 ---
@@ -578,5 +578,5 @@ float(8.5070591730235E+37)
--- testing: 9223372036854775807 * -9223372036854775807 ---
float(-8.5070591730235E+37)
--- testing: 9223372036854775807 * -9.2233720368548E+18 ---
-float(-8.5070591730235E+37)
-===DONE===
+float(-8.5070591730235E+37)
+===DONE===
diff --git a/tests/lang/operators/multiply_variationStr.phpt b/tests/lang/operators/multiply_variationStr.phpt
index 30d5f79f1a..01d7e05074 100644
--- a/tests/lang/operators/multiply_variationStr.phpt
+++ b/tests/lang/operators/multiply_variationStr.phpt
@@ -1,26 +1,26 @@
---TEST--
-Test * operator : various numbers as strings
---FILE--
-<?php
-
-$strVals = array(
- "0","65","-44", "1.2", "-7.7", "abc", "123abc", "123e5", "123e5xyz", " 123abc", "123 abc", "123abc ", "3.4a",
- "a5.9"
-);
-
-error_reporting(E_ERROR);
-
-foreach ($strVals as $strVal) {
- foreach($strVals as $otherVal) {
- echo "--- testing: '$strVal' * '$otherVal' ---\n";
- var_dump($strVal*$otherVal);
- }
-}
-
-
-?>
-===DONE===
---EXPECT--
+--TEST--
+Test * operator : various numbers as strings
+--FILE--
+<?php
+
+$strVals = array(
+ "0","65","-44", "1.2", "-7.7", "abc", "123abc", "123e5", "123e5xyz", " 123abc", "123 abc", "123abc ", "3.4a",
+ "a5.9"
+);
+
+error_reporting(E_ERROR);
+
+foreach ($strVals as $strVal) {
+ foreach($strVals as $otherVal) {
+ echo "--- testing: '$strVal' * '$otherVal' ---\n";
+ var_dump($strVal*$otherVal);
+ }
+}
+
+
+?>
+===DONE===
+--EXPECT--
--- testing: '0' * '0' ---
int(0)
--- testing: '0' * '65' ---
@@ -412,5 +412,5 @@ int(0)
--- testing: 'a5.9' * '3.4a' ---
float(0)
--- testing: 'a5.9' * 'a5.9' ---
-int(0)
-===DONE===
+int(0)
+===DONE===
diff --git a/tests/lang/operators/negate_basiclong_64bit.phpt b/tests/lang/operators/negate_basiclong_64bit.phpt
index e0cf10da69..47b25e5397 100644
--- a/tests/lang/operators/negate_basiclong_64bit.phpt
+++ b/tests/lang/operators/negate_basiclong_64bit.phpt
@@ -1,32 +1,32 @@
---TEST--
-Test -N operator : 64bit long tests
---SKIPIF--
-<?php
-if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platform only");
-?>
---FILE--
-<?php
-
-define("MAX_64Bit", 9223372036854775807);
-define("MAX_32Bit", 2147483647);
-define("MIN_64Bit", -9223372036854775807 - 1);
-define("MIN_32Bit", -2147483647 - 1);
-
-$longVals = array(
- MAX_64Bit, MIN_64Bit, MAX_32Bit, MIN_32Bit, MAX_64Bit - MAX_32Bit, MIN_64Bit - MIN_32Bit,
- MAX_32Bit + 1, MIN_32Bit - 1, MAX_32Bit * 2, (MAX_32Bit * 2) + 1, (MAX_32Bit * 2) - 1,
- MAX_64Bit -1, MAX_64Bit + 1, MIN_64Bit + 1, MIN_64Bit - 1
-);
-
-
-foreach ($longVals as $longVal) {
- echo "--- testing: $longVal ---\n";
- var_dump(-$longVal);
-}
-
-?>
-===DONE===
---EXPECT--
+--TEST--
+Test -N operator : 64bit long tests
+--SKIPIF--
+<?php
+if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platform only");
+?>
+--FILE--
+<?php
+
+define("MAX_64Bit", 9223372036854775807);
+define("MAX_32Bit", 2147483647);
+define("MIN_64Bit", -9223372036854775807 - 1);
+define("MIN_32Bit", -2147483647 - 1);
+
+$longVals = array(
+ MAX_64Bit, MIN_64Bit, MAX_32Bit, MIN_32Bit, MAX_64Bit - MAX_32Bit, MIN_64Bit - MIN_32Bit,
+ MAX_32Bit + 1, MIN_32Bit - 1, MAX_32Bit * 2, (MAX_32Bit * 2) + 1, (MAX_32Bit * 2) - 1,
+ MAX_64Bit -1, MAX_64Bit + 1, MIN_64Bit + 1, MIN_64Bit - 1
+);
+
+
+foreach ($longVals as $longVal) {
+ echo "--- testing: $longVal ---\n";
+ var_dump(-$longVal);
+}
+
+?>
+===DONE===
+--EXPECT--
--- testing: 9223372036854775807 ---
int(-9223372036854775807)
--- testing: -9223372036854775808 ---
@@ -56,5 +56,5 @@ float(-9.2233720368548E+18)
--- testing: -9223372036854775807 ---
int(9223372036854775807)
--- testing: -9.2233720368548E+18 ---
-float(9.2233720368548E+18)
-===DONE===
+float(9.2233720368548E+18)
+===DONE===
diff --git a/tests/lang/operators/negate_variationStr.phpt b/tests/lang/operators/negate_variationStr.phpt
index 7405d42882..ccff2fba2c 100644
--- a/tests/lang/operators/negate_variationStr.phpt
+++ b/tests/lang/operators/negate_variationStr.phpt
@@ -1,22 +1,22 @@
---TEST--
-Test -N operator : various numbers as strings
---FILE--
-<?php
-
-$strVals = array(
- "0","65","-44", "1.2", "-7.7", "abc", "123abc", "123e5", "123e5xyz", " 123abc", "123 abc", "123abc ", "3.4a",
- "a5.9"
-);
-
-
-foreach ($strVals as $strVal) {
- echo "--- testing: '$strVal' ---\n";
- var_dump(-$strVal);
-}
-
-?>
-===DONE===
---EXPECTF--
+--TEST--
+Test -N operator : various numbers as strings
+--FILE--
+<?php
+
+$strVals = array(
+ "0","65","-44", "1.2", "-7.7", "abc", "123abc", "123e5", "123e5xyz", " 123abc", "123 abc", "123abc ", "3.4a",
+ "a5.9"
+);
+
+
+foreach ($strVals as $strVal) {
+ echo "--- testing: '$strVal' ---\n";
+ var_dump(-$strVal);
+}
+
+?>
+===DONE===
+--EXPECTF--
--- testing: '0' ---
int(0)
--- testing: '65' ---
@@ -60,5 +60,5 @@ float(-3.4)
--- testing: 'a5.9' ---
Warning: A non-numeric value encountered in %s on line %d
-int(0)
-===DONE===
+int(0)
+===DONE===
diff --git a/tests/lang/operators/operator_equals_basic.phpt b/tests/lang/operators/operator_equals_basic.phpt
index 3cb2704444..9de4ed1a2a 100644
--- a/tests/lang/operators/operator_equals_basic.phpt
+++ b/tests/lang/operators/operator_equals_basic.phpt
@@ -1,65 +1,65 @@
---TEST--
-Test == operator : different types
---FILE--
-<?php
-
-$valid_true = array(1, "1", "true", 1.0, array(1));
-$valid_false = array(0, "", 0.0, array(), NULL);
-
-$int1 = 679;
-$int2 = -67835;
-$valid_int1 = array("679", "679abc", " 679", "679 ", 679.0, 6.79E2, "+679", +679);
-$valid_int2 = array("-67835", "-67835abc", " -67835", "-67835 ", -67835.000, -6.7835E4);
-$invalid_int1 = array("6 7 9", "6y79", 678);
-$invalid_int2 = array("- 67835", "-67,835", "-67 835", "-678y35", -76834);
-
-$float1 = 57385.45835;
-$float2 = -67345.76567;
-$valid_float1 = array("57385.45835", "57385.45835aaa", " 57385.45835", 5.738545835e4);
-$valid_float2 = array("-67345.76567", "-67345.76567aaa", " -67345.76567", -6.734576567E4);
-$invalid_float1 = array("57385. 45835", "57,385.45835", 57385.45834, 5.738545834e4);
-$invalid_float2 = array("- 67345.76567", "-67,345.76567", -67345.76566, -6.734576566E4);
-
-
-$toCompare = array(
- true, $valid_true, $valid_false,
- false, $valid_false, $valid_true,
- $int1, $valid_int1, $invalid_int1,
- $int2, $valid_int2, $invalid_int2,
- $float1, $valid_float1, $invalid_float1,
- $float2, $valid_float2, $invalid_float2
-);
-
-$failed = false;
-for ($i = 0; $i < count($toCompare); $i +=3) {
- $typeToTest = $toCompare[$i];
- $valid_compares = $toCompare[$i + 1];
- $invalid_compares = $toCompare[$i + 2];
-
- foreach($valid_compares as $compareVal) {
- if ($typeToTest == $compareVal) {
- // do nothing
- }
- else {
- echo "FAILED: '$typeToTest' != '$compareVal'\n";
- $failed = true;
- }
- }
-
- foreach($invalid_compares as $compareVal) {
- if ($typeToTest == $compareVal) {
- echo "FAILED: '$typeToTest' == '$compareVal'\n";
- $failed = true;
- }
- }
-
-}
-if ($failed == false) {
- echo "Test Passed\n";
-}
-
-?>
-===DONE===
---EXPECT--
-Test Passed
+--TEST--
+Test == operator : different types
+--FILE--
+<?php
+
+$valid_true = array(1, "1", "true", 1.0, array(1));
+$valid_false = array(0, "", 0.0, array(), NULL);
+
+$int1 = 679;
+$int2 = -67835;
+$valid_int1 = array("679", "679abc", " 679", "679 ", 679.0, 6.79E2, "+679", +679);
+$valid_int2 = array("-67835", "-67835abc", " -67835", "-67835 ", -67835.000, -6.7835E4);
+$invalid_int1 = array("6 7 9", "6y79", 678);
+$invalid_int2 = array("- 67835", "-67,835", "-67 835", "-678y35", -76834);
+
+$float1 = 57385.45835;
+$float2 = -67345.76567;
+$valid_float1 = array("57385.45835", "57385.45835aaa", " 57385.45835", 5.738545835e4);
+$valid_float2 = array("-67345.76567", "-67345.76567aaa", " -67345.76567", -6.734576567E4);
+$invalid_float1 = array("57385. 45835", "57,385.45835", 57385.45834, 5.738545834e4);
+$invalid_float2 = array("- 67345.76567", "-67,345.76567", -67345.76566, -6.734576566E4);
+
+
+$toCompare = array(
+ true, $valid_true, $valid_false,
+ false, $valid_false, $valid_true,
+ $int1, $valid_int1, $invalid_int1,
+ $int2, $valid_int2, $invalid_int2,
+ $float1, $valid_float1, $invalid_float1,
+ $float2, $valid_float2, $invalid_float2
+);
+
+$failed = false;
+for ($i = 0; $i < count($toCompare); $i +=3) {
+ $typeToTest = $toCompare[$i];
+ $valid_compares = $toCompare[$i + 1];
+ $invalid_compares = $toCompare[$i + 2];
+
+ foreach($valid_compares as $compareVal) {
+ if ($typeToTest == $compareVal) {
+ // do nothing
+ }
+ else {
+ echo "FAILED: '$typeToTest' != '$compareVal'\n";
+ $failed = true;
+ }
+ }
+
+ foreach($invalid_compares as $compareVal) {
+ if ($typeToTest == $compareVal) {
+ echo "FAILED: '$typeToTest' == '$compareVal'\n";
+ $failed = true;
+ }
+ }
+
+}
+if ($failed == false) {
+ echo "Test Passed\n";
+}
+
+?>
+===DONE===
+--EXPECT--
+Test Passed
===DONE===
diff --git a/tests/lang/operators/operator_equals_variation.phpt b/tests/lang/operators/operator_equals_variation.phpt
index f7dc32868c..d72253404b 100644
--- a/tests/lang/operators/operator_equals_variation.phpt
+++ b/tests/lang/operators/operator_equals_variation.phpt
@@ -1,63 +1,63 @@
---TEST--
-Test == operator : max int 32bit range
---SKIPIF--
-<?php
-if (PHP_INT_SIZE != 4) die("skip this test is for 32bit platform only");
-?>
---FILE--
-<?php
-
-define("MAX_64Bit", 9223372036854775807);
-define("MAX_32Bit", 2147483647);
-define("MIN_64Bit", -9223372036854775807 - 1);
-define("MIN_32Bit", -2147483647 - 1);
-
-$validEqual = array (
-MAX_32Bit, array(MAX_32Bit, "2147483647", "2147483647.0000000", 2.147483647e9, 2147483647.0),
-MIN_32Bit, array(MIN_32Bit, "-2147483648", "-2147483648.000", -2.147483648e9, -2147483648.0),
-MAX_64Bit, array(MAX_64Bit, MAX_64Bit + 1, MAX_64Bit - 1),
-MIN_64Bit, array(MIN_64Bit, MIN_64Bit - 1, MIN_64Bit + 1),
-);
-
-$invalidEqual = array (
-MAX_32Bit, array("2147483648", 2.1474836470001e9, MAX_32Bit - 1, MAX_32Bit + 1),
-MIN_32Bit, array("-2147483649", -2.1474836480001e9, MIN_32Bit -1, MIN_32Bit + 1),
-);
-
-
-$failed = false;
-// test valid values
-for ($i = 0; $i < count($validEqual); $i +=2) {
- $typeToTestVal = $validEqual[$i];
- $compares = $validEqual[$i + 1];
- foreach($compares as $compareVal) {
- if ($typeToTestVal == $compareVal) {
- // do nothing
- }
- else {
- echo "FAILED: '$typeToTestVal' != '$compareVal'\n";
- $failed = true;
- }
- }
-}
-// test invalid values
-for ($i = 0; $i < count($invalidEqual); $i +=2) {
- $typeToTestVal = $invalidEqual[$i];
- $compares = $invalidEqual[$i + 1];
- foreach($compares as $compareVal) {
- if ($typeToTestVal == $compareVal) {
- echo "FAILED: '$typeToTestVal' == '$compareVal'\n";
- $failed = true;
- }
- }
-}
-
-if ($failed == false) {
- echo "Test Passed\n";
-}
-
-?>
-===DONE===
---EXPECT--
-Test Passed
+--TEST--
+Test == operator : max int 32bit range
+--SKIPIF--
+<?php
+if (PHP_INT_SIZE != 4) die("skip this test is for 32bit platform only");
+?>
+--FILE--
+<?php
+
+define("MAX_64Bit", 9223372036854775807);
+define("MAX_32Bit", 2147483647);
+define("MIN_64Bit", -9223372036854775807 - 1);
+define("MIN_32Bit", -2147483647 - 1);
+
+$validEqual = array (
+MAX_32Bit, array(MAX_32Bit, "2147483647", "2147483647.0000000", 2.147483647e9, 2147483647.0),
+MIN_32Bit, array(MIN_32Bit, "-2147483648", "-2147483648.000", -2.147483648e9, -2147483648.0),
+MAX_64Bit, array(MAX_64Bit, MAX_64Bit + 1, MAX_64Bit - 1),
+MIN_64Bit, array(MIN_64Bit, MIN_64Bit - 1, MIN_64Bit + 1),
+);
+
+$invalidEqual = array (
+MAX_32Bit, array("2147483648", 2.1474836470001e9, MAX_32Bit - 1, MAX_32Bit + 1),
+MIN_32Bit, array("-2147483649", -2.1474836480001e9, MIN_32Bit -1, MIN_32Bit + 1),
+);
+
+
+$failed = false;
+// test valid values
+for ($i = 0; $i < count($validEqual); $i +=2) {
+ $typeToTestVal = $validEqual[$i];
+ $compares = $validEqual[$i + 1];
+ foreach($compares as $compareVal) {
+ if ($typeToTestVal == $compareVal) {
+ // do nothing
+ }
+ else {
+ echo "FAILED: '$typeToTestVal' != '$compareVal'\n";
+ $failed = true;
+ }
+ }
+}
+// test invalid values
+for ($i = 0; $i < count($invalidEqual); $i +=2) {
+ $typeToTestVal = $invalidEqual[$i];
+ $compares = $invalidEqual[$i + 1];
+ foreach($compares as $compareVal) {
+ if ($typeToTestVal == $compareVal) {
+ echo "FAILED: '$typeToTestVal' == '$compareVal'\n";
+ $failed = true;
+ }
+ }
+}
+
+if ($failed == false) {
+ echo "Test Passed\n";
+}
+
+?>
+===DONE===
+--EXPECT--
+Test Passed
===DONE===
diff --git a/tests/lang/operators/operator_equals_variation_64bit.phpt b/tests/lang/operators/operator_equals_variation_64bit.phpt
index 6329225fcc..ada6c2d7ec 100644
--- a/tests/lang/operators/operator_equals_variation_64bit.phpt
+++ b/tests/lang/operators/operator_equals_variation_64bit.phpt
@@ -1,65 +1,65 @@
---TEST--
-Test == operator : max int 64bit range
---SKIPIF--
-<?php
-if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platform only");
-?>
---FILE--
-<?php
-
-define("MAX_64Bit", 9223372036854775807);
-define("MAX_32Bit", 2147483647);
-define("MIN_64Bit", -9223372036854775807 - 1);
-define("MIN_32Bit", -2147483647 - 1);
-
-$validEqual = array (
-MAX_32Bit, array(MAX_32Bit, "2147483647", "2147483647.0000000", 2.147483647e9),
-MIN_32Bit, array(MIN_32Bit, "-2147483648", "-2147483648.000", -2.147483648e9),
-MAX_64Bit, array(MAX_64Bit, MAX_64Bit + 1),
-MIN_64Bit, array(MIN_64Bit, MIN_64Bit - 1),
-);
-
-$invalidEqual = array (
-MAX_32Bit, array("2147483648", 2.1474836470001e9, MAX_32Bit - 1, MAX_32Bit + 1),
-MIN_32Bit, array("-2147483649", -2.1474836480001e9, MIN_32Bit -1, MIN_32Bit + 1),
-MAX_64Bit, array(MAX_64Bit - 1),
-MIN_64Bit, array(MIN_64Bit + 1),
-);
-
-
-$failed = false;
-// test valid values
-for ($i = 0; $i < count($validEqual); $i +=2) {
- $typeToTestVal = $validEqual[$i];
- $compares = $validEqual[$i + 1];
- foreach($compares as $compareVal) {
- if ($typeToTestVal == $compareVal) {
- // do nothing
- }
- else {
- echo "FAILED: '$typeToTestVal' != '$compareVal'\n";
- $failed = true;
- }
- }
-}
-// test invalid values
-for ($i = 0; $i < count($invalidEqual); $i +=2) {
- $typeToTestVal = $invalidEqual[$i];
- $compares = $invalidEqual[$i + 1];
- foreach($compares as $compareVal) {
- if ($typeToTestVal == $compareVal) {
- echo "FAILED: '$typeToTestVal' == '$compareVal'\n";
- $failed = true;
- }
- }
-}
-
-if ($failed == false) {
- echo "Test Passed\n";
-}
-
-?>
-===DONE===
---EXPECT--
-Test Passed
+--TEST--
+Test == operator : max int 64bit range
+--SKIPIF--
+<?php
+if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platform only");
+?>
+--FILE--
+<?php
+
+define("MAX_64Bit", 9223372036854775807);
+define("MAX_32Bit", 2147483647);
+define("MIN_64Bit", -9223372036854775807 - 1);
+define("MIN_32Bit", -2147483647 - 1);
+
+$validEqual = array (
+MAX_32Bit, array(MAX_32Bit, "2147483647", "2147483647.0000000", 2.147483647e9),
+MIN_32Bit, array(MIN_32Bit, "-2147483648", "-2147483648.000", -2.147483648e9),
+MAX_64Bit, array(MAX_64Bit, MAX_64Bit + 1),
+MIN_64Bit, array(MIN_64Bit, MIN_64Bit - 1),
+);
+
+$invalidEqual = array (
+MAX_32Bit, array("2147483648", 2.1474836470001e9, MAX_32Bit - 1, MAX_32Bit + 1),
+MIN_32Bit, array("-2147483649", -2.1474836480001e9, MIN_32Bit -1, MIN_32Bit + 1),
+MAX_64Bit, array(MAX_64Bit - 1),
+MIN_64Bit, array(MIN_64Bit + 1),
+);
+
+
+$failed = false;
+// test valid values
+for ($i = 0; $i < count($validEqual); $i +=2) {
+ $typeToTestVal = $validEqual[$i];
+ $compares = $validEqual[$i + 1];
+ foreach($compares as $compareVal) {
+ if ($typeToTestVal == $compareVal) {
+ // do nothing
+ }
+ else {
+ echo "FAILED: '$typeToTestVal' != '$compareVal'\n";
+ $failed = true;
+ }
+ }
+}
+// test invalid values
+for ($i = 0; $i < count($invalidEqual); $i +=2) {
+ $typeToTestVal = $invalidEqual[$i];
+ $compares = $invalidEqual[$i + 1];
+ foreach($compares as $compareVal) {
+ if ($typeToTestVal == $compareVal) {
+ echo "FAILED: '$typeToTestVal' == '$compareVal'\n";
+ $failed = true;
+ }
+ }
+}
+
+if ($failed == false) {
+ echo "Test Passed\n";
+}
+
+?>
+===DONE===
+--EXPECT--
+Test Passed
===DONE===
diff --git a/tests/lang/operators/operator_gt_basic.phpt b/tests/lang/operators/operator_gt_basic.phpt
index c410b19dc8..db856c62e6 100644
--- a/tests/lang/operators/operator_gt_basic.phpt
+++ b/tests/lang/operators/operator_gt_basic.phpt
@@ -1,65 +1,65 @@
---TEST--
-Test > operator : different types
---FILE--
-<?php
-$valid_true = array(1, "1", "true", 1.0, array(1));
-$valid_false = array(0, "", 0.0, array(), NULL);
-
-$int1 = 679;
-$int2 = -67835;
-$valid_int1 = array("678", "678abc", " 678", "678 ", 678.0, 6.789E2, "+678", +678);
-$valid_int2 = array("-67836", "-67836abc", " -67836", "-67836 ", -67835.0001, -6.78351E4);
-$invalid_int1 = array(679, "679");
-$invalid_int2 = array(-67835, "-67835");
-
-$float1 = 57385.45835;
-$float2 = -67345.76567;
-$valid_float1 = array("57385.45834", "57385.45834aaa", " 57385.45834", 5.738545834e4);
-$valid_float2 = array("-67345.76568", "-67345.76568aaa", " -67345.76568", -6.734576568E4);
-$invalid_float1 = array(57385.45835, 5.738545835e4);
-$invalid_float2 = array(-67345.76567, -6.734576567E4);
-
-
-$toCompare = array(
-// boolean test will result in both sides being converted to boolean so !0 = true and true is not > true for example
-// also note that a string of "0" is converted to false but a string of "0.0" is converted to true
-// false cannot be tested as 0 can never be > 0 or 1
- true, $valid_false, $valid_true,
- $int1, $valid_int1, $invalid_int1,
- $int2, $valid_int2, $invalid_int2,
- $float1, $valid_float1, $invalid_float1,
- $float2, $valid_float2, $invalid_float2
-);
-
-$failed = false;
-for ($i = 0; $i < count($toCompare); $i +=3) {
- $typeToTest = $toCompare[$i];
- $valid_compares = $toCompare[$i + 1];
- $invalid_compares = $toCompare[$i + 2];
-
- foreach($valid_compares as $compareVal) {
- if ($typeToTest > $compareVal) {
- // do nothing
- }
- else {
- echo "FAILED: '$typeToTest' <= '$compareVal'\n";
- $failed = true;
- }
- }
-
- foreach($invalid_compares as $compareVal) {
- if ($typeToTest > $compareVal) {
- echo "FAILED: '$typeToTest' > '$compareVal'\n";
- $failed = true;
- }
- }
-
-}
-if ($failed == false) {
- echo "Test Passed\n";
-}
-?>
-===DONE===
---EXPECT--
-Test Passed
+--TEST--
+Test > operator : different types
+--FILE--
+<?php
+$valid_true = array(1, "1", "true", 1.0, array(1));
+$valid_false = array(0, "", 0.0, array(), NULL);
+
+$int1 = 679;
+$int2 = -67835;
+$valid_int1 = array("678", "678abc", " 678", "678 ", 678.0, 6.789E2, "+678", +678);
+$valid_int2 = array("-67836", "-67836abc", " -67836", "-67836 ", -67835.0001, -6.78351E4);
+$invalid_int1 = array(679, "679");
+$invalid_int2 = array(-67835, "-67835");
+
+$float1 = 57385.45835;
+$float2 = -67345.76567;
+$valid_float1 = array("57385.45834", "57385.45834aaa", " 57385.45834", 5.738545834e4);
+$valid_float2 = array("-67345.76568", "-67345.76568aaa", " -67345.76568", -6.734576568E4);
+$invalid_float1 = array(57385.45835, 5.738545835e4);
+$invalid_float2 = array(-67345.76567, -6.734576567E4);
+
+
+$toCompare = array(
+// boolean test will result in both sides being converted to boolean so !0 = true and true is not > true for example
+// also note that a string of "0" is converted to false but a string of "0.0" is converted to true
+// false cannot be tested as 0 can never be > 0 or 1
+ true, $valid_false, $valid_true,
+ $int1, $valid_int1, $invalid_int1,
+ $int2, $valid_int2, $invalid_int2,
+ $float1, $valid_float1, $invalid_float1,
+ $float2, $valid_float2, $invalid_float2
+);
+
+$failed = false;
+for ($i = 0; $i < count($toCompare); $i +=3) {
+ $typeToTest = $toCompare[$i];
+ $valid_compares = $toCompare[$i + 1];
+ $invalid_compares = $toCompare[$i + 2];
+
+ foreach($valid_compares as $compareVal) {
+ if ($typeToTest > $compareVal) {
+ // do nothing
+ }
+ else {
+ echo "FAILED: '$typeToTest' <= '$compareVal'\n";
+ $failed = true;
+ }
+ }
+
+ foreach($invalid_compares as $compareVal) {
+ if ($typeToTest > $compareVal) {
+ echo "FAILED: '$typeToTest' > '$compareVal'\n";
+ $failed = true;
+ }
+ }
+
+}
+if ($failed == false) {
+ echo "Test Passed\n";
+}
+?>
+===DONE===
+--EXPECT--
+Test Passed
===DONE===
diff --git a/tests/lang/operators/operator_gt_or_equal_basic.phpt b/tests/lang/operators/operator_gt_or_equal_basic.phpt
index 20b00df8bb..f1b1e01048 100644
--- a/tests/lang/operators/operator_gt_or_equal_basic.phpt
+++ b/tests/lang/operators/operator_gt_or_equal_basic.phpt
@@ -1,65 +1,65 @@
---TEST--
-Test >= operator : different types
---FILE--
-<?php
-$valid_true = array(1, "1", "true", 1.0, array(1));
-$valid_false = array(0, "", 0.0, array(), NULL);
-
-$int1 = 679;
-$int2 = -67835;
-$valid_int1 = array("679", "679abc", " 679", 679.0, 6.79E2, "678", "678abc", " 678", 678.0, 6.78E2, 6.789E2, "+678", +678);
-$valid_int2 = array("-67835", "-67835abc", " -67835", -67835.000, -6.7835E4, "-67836", "-67836abc". " -67836", -67835.0001, -6.78351E4, "-67836", -67835.0001, -6.78351E4);
-$invalid_int1 = array(680, "680");
-$invalid_int2 = array(-67834, "-67834");
-
-$float1 = 57385.45835;
-$float2 = -67345.76567;
-$valid_float1 = array("57385.45835", "57385.45835aaa", " 57385.45835", 5.738545835e4, "57385.45834", "57385.45834aaa", " 57385.45834", 5.738545834e4);
-$valid_float2 = array("-67345.76567", "-67345.76567aaa", " -67345.76567", -6.734576567E4, "-67345.76568", "-67345.76568aaa", " -67345.76568", -6.734576568E4);
-$invalid_float1 = array(57385.45836, 5.738545836e4);
-$invalid_float2 = array(-67345.76564, -6.734576564E4);
-
-$toCompare = array(
-
- true, array_merge($valid_false, $valid_true), NULL,
- false, $valid_false, $valid_true,
- $int1, $valid_int1, $invalid_int1,
- $int2, $valid_int2, $invalid_int2,
- $float1, $valid_float1, $invalid_float1,
- $float2, $valid_float2, $invalid_float2
-);
-
-$failed = false;
-for ($i = 0; $i < count($toCompare); $i +=3) {
- $typeToTest = $toCompare[$i];
- $valid_compares = $toCompare[$i + 1];
- $invalid_compares = $toCompare[$i + 2];
-
- foreach($valid_compares as $compareVal) {
- if ($typeToTest >= $compareVal) {
- // do nothing
- }
- else {
- echo "FAILED: '$typeToTest' < '$compareVal'\n";
- $failed = true;
- }
- }
-
- if ($invalid_compares != NULL) {
- foreach($invalid_compares as $compareVal) {
- if ($typeToTest >= $compareVal) {
- echo "FAILED: '$typeToTest' >= '$compareVal'\n";
- $failed = true;
- }
- }
- }
-
-}
-if ($failed == false) {
- echo "Test Passed\n";
-}
-?>
-===DONE===
---EXPECT--
-Test Passed
+--TEST--
+Test >= operator : different types
+--FILE--
+<?php
+$valid_true = array(1, "1", "true", 1.0, array(1));
+$valid_false = array(0, "", 0.0, array(), NULL);
+
+$int1 = 679;
+$int2 = -67835;
+$valid_int1 = array("679", "679abc", " 679", 679.0, 6.79E2, "678", "678abc", " 678", 678.0, 6.78E2, 6.789E2, "+678", +678);
+$valid_int2 = array("-67835", "-67835abc", " -67835", -67835.000, -6.7835E4, "-67836", "-67836abc". " -67836", -67835.0001, -6.78351E4, "-67836", -67835.0001, -6.78351E4);
+$invalid_int1 = array(680, "680");
+$invalid_int2 = array(-67834, "-67834");
+
+$float1 = 57385.45835;
+$float2 = -67345.76567;
+$valid_float1 = array("57385.45835", "57385.45835aaa", " 57385.45835", 5.738545835e4, "57385.45834", "57385.45834aaa", " 57385.45834", 5.738545834e4);
+$valid_float2 = array("-67345.76567", "-67345.76567aaa", " -67345.76567", -6.734576567E4, "-67345.76568", "-67345.76568aaa", " -67345.76568", -6.734576568E4);
+$invalid_float1 = array(57385.45836, 5.738545836e4);
+$invalid_float2 = array(-67345.76564, -6.734576564E4);
+
+$toCompare = array(
+
+ true, array_merge($valid_false, $valid_true), NULL,
+ false, $valid_false, $valid_true,
+ $int1, $valid_int1, $invalid_int1,
+ $int2, $valid_int2, $invalid_int2,
+ $float1, $valid_float1, $invalid_float1,
+ $float2, $valid_float2, $invalid_float2
+);
+
+$failed = false;
+for ($i = 0; $i < count($toCompare); $i +=3) {
+ $typeToTest = $toCompare[$i];
+ $valid_compares = $toCompare[$i + 1];
+ $invalid_compares = $toCompare[$i + 2];
+
+ foreach($valid_compares as $compareVal) {
+ if ($typeToTest >= $compareVal) {
+ // do nothing
+ }
+ else {
+ echo "FAILED: '$typeToTest' < '$compareVal'\n";
+ $failed = true;
+ }
+ }
+
+ if ($invalid_compares != NULL) {
+ foreach($invalid_compares as $compareVal) {
+ if ($typeToTest >= $compareVal) {
+ echo "FAILED: '$typeToTest' >= '$compareVal'\n";
+ $failed = true;
+ }
+ }
+ }
+
+}
+if ($failed == false) {
+ echo "Test Passed\n";
+}
+?>
+===DONE===
+--EXPECT--
+Test Passed
===DONE===
diff --git a/tests/lang/operators/operator_gt_or_equal_variation.phpt b/tests/lang/operators/operator_gt_or_equal_variation.phpt
index 6cb6ed6d81..2355ab4c45 100644
--- a/tests/lang/operators/operator_gt_or_equal_variation.phpt
+++ b/tests/lang/operators/operator_gt_or_equal_variation.phpt
@@ -1,63 +1,63 @@
---TEST--
-Test >= operator : max int 32bit range
---SKIPIF--
-<?php
-if (PHP_INT_SIZE != 4) die("skip this test is for 32bit platform only");
-?>
---FILE--
-<?php
-
-define("MAX_64Bit", 9223372036854775807);
-define("MAX_32Bit", 2147483647);
-define("MIN_64Bit", -9223372036854775807 - 1);
-define("MIN_32Bit", -2147483647 - 1);
-
-$validGtOrEqual = array (
-MAX_32Bit, array(MAX_32Bit, "2147483647", "2147483647.0000000", 2.147483647e9, 2147483647.0, MAX_32Bit - 1),
-MIN_32Bit, array(MIN_32Bit, "-2147483648", "-2147483648.000", -2.147483648e9, -2147483648.0, MIN_32Bit - 1),
-MAX_64Bit, array(MAX_64Bit, MAX_64Bit + 1, MAX_64Bit - 1),
-MIN_64Bit, array(MIN_64Bit, MIN_64Bit - 1, MIN_64Bit + 1),
-);
-
-$invalidGtOrEqual = array (
-MAX_32Bit, array("2147483648", 2.1474836470001e9, MAX_32Bit + 1),
-MIN_32Bit, array(MIN_32Bit + 1,"-2147483646", -2.1474836460001e9)
-);
-
-
-$failed = false;
-// test valid values
-for ($i = 0; $i < count($validGtOrEqual); $i +=2) {
- $typeToTestVal = $validGtOrEqual[$i];
- $compares = $validGtOrEqual[$i + 1];
- foreach($compares as $compareVal) {
- if ($typeToTestVal >= $compareVal) {
- // do nothing
- }
- else {
- echo "FAILED: '$typeToTestVal' < '$compareVal'\n";
- $failed = true;
- }
- }
-}
-// test for invalid values
-for ($i = 0; $i < count($invalidGtOrEqual); $i +=2) {
- $typeToTestVal = $invalidGtOrEqual[$i];
- $compares = $invalidGtOrEqual[$i + 1];
- foreach($compares as $compareVal) {
- if ($typeToTestVal >= $compareVal) {
- echo "FAILED: '$typeToTestVal' >= '$compareVal'\n";
- $failed = true;
- }
- }
-}
-
-if ($failed == false) {
- echo "Test Passed\n";
-}
-
-?>
-===DONE===
---EXPECT--
-Test Passed
+--TEST--
+Test >= operator : max int 32bit range
+--SKIPIF--
+<?php
+if (PHP_INT_SIZE != 4) die("skip this test is for 32bit platform only");
+?>
+--FILE--
+<?php
+
+define("MAX_64Bit", 9223372036854775807);
+define("MAX_32Bit", 2147483647);
+define("MIN_64Bit", -9223372036854775807 - 1);
+define("MIN_32Bit", -2147483647 - 1);
+
+$validGtOrEqual = array (
+MAX_32Bit, array(MAX_32Bit, "2147483647", "2147483647.0000000", 2.147483647e9, 2147483647.0, MAX_32Bit - 1),
+MIN_32Bit, array(MIN_32Bit, "-2147483648", "-2147483648.000", -2.147483648e9, -2147483648.0, MIN_32Bit - 1),
+MAX_64Bit, array(MAX_64Bit, MAX_64Bit + 1, MAX_64Bit - 1),
+MIN_64Bit, array(MIN_64Bit, MIN_64Bit - 1, MIN_64Bit + 1),
+);
+
+$invalidGtOrEqual = array (
+MAX_32Bit, array("2147483648", 2.1474836470001e9, MAX_32Bit + 1),
+MIN_32Bit, array(MIN_32Bit + 1,"-2147483646", -2.1474836460001e9)
+);
+
+
+$failed = false;
+// test valid values
+for ($i = 0; $i < count($validGtOrEqual); $i +=2) {
+ $typeToTestVal = $validGtOrEqual[$i];
+ $compares = $validGtOrEqual[$i + 1];
+ foreach($compares as $compareVal) {
+ if ($typeToTestVal >= $compareVal) {
+ // do nothing
+ }
+ else {
+ echo "FAILED: '$typeToTestVal' < '$compareVal'\n";
+ $failed = true;
+ }
+ }
+}
+// test for invalid values
+for ($i = 0; $i < count($invalidGtOrEqual); $i +=2) {
+ $typeToTestVal = $invalidGtOrEqual[$i];
+ $compares = $invalidGtOrEqual[$i + 1];
+ foreach($compares as $compareVal) {
+ if ($typeToTestVal >= $compareVal) {
+ echo "FAILED: '$typeToTestVal' >= '$compareVal'\n";
+ $failed = true;
+ }
+ }
+}
+
+if ($failed == false) {
+ echo "Test Passed\n";
+}
+
+?>
+===DONE===
+--EXPECT--
+Test Passed
===DONE===
diff --git a/tests/lang/operators/operator_gt_or_equal_variation_64bit.phpt b/tests/lang/operators/operator_gt_or_equal_variation_64bit.phpt
index 52ef7100a6..8a1ed35f10 100644
--- a/tests/lang/operators/operator_gt_or_equal_variation_64bit.phpt
+++ b/tests/lang/operators/operator_gt_or_equal_variation_64bit.phpt
@@ -1,63 +1,63 @@
---TEST--
-Test >= operator : max int 64bit range
---SKIPIF--
-<?php
-if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platform only");
-?>
---FILE--
-<?php
-
-define("MAX_64Bit", 9223372036854775807);
-define("MAX_32Bit", 2147483647);
-define("MIN_64Bit", -9223372036854775807 - 1);
-define("MIN_32Bit", -2147483647 - 1);
-
-$validGtOrEqual = array (
-MAX_32Bit, array(MAX_32Bit, "2147483647", "2147483647.0000000", 2.147483647e9, 2147483647.0, MAX_32Bit - 1),
-MIN_32Bit, array(MIN_32Bit, "-2147483648", "-2147483648.000", -2.147483648e9, -2147483648.0, MIN_32Bit - 1),
-MAX_64Bit, array(MAX_64Bit, MAX_64Bit + 1, MAX_64Bit - 1),
-MIN_64Bit, array(MIN_64Bit, MIN_64Bit - 1),
-);
-
-$invalidGtOrEqual = array (
-MAX_32Bit, array("2147483648", 2.1474836470001e9, MAX_32Bit + 1),
-MIN_32Bit, array(MIN_32Bit + 1,"-2147483646", -2.1474836460001e9)
-);
-
-
-$failed = false;
-// test valid values
-for ($i = 0; $i < count($validGtOrEqual); $i +=2) {
- $typeToTestVal = $validGtOrEqual[$i];
- $compares = $validGtOrEqual[$i + 1];
- foreach($compares as $compareVal) {
- if ($typeToTestVal >= $compareVal) {
- // do nothing
- }
- else {
- echo "FAILED: '$typeToTestVal' < '$compareVal'\n";
- $failed = true;
- }
- }
-}
-// test for invalid values
-for ($i = 0; $i < count($invalidGtOrEqual); $i +=2) {
- $typeToTestVal = $invalidGtOrEqual[$i];
- $compares = $invalidGtOrEqual[$i + 1];
- foreach($compares as $compareVal) {
- if ($typeToTestVal >= $compareVal) {
- echo "FAILED: '$typeToTestVal' >= '$compareVal'\n";
- $failed = true;
- }
- }
-}
-
-if ($failed == false) {
- echo "Test Passed\n";
-}
-
-?>
-===DONE===
---EXPECT--
-Test Passed
+--TEST--
+Test >= operator : max int 64bit range
+--SKIPIF--
+<?php
+if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platform only");
+?>
+--FILE--
+<?php
+
+define("MAX_64Bit", 9223372036854775807);
+define("MAX_32Bit", 2147483647);
+define("MIN_64Bit", -9223372036854775807 - 1);
+define("MIN_32Bit", -2147483647 - 1);
+
+$validGtOrEqual = array (
+MAX_32Bit, array(MAX_32Bit, "2147483647", "2147483647.0000000", 2.147483647e9, 2147483647.0, MAX_32Bit - 1),
+MIN_32Bit, array(MIN_32Bit, "-2147483648", "-2147483648.000", -2.147483648e9, -2147483648.0, MIN_32Bit - 1),
+MAX_64Bit, array(MAX_64Bit, MAX_64Bit + 1, MAX_64Bit - 1),
+MIN_64Bit, array(MIN_64Bit, MIN_64Bit - 1),
+);
+
+$invalidGtOrEqual = array (
+MAX_32Bit, array("2147483648", 2.1474836470001e9, MAX_32Bit + 1),
+MIN_32Bit, array(MIN_32Bit + 1,"-2147483646", -2.1474836460001e9)
+);
+
+
+$failed = false;
+// test valid values
+for ($i = 0; $i < count($validGtOrEqual); $i +=2) {
+ $typeToTestVal = $validGtOrEqual[$i];
+ $compares = $validGtOrEqual[$i + 1];
+ foreach($compares as $compareVal) {
+ if ($typeToTestVal >= $compareVal) {
+ // do nothing
+ }
+ else {
+ echo "FAILED: '$typeToTestVal' < '$compareVal'\n";
+ $failed = true;
+ }
+ }
+}
+// test for invalid values
+for ($i = 0; $i < count($invalidGtOrEqual); $i +=2) {
+ $typeToTestVal = $invalidGtOrEqual[$i];
+ $compares = $invalidGtOrEqual[$i + 1];
+ foreach($compares as $compareVal) {
+ if ($typeToTestVal >= $compareVal) {
+ echo "FAILED: '$typeToTestVal' >= '$compareVal'\n";
+ $failed = true;
+ }
+ }
+}
+
+if ($failed == false) {
+ echo "Test Passed\n";
+}
+
+?>
+===DONE===
+--EXPECT--
+Test Passed
===DONE===
diff --git a/tests/lang/operators/operator_gt_variation.phpt b/tests/lang/operators/operator_gt_variation.phpt
index 1b429a076f..ff15550dbe 100644
--- a/tests/lang/operators/operator_gt_variation.phpt
+++ b/tests/lang/operators/operator_gt_variation.phpt
@@ -1,62 +1,62 @@
---TEST--
-Test > operator : max int 32bit range
---SKIPIF--
-<?php
-if (PHP_INT_SIZE != 4) die("skip this test is for 32bit platform only");
-?>
---FILE--
-<?php
-
-define("MAX_64Bit", 9223372036854775807);
-define("MAX_32Bit", 2147483647);
-define("MIN_64Bit", -9223372036854775807 - 1);
-define("MIN_32Bit", -2147483647 - 1);
-
-$validGreaterThan = array (
-MAX_32Bit, array(MAX_32Bit - 1, "2147483646", "2147483646.999", 2.147483646e9, 2147483646.9, MIN_32Bit),
--2147483647, array(MIN_32Bit, "-2147483648", "-2147483647.001", -2.1474836471e9, -2147483647.9),
-);
-
-$invalidGreaterThan = array (
-MAX_32Bit, array(2e33, MAX_32Bit + 1),
-MIN_32Bit, array(MIN_32Bit + 1, MAX_32Bit)
-);
-
-
-
-$failed = false;
-// test valid values
-for ($i = 0; $i < count($validGreaterThan); $i +=2) {
- $typeToTestVal = $validGreaterThan[$i];
- $compares = $validGreaterThan[$i + 1];
- foreach($compares as $compareVal) {
- if ($typeToTestVal > $compareVal) {
- // do nothing
- }
- else {
- echo "FAILED: '$typeToTestVal' <= '$compareVal'\n";
- $failed = true;
- }
- }
-}
-// test for invalid values
-for ($i = 0; $i < count($invalidGreaterThan); $i +=2) {
- $typeToTestVal = $invalidGreaterThan[$i];
- $compares = $invalidGreaterThan[$i + 1];
- foreach($compares as $compareVal) {
- if ($typeToTestVal > $compareVal) {
- echo "FAILED: '$typeToTestVal' > '$compareVal'\n";
- $failed = true;
- }
- }
-}
-
-if ($failed == false) {
- echo "Test Passed\n";
-}
-
-?>
-===DONE===
---EXPECT--
-Test Passed
+--TEST--
+Test > operator : max int 32bit range
+--SKIPIF--
+<?php
+if (PHP_INT_SIZE != 4) die("skip this test is for 32bit platform only");
+?>
+--FILE--
+<?php
+
+define("MAX_64Bit", 9223372036854775807);
+define("MAX_32Bit", 2147483647);
+define("MIN_64Bit", -9223372036854775807 - 1);
+define("MIN_32Bit", -2147483647 - 1);
+
+$validGreaterThan = array (
+MAX_32Bit, array(MAX_32Bit - 1, "2147483646", "2147483646.999", 2.147483646e9, 2147483646.9, MIN_32Bit),
+-2147483647, array(MIN_32Bit, "-2147483648", "-2147483647.001", -2.1474836471e9, -2147483647.9),
+);
+
+$invalidGreaterThan = array (
+MAX_32Bit, array(2e33, MAX_32Bit + 1),
+MIN_32Bit, array(MIN_32Bit + 1, MAX_32Bit)
+);
+
+
+
+$failed = false;
+// test valid values
+for ($i = 0; $i < count($validGreaterThan); $i +=2) {
+ $typeToTestVal = $validGreaterThan[$i];
+ $compares = $validGreaterThan[$i + 1];
+ foreach($compares as $compareVal) {
+ if ($typeToTestVal > $compareVal) {
+ // do nothing
+ }
+ else {
+ echo "FAILED: '$typeToTestVal' <= '$compareVal'\n";
+ $failed = true;
+ }
+ }
+}
+// test for invalid values
+for ($i = 0; $i < count($invalidGreaterThan); $i +=2) {
+ $typeToTestVal = $invalidGreaterThan[$i];
+ $compares = $invalidGreaterThan[$i + 1];
+ foreach($compares as $compareVal) {
+ if ($typeToTestVal > $compareVal) {
+ echo "FAILED: '$typeToTestVal' > '$compareVal'\n";
+ $failed = true;
+ }
+ }
+}
+
+if ($failed == false) {
+ echo "Test Passed\n";
+}
+
+?>
+===DONE===
+--EXPECT--
+Test Passed
===DONE===
diff --git a/tests/lang/operators/operator_gt_variation_64bit.phpt b/tests/lang/operators/operator_gt_variation_64bit.phpt
index 1881567080..15c6b88319 100644
--- a/tests/lang/operators/operator_gt_variation_64bit.phpt
+++ b/tests/lang/operators/operator_gt_variation_64bit.phpt
@@ -1,62 +1,62 @@
---TEST--
-Test > operator : max int 64bit range
---SKIPIF--
-<?php
-if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platform only");
-?>
---FILE--
-<?php
-
-define("MAX_64Bit", 9223372036854775807);
-define("MAX_32Bit", 2147483647);
-define("MIN_64Bit", -9223372036854775807 - 1);
-define("MIN_32Bit", -2147483647 - 1);
-
-$validGreaterThan = array (
-MAX_32Bit, array(MAX_32Bit - 1, "2147483646", "2147483646.999", 2.147483646e9, 2147483646.9, MIN_32Bit),
--2147483647, array(MIN_32Bit, "-2147483648", "-2147483647.001", -2.1474836471e9, -2147483647.9),
-);
-
-$invalidGreaterThan = array (
-MAX_32Bit, array(2e33, MAX_32Bit + 1),
-MIN_32Bit, array(MIN_32Bit + 1, MAX_32Bit)
-);
-
-
-
-$failed = false;
-// test valid values
-for ($i = 0; $i < count($validGreaterThan); $i +=2) {
- $typeToTestVal = $validGreaterThan[$i];
- $compares = $validGreaterThan[$i + 1];
- foreach($compares as $compareVal) {
- if ($typeToTestVal > $compareVal) {
- // do nothing
- }
- else {
- echo "FAILED: '$typeToTestVal' <= '$compareVal'\n";
- $failed = true;
- }
- }
-}
-// test for invalid values
-for ($i = 0; $i < count($invalidGreaterThan); $i +=2) {
- $typeToTestVal = $invalidGreaterThan[$i];
- $compares = $invalidGreaterThan[$i + 1];
- foreach($compares as $compareVal) {
- if ($typeToTestVal > $compareVal) {
- echo "FAILED: '$typeToTestVal' > '$compareVal'\n";
- $failed = true;
- }
- }
-}
-
-if ($failed == false) {
- echo "Test Passed\n";
-}
-
-?>
-===DONE===
---EXPECT--
-Test Passed
+--TEST--
+Test > operator : max int 64bit range
+--SKIPIF--
+<?php
+if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platform only");
+?>
+--FILE--
+<?php
+
+define("MAX_64Bit", 9223372036854775807);
+define("MAX_32Bit", 2147483647);
+define("MIN_64Bit", -9223372036854775807 - 1);
+define("MIN_32Bit", -2147483647 - 1);
+
+$validGreaterThan = array (
+MAX_32Bit, array(MAX_32Bit - 1, "2147483646", "2147483646.999", 2.147483646e9, 2147483646.9, MIN_32Bit),
+-2147483647, array(MIN_32Bit, "-2147483648", "-2147483647.001", -2.1474836471e9, -2147483647.9),
+);
+
+$invalidGreaterThan = array (
+MAX_32Bit, array(2e33, MAX_32Bit + 1),
+MIN_32Bit, array(MIN_32Bit + 1, MAX_32Bit)
+);
+
+
+
+$failed = false;
+// test valid values
+for ($i = 0; $i < count($validGreaterThan); $i +=2) {
+ $typeToTestVal = $validGreaterThan[$i];
+ $compares = $validGreaterThan[$i + 1];
+ foreach($compares as $compareVal) {
+ if ($typeToTestVal > $compareVal) {
+ // do nothing
+ }
+ else {
+ echo "FAILED: '$typeToTestVal' <= '$compareVal'\n";
+ $failed = true;
+ }
+ }
+}
+// test for invalid values
+for ($i = 0; $i < count($invalidGreaterThan); $i +=2) {
+ $typeToTestVal = $invalidGreaterThan[$i];
+ $compares = $invalidGreaterThan[$i + 1];
+ foreach($compares as $compareVal) {
+ if ($typeToTestVal > $compareVal) {
+ echo "FAILED: '$typeToTestVal' > '$compareVal'\n";
+ $failed = true;
+ }
+ }
+}
+
+if ($failed == false) {
+ echo "Test Passed\n";
+}
+
+?>
+===DONE===
+--EXPECT--
+Test Passed
===DONE===
diff --git a/tests/lang/operators/operator_identical_basic.phpt b/tests/lang/operators/operator_identical_basic.phpt
index dbf4c62f5b..e3a0fe272f 100644
--- a/tests/lang/operators/operator_identical_basic.phpt
+++ b/tests/lang/operators/operator_identical_basic.phpt
@@ -1,65 +1,65 @@
---TEST--
-Test === operator : different types
---FILE--
-<?php
-
-$valid_true = array(1, "1", "true", 1.0, array(1));
-$valid_false = array(0, "", 0.0, array(), NULL);
-
-$int1 = 679;
-$int2 = -67835;
-$valid_int1 = array(679, +679);
-$valid_int2 = array(-67835);
-$invalid_int1 = array("679", "679abc", " 679", "679 ", 679.0, 6.79E2, "+679", "6 7 9", "6y79", 678);
-$invalid_int2 = array("-67835", "-67835abc", " -67835", "-67835 ", -67835.000, -6.7835E4, "- 67835", "-67,835", "-67 835", "-678y35", -76834);
-
-$float1 = 57385.45835;
-$float2 = -67345.76567;
-$valid_float1 = array(57385.45835, 5.738545835e4);
-$valid_float2 = array(-67345.76567, -6.734576567E4);
-$invalid_float1 = array("57385.45835", "57385.45835aaa", " 57385.45835", "57385. 45835", "57,385.45835", 57385.45834, 5.738545834e4);
-$invalid_float2 = array("-67345.76567", "-67345.76567aaa", " -67345.76567", "- 67345.76567", "-67,345.76567", -67345.76566, -6.734576566E4);
-
-
-$toCompare = array(
- true, array(true), array_merge($valid_true, $valid_false),
- false, array(false), array_merge($valid_true, $valid_false),
- $int1, $valid_int1, $invalid_int1,
- $int2, $valid_int2, $invalid_int2,
- $float1, $valid_float1, $invalid_float1,
- $float2, $valid_float2, $invalid_float2
-);
-
-$failed = false;
-for ($i = 0; $i < count($toCompare); $i +=3) {
- $typeToTest = $toCompare[$i];
- $valid_compares = $toCompare[$i + 1];
- $invalid_compares = $toCompare[$i + 2];
-
- foreach($valid_compares as $compareVal) {
- if ($typeToTest === $compareVal) {
- // do nothing
- }
- else {
- echo "FAILED: '$typeToTest' != '$compareVal'\n";
- $failed = true;
- }
- }
-
- foreach($invalid_compares as $compareVal) {
- if ($typeToTest === $compareVal) {
- echo "FAILED: '$typeToTest' == '$compareVal'\n";
- $failed = true;
- }
- }
-
-}
-if ($failed == false) {
- echo "Test Passed\n";
-}
-
-?>
-===DONE===
---EXPECT--
-Test Passed
+--TEST--
+Test === operator : different types
+--FILE--
+<?php
+
+$valid_true = array(1, "1", "true", 1.0, array(1));
+$valid_false = array(0, "", 0.0, array(), NULL);
+
+$int1 = 679;
+$int2 = -67835;
+$valid_int1 = array(679, +679);
+$valid_int2 = array(-67835);
+$invalid_int1 = array("679", "679abc", " 679", "679 ", 679.0, 6.79E2, "+679", "6 7 9", "6y79", 678);
+$invalid_int2 = array("-67835", "-67835abc", " -67835", "-67835 ", -67835.000, -6.7835E4, "- 67835", "-67,835", "-67 835", "-678y35", -76834);
+
+$float1 = 57385.45835;
+$float2 = -67345.76567;
+$valid_float1 = array(57385.45835, 5.738545835e4);
+$valid_float2 = array(-67345.76567, -6.734576567E4);
+$invalid_float1 = array("57385.45835", "57385.45835aaa", " 57385.45835", "57385. 45835", "57,385.45835", 57385.45834, 5.738545834e4);
+$invalid_float2 = array("-67345.76567", "-67345.76567aaa", " -67345.76567", "- 67345.76567", "-67,345.76567", -67345.76566, -6.734576566E4);
+
+
+$toCompare = array(
+ true, array(true), array_merge($valid_true, $valid_false),
+ false, array(false), array_merge($valid_true, $valid_false),
+ $int1, $valid_int1, $invalid_int1,
+ $int2, $valid_int2, $invalid_int2,
+ $float1, $valid_float1, $invalid_float1,
+ $float2, $valid_float2, $invalid_float2
+);
+
+$failed = false;
+for ($i = 0; $i < count($toCompare); $i +=3) {
+ $typeToTest = $toCompare[$i];
+ $valid_compares = $toCompare[$i + 1];
+ $invalid_compares = $toCompare[$i + 2];
+
+ foreach($valid_compares as $compareVal) {
+ if ($typeToTest === $compareVal) {
+ // do nothing
+ }
+ else {
+ echo "FAILED: '$typeToTest' != '$compareVal'\n";
+ $failed = true;
+ }
+ }
+
+ foreach($invalid_compares as $compareVal) {
+ if ($typeToTest === $compareVal) {
+ echo "FAILED: '$typeToTest' == '$compareVal'\n";
+ $failed = true;
+ }
+ }
+
+}
+if ($failed == false) {
+ echo "Test Passed\n";
+}
+
+?>
+===DONE===
+--EXPECT--
+Test Passed
===DONE===
diff --git a/tests/lang/operators/operator_identical_variation.phpt b/tests/lang/operators/operator_identical_variation.phpt
index f2150e956d..a215fef0a4 100644
--- a/tests/lang/operators/operator_identical_variation.phpt
+++ b/tests/lang/operators/operator_identical_variation.phpt
@@ -1,63 +1,63 @@
---TEST--
-Test === operator : max int 32bit range
---SKIPIF--
-<?php
-if (PHP_INT_SIZE != 4) die("skip this test is for 32bit platform only");
-?>
---FILE--
-<?php
-
-define("MAX_64Bit", 9223372036854775807);
-define("MAX_32Bit", 2147483647);
-define("MIN_64Bit", -9223372036854775807 - 1);
-define("MIN_32Bit", -2147483647 - 1);
-
-$validIdentical = array (
-MAX_32Bit, array(MAX_32Bit),
-MIN_32Bit, array(MIN_32Bit),
-MAX_64Bit, array(MAX_64Bit, MAX_64Bit + 1, MAX_64Bit - 1),
-MIN_64Bit, array(MIN_64Bit, MIN_64Bit - 1, MIN_64Bit + 1),
-);
-
-$invalidIdentical = array (
-MAX_32Bit, array("2147483647", "2147483647.0000000", 2.147483647e9, 2147483647.0, "2147483648", 2.1474836470001e9, MAX_32Bit - 1, MAX_32Bit + 1),
-MIN_32Bit, array("-2147483648", "-2147483648.000", -2.147483648e9, -2147483648.0, "-2147483649", -2.1474836480001e9, MIN_32Bit -1, MIN_32Bit + 1),
-);
-
-
-$failed = false;
-// test for valid values
-for ($i = 0; $i < count($validIdentical); $i +=2) {
- $typeToTestVal = $validIdentical[$i];
- $compares = $validIdentical[$i + 1];
- foreach($compares as $compareVal) {
- if ($typeToTestVal === $compareVal) {
- // do nothing
- }
- else {
- echo "FAILED: '$typeToTestVal' !== '$compareVal'\n";
- $failed = true;
- }
- }
-}
-// test for invalid values
-for ($i = 0; $i < count($invalidIdentical); $i +=2) {
- $typeToTestVal = $invalidIdentical[$i];
- $compares = $invalidIdentical[$i + 1];
- foreach($compares as $compareVal) {
- if ($typeToTestVal === $compareVal) {
- echo "FAILED: '$typeToTestVal' === '$compareVal'\n";
- $failed = true;
- }
- }
-}
-
-if ($failed == false) {
- echo "Test Passed\n";
-}
-
-?>
-===DONE===
---EXPECT--
-Test Passed
+--TEST--
+Test === operator : max int 32bit range
+--SKIPIF--
+<?php
+if (PHP_INT_SIZE != 4) die("skip this test is for 32bit platform only");
+?>
+--FILE--
+<?php
+
+define("MAX_64Bit", 9223372036854775807);
+define("MAX_32Bit", 2147483647);
+define("MIN_64Bit", -9223372036854775807 - 1);
+define("MIN_32Bit", -2147483647 - 1);
+
+$validIdentical = array (
+MAX_32Bit, array(MAX_32Bit),
+MIN_32Bit, array(MIN_32Bit),
+MAX_64Bit, array(MAX_64Bit, MAX_64Bit + 1, MAX_64Bit - 1),
+MIN_64Bit, array(MIN_64Bit, MIN_64Bit - 1, MIN_64Bit + 1),
+);
+
+$invalidIdentical = array (
+MAX_32Bit, array("2147483647", "2147483647.0000000", 2.147483647e9, 2147483647.0, "2147483648", 2.1474836470001e9, MAX_32Bit - 1, MAX_32Bit + 1),
+MIN_32Bit, array("-2147483648", "-2147483648.000", -2.147483648e9, -2147483648.0, "-2147483649", -2.1474836480001e9, MIN_32Bit -1, MIN_32Bit + 1),
+);
+
+
+$failed = false;
+// test for valid values
+for ($i = 0; $i < count($validIdentical); $i +=2) {
+ $typeToTestVal = $validIdentical[$i];
+ $compares = $validIdentical[$i + 1];
+ foreach($compares as $compareVal) {
+ if ($typeToTestVal === $compareVal) {
+ // do nothing
+ }
+ else {
+ echo "FAILED: '$typeToTestVal' !== '$compareVal'\n";
+ $failed = true;
+ }
+ }
+}
+// test for invalid values
+for ($i = 0; $i < count($invalidIdentical); $i +=2) {
+ $typeToTestVal = $invalidIdentical[$i];
+ $compares = $invalidIdentical[$i + 1];
+ foreach($compares as $compareVal) {
+ if ($typeToTestVal === $compareVal) {
+ echo "FAILED: '$typeToTestVal' === '$compareVal'\n";
+ $failed = true;
+ }
+ }
+}
+
+if ($failed == false) {
+ echo "Test Passed\n";
+}
+
+?>
+===DONE===
+--EXPECT--
+Test Passed
===DONE===
diff --git a/tests/lang/operators/operator_identical_variation_64bit.phpt b/tests/lang/operators/operator_identical_variation_64bit.phpt
index 138a53a119..0c8d398daf 100644
--- a/tests/lang/operators/operator_identical_variation_64bit.phpt
+++ b/tests/lang/operators/operator_identical_variation_64bit.phpt
@@ -1,65 +1,65 @@
---TEST--
-Test === operator : max int 64bit range
---SKIPIF--
-<?php
-if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platform only");
-?>
---FILE--
-<?php
-
-define("MAX_64Bit", 9223372036854775807);
-define("MAX_32Bit", 2147483647);
-define("MIN_64Bit", -9223372036854775807 - 1);
-define("MIN_32Bit", -2147483647 - 1);
-
-$validIdentical = array (
-MAX_32Bit, array(MAX_32Bit),
-MIN_32Bit, array(MIN_32Bit),
-MAX_64Bit, array(MAX_64Bit),
-MIN_64Bit, array(MIN_64Bit),
-);
-
-$invalidIdentical = array (
-MAX_32Bit, array("2147483647", "2147483647.0000000", 2.147483647e9, 2147483647.0, "2147483648", 2.1474836470001e9, MAX_32Bit - 1, MAX_32Bit + 1),
-MIN_32Bit, array("-2147483648", "-2147483648.000", -2.147483648e9, -2147483648.0, "-2147483649", -2.1474836480001e9, MIN_32Bit -1, MIN_32Bit + 1),
-MAX_64Bit, array(MAX_64Bit - 1, MAX_64Bit + 1),
-MIN_64Bit, array(MIN_64Bit + 1, MIN_64Bit - 1),
-);
-
-
-$failed = false;
-// test for valid values
-for ($i = 0; $i < count($validIdentical); $i +=2) {
- $typeToTestVal = $validIdentical[$i];
- $compares = $validIdentical[$i + 1];
- foreach($compares as $compareVal) {
- if ($typeToTestVal === $compareVal) {
- // do nothing
- }
- else {
- echo "FAILED: '$typeToTestVal' !== '$compareVal'\n";
- $failed = true;
- }
- }
-}
-// test for invalid values
-for ($i = 0; $i < count($invalidIdentical); $i +=2) {
- $typeToTestVal = $invalidIdentical[$i];
- $compares = $invalidIdentical[$i + 1];
- foreach($compares as $compareVal) {
- if ($typeToTestVal === $compareVal) {
- echo "FAILED: '$typeToTestVal' === '$compareVal'\n";
- $failed = true;
- }
- }
-}
-
-if ($failed == false) {
- echo "Test Passed\n";
-}
-
-?>
-===DONE===
---EXPECT--
-Test Passed
+--TEST--
+Test === operator : max int 64bit range
+--SKIPIF--
+<?php
+if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platform only");
+?>
+--FILE--
+<?php
+
+define("MAX_64Bit", 9223372036854775807);
+define("MAX_32Bit", 2147483647);
+define("MIN_64Bit", -9223372036854775807 - 1);
+define("MIN_32Bit", -2147483647 - 1);
+
+$validIdentical = array (
+MAX_32Bit, array(MAX_32Bit),
+MIN_32Bit, array(MIN_32Bit),
+MAX_64Bit, array(MAX_64Bit),
+MIN_64Bit, array(MIN_64Bit),
+);
+
+$invalidIdentical = array (
+MAX_32Bit, array("2147483647", "2147483647.0000000", 2.147483647e9, 2147483647.0, "2147483648", 2.1474836470001e9, MAX_32Bit - 1, MAX_32Bit + 1),
+MIN_32Bit, array("-2147483648", "-2147483648.000", -2.147483648e9, -2147483648.0, "-2147483649", -2.1474836480001e9, MIN_32Bit -1, MIN_32Bit + 1),
+MAX_64Bit, array(MAX_64Bit - 1, MAX_64Bit + 1),
+MIN_64Bit, array(MIN_64Bit + 1, MIN_64Bit - 1),
+);
+
+
+$failed = false;
+// test for valid values
+for ($i = 0; $i < count($validIdentical); $i +=2) {
+ $typeToTestVal = $validIdentical[$i];
+ $compares = $validIdentical[$i + 1];
+ foreach($compares as $compareVal) {
+ if ($typeToTestVal === $compareVal) {
+ // do nothing
+ }
+ else {
+ echo "FAILED: '$typeToTestVal' !== '$compareVal'\n";
+ $failed = true;
+ }
+ }
+}
+// test for invalid values
+for ($i = 0; $i < count($invalidIdentical); $i +=2) {
+ $typeToTestVal = $invalidIdentical[$i];
+ $compares = $invalidIdentical[$i + 1];
+ foreach($compares as $compareVal) {
+ if ($typeToTestVal === $compareVal) {
+ echo "FAILED: '$typeToTestVal' === '$compareVal'\n";
+ $failed = true;
+ }
+ }
+}
+
+if ($failed == false) {
+ echo "Test Passed\n";
+}
+
+?>
+===DONE===
+--EXPECT--
+Test Passed
===DONE===
diff --git a/tests/lang/operators/operator_lt_basic.phpt b/tests/lang/operators/operator_lt_basic.phpt
index 016b35dd4b..41f18ef9d2 100644
--- a/tests/lang/operators/operator_lt_basic.phpt
+++ b/tests/lang/operators/operator_lt_basic.phpt
@@ -1,62 +1,62 @@
---TEST--
-Test < operator : different types
---FILE--
-<?php
-$valid_true = array(1, "1", "true", 1.0, array(1));
-$valid_false = array(0, "", 0.0, array(), NULL);
-
-$int1 = 677;
-$int2 = -67837;
-$valid_int1 = array("678", "678abc", " 678", "678 ", 678.0, 6.789E2, "+678", +678);
-$valid_int2 = array("-67836", "-67836abc", " -67836", "-67836 ", -67835.0001, -6.78351E4);
-$invalid_int1 = array(676, "676");
-$invalid_int2 = array(-67837, "-67837");
-
-$float1 = 57385.45835;
-$float2 = -67345.76567;
-$valid_float1 = array("57385.45836", "57385.45836aaa", " 57385.45836", 5.738545836e4);
-$valid_float2 = array("-67345.76566", "-67345.76566aaa", " -67345.76566", -6.734576566E4);
-$invalid_float1 = array(57385.45835, 5.738545835e4);
-$invalid_float2 = array(-67345.76567, -6.734576567E4);
-
-
-$toCompare = array(
- false, $valid_true, $valid_false,
- $int1, $valid_int1, $invalid_int1,
- $int2, $valid_int2, $invalid_int2,
- $float1, $valid_float1, $invalid_float1,
- $float2, $valid_float2, $invalid_float2
-);
-
-$failed = false;
-for ($i = 0; $i < count($toCompare); $i +=3) {
- $typeToTest = $toCompare[$i];
- $valid_compares = $toCompare[$i + 1];
- $invalid_compares = $toCompare[$i + 2];
-
- foreach($valid_compares as $compareVal) {
- if ($typeToTest < $compareVal) {
- // do nothing
- }
- else {
- echo "FAILED: '$typeToTest' >= '$compareVal'\n";
- $failed = true;
- }
- }
-
- foreach($invalid_compares as $compareVal) {
- if ($typeToTest < $compareVal) {
- echo "FAILED: '$typeToTest' < '$compareVal'\n";
- $failed = true;
- }
- }
-
-}
-if ($failed == false) {
- echo "Test Passed\n";
-}
-?>
-===DONE===
---EXPECT--
-Test Passed
+--TEST--
+Test < operator : different types
+--FILE--
+<?php
+$valid_true = array(1, "1", "true", 1.0, array(1));
+$valid_false = array(0, "", 0.0, array(), NULL);
+
+$int1 = 677;
+$int2 = -67837;
+$valid_int1 = array("678", "678abc", " 678", "678 ", 678.0, 6.789E2, "+678", +678);
+$valid_int2 = array("-67836", "-67836abc", " -67836", "-67836 ", -67835.0001, -6.78351E4);
+$invalid_int1 = array(676, "676");
+$invalid_int2 = array(-67837, "-67837");
+
+$float1 = 57385.45835;
+$float2 = -67345.76567;
+$valid_float1 = array("57385.45836", "57385.45836aaa", " 57385.45836", 5.738545836e4);
+$valid_float2 = array("-67345.76566", "-67345.76566aaa", " -67345.76566", -6.734576566E4);
+$invalid_float1 = array(57385.45835, 5.738545835e4);
+$invalid_float2 = array(-67345.76567, -6.734576567E4);
+
+
+$toCompare = array(
+ false, $valid_true, $valid_false,
+ $int1, $valid_int1, $invalid_int1,
+ $int2, $valid_int2, $invalid_int2,
+ $float1, $valid_float1, $invalid_float1,
+ $float2, $valid_float2, $invalid_float2
+);
+
+$failed = false;
+for ($i = 0; $i < count($toCompare); $i +=3) {
+ $typeToTest = $toCompare[$i];
+ $valid_compares = $toCompare[$i + 1];
+ $invalid_compares = $toCompare[$i + 2];
+
+ foreach($valid_compares as $compareVal) {
+ if ($typeToTest < $compareVal) {
+ // do nothing
+ }
+ else {
+ echo "FAILED: '$typeToTest' >= '$compareVal'\n";
+ $failed = true;
+ }
+ }
+
+ foreach($invalid_compares as $compareVal) {
+ if ($typeToTest < $compareVal) {
+ echo "FAILED: '$typeToTest' < '$compareVal'\n";
+ $failed = true;
+ }
+ }
+
+}
+if ($failed == false) {
+ echo "Test Passed\n";
+}
+?>
+===DONE===
+--EXPECT--
+Test Passed
===DONE===
diff --git a/tests/lang/operators/operator_lt_or_equal_basic.phpt b/tests/lang/operators/operator_lt_or_equal_basic.phpt
index 785b9338ac..85a86e1996 100644
--- a/tests/lang/operators/operator_lt_or_equal_basic.phpt
+++ b/tests/lang/operators/operator_lt_or_equal_basic.phpt
@@ -1,64 +1,64 @@
---TEST--
-Test <= operator : different types
---FILE--
-<?php
-$valid_true = array(1, "1", "true", 1.0, array(1));
-$valid_false = array(0, "", 0.0, array(), NULL);
-
-$int1 = 678;
-$int2 = -67836;
-$valid_int1 = array("679", "679abc", " 679", 679.0, 6.79E2, "678", "678abc", " 678", 678.0, 6.78E2, 6.789E2, "+678", +678);
-$valid_int2 = array("-67835", "-67835abc", " -67835", -67835.000, -6.7835E4, "-67836", "-67836abc". " -67836", -67835.0001, -6.78351E4, "-67836", -67835.0001, -6.78351E4);
-$invalid_int1 = array(677, "677");
-$invalid_int2 = array(-67874, "-67837");
-
-$float1 = 57385.45834;
-$float2 = -67345.76568;
-$valid_float1 = array("57385.45835", "57385.45835aaa", " 57385.45835", 5.738545835e4, "57385.45834", "57385.45834aaa", " 57385.45834", 5.738545834e4);
-$valid_float2 = array("-67345.76567", "-67345.76567aaa", " -67345.76567", -6.734576567E4, "-67345.76568", "-67345.76568aaa", " -67345.76568", -6.734576568E4);
-$invalid_float1 = array(57385.45833, 5.738545833e4);
-$invalid_float2 = array(-67345.76569, -6.734576569E4);
-
-$toCompare = array(
- true, $valid_true, $valid_false,
- false, array_merge($valid_false, $valid_true), NULL,
- $int1, $valid_int1, $invalid_int1,
- $int2, $valid_int2, $invalid_int2,
- $float1, $valid_float1, $invalid_float1,
- $float2, $valid_float2, $invalid_float2
-);
-
-$failed = false;
-for ($i = 0; $i < count($toCompare); $i +=3) {
- $typeToTest = $toCompare[$i];
- $valid_compares = $toCompare[$i + 1];
- $invalid_compares = $toCompare[$i + 2];
-
- foreach($valid_compares as $compareVal) {
- if ($typeToTest <= $compareVal) {
- // do nothing
- }
- else {
- echo "FAILED: '$typeToTest' > '$compareVal'\n";
- $failed = true;
- }
- }
-
- if ($invalid_compares != NULL) {
- foreach($invalid_compares as $compareVal) {
- if ($typeToTest <= $compareVal) {
- echo "FAILED: '$typeToTest' <= '$compareVal'\n";
- $failed = true;
- }
- }
- }
-
-}
-if ($failed == false) {
- echo "Test Passed\n";
-}
-?>
-===DONE===
---EXPECT--
-Test Passed
+--TEST--
+Test <= operator : different types
+--FILE--
+<?php
+$valid_true = array(1, "1", "true", 1.0, array(1));
+$valid_false = array(0, "", 0.0, array(), NULL);
+
+$int1 = 678;
+$int2 = -67836;
+$valid_int1 = array("679", "679abc", " 679", 679.0, 6.79E2, "678", "678abc", " 678", 678.0, 6.78E2, 6.789E2, "+678", +678);
+$valid_int2 = array("-67835", "-67835abc", " -67835", -67835.000, -6.7835E4, "-67836", "-67836abc". " -67836", -67835.0001, -6.78351E4, "-67836", -67835.0001, -6.78351E4);
+$invalid_int1 = array(677, "677");
+$invalid_int2 = array(-67874, "-67837");
+
+$float1 = 57385.45834;
+$float2 = -67345.76568;
+$valid_float1 = array("57385.45835", "57385.45835aaa", " 57385.45835", 5.738545835e4, "57385.45834", "57385.45834aaa", " 57385.45834", 5.738545834e4);
+$valid_float2 = array("-67345.76567", "-67345.76567aaa", " -67345.76567", -6.734576567E4, "-67345.76568", "-67345.76568aaa", " -67345.76568", -6.734576568E4);
+$invalid_float1 = array(57385.45833, 5.738545833e4);
+$invalid_float2 = array(-67345.76569, -6.734576569E4);
+
+$toCompare = array(
+ true, $valid_true, $valid_false,
+ false, array_merge($valid_false, $valid_true), NULL,
+ $int1, $valid_int1, $invalid_int1,
+ $int2, $valid_int2, $invalid_int2,
+ $float1, $valid_float1, $invalid_float1,
+ $float2, $valid_float2, $invalid_float2
+);
+
+$failed = false;
+for ($i = 0; $i < count($toCompare); $i +=3) {
+ $typeToTest = $toCompare[$i];
+ $valid_compares = $toCompare[$i + 1];
+ $invalid_compares = $toCompare[$i + 2];
+
+ foreach($valid_compares as $compareVal) {
+ if ($typeToTest <= $compareVal) {
+ // do nothing
+ }
+ else {
+ echo "FAILED: '$typeToTest' > '$compareVal'\n";
+ $failed = true;
+ }
+ }
+
+ if ($invalid_compares != NULL) {
+ foreach($invalid_compares as $compareVal) {
+ if ($typeToTest <= $compareVal) {
+ echo "FAILED: '$typeToTest' <= '$compareVal'\n";
+ $failed = true;
+ }
+ }
+ }
+
+}
+if ($failed == false) {
+ echo "Test Passed\n";
+}
+?>
+===DONE===
+--EXPECT--
+Test Passed
===DONE===
diff --git a/tests/lang/operators/operator_lt_or_equal_variation.phpt b/tests/lang/operators/operator_lt_or_equal_variation.phpt
index 293205876d..5724511a0e 100644
--- a/tests/lang/operators/operator_lt_or_equal_variation.phpt
+++ b/tests/lang/operators/operator_lt_or_equal_variation.phpt
@@ -1,63 +1,63 @@
---TEST--
-Test <= operator : max int 32bit range
---SKIPIF--
-<?php
-if (PHP_INT_SIZE != 4) die("skip this test is for 32bit platform only");
-?>
---FILE--
-<?php
-
-define("MAX_64Bit", 9223372036854775807);
-define("MAX_32Bit", 2147483647);
-define("MIN_64Bit", -9223372036854775807 - 1);
-define("MIN_32Bit", -2147483647 - 1);
-
-$validLtOrEqual = array (
-MAX_32Bit, array(MAX_32Bit, "2147483647", "2147483647.0000000", 2.147483647e9, 2147483647.0, MAX_32Bit + 1),
-MIN_32Bit, array(MIN_32Bit, "-2147483648", "-2147483648.000", -2.147483648e9, -2147483648.0, MIN_32Bit + 1),
-MAX_64Bit, array(MAX_64Bit, MAX_64Bit + 1, MAX_64Bit - 1),
-MIN_64Bit, array(MIN_64Bit, MIN_64Bit - 1, MIN_64Bit + 1),
-);
-
-$invalidLtOrEqual = array (
-MAX_32Bit, array("2147483646", 2.1474836460001e9, MAX_32Bit - 1),
-MIN_32Bit, array(MIN_32Bit - 1, "-2147483649", -2.1474836480001e9)
-);
-
-
-$failed = false;
-// test valid values
-for ($i = 0; $i < count($validLtOrEqual); $i +=2) {
- $typeToTestVal = $validLtOrEqual[$i];
- $compares = $validLtOrEqual[$i + 1];
- foreach($compares as $compareVal) {
- if ($typeToTestVal <= $compareVal) {
- // do nothing
- }
- else {
- echo "FAILED: '$typeToTestVal' > '$compareVal'\n";
- $failed = true;
- }
- }
-}
-// test invalid values
-for ($i = 0; $i < count($invalidLtOrEqual); $i +=2) {
- $typeToTestVal = $invalidLtOrEqual[$i];
- $compares = $invalidLtOrEqual[$i + 1];
- foreach($compares as $compareVal) {
- if ($typeToTestVal <= $compareVal) {
- echo "FAILED: '$typeToTestVal' <= '$compareVal'\n";
- $failed = true;
- }
- }
-}
-
-if ($failed == false) {
- echo "Test Passed\n";
-}
-
-?>
-===DONE===
---EXPECT--
-Test Passed
+--TEST--
+Test <= operator : max int 32bit range
+--SKIPIF--
+<?php
+if (PHP_INT_SIZE != 4) die("skip this test is for 32bit platform only");
+?>
+--FILE--
+<?php
+
+define("MAX_64Bit", 9223372036854775807);
+define("MAX_32Bit", 2147483647);
+define("MIN_64Bit", -9223372036854775807 - 1);
+define("MIN_32Bit", -2147483647 - 1);
+
+$validLtOrEqual = array (
+MAX_32Bit, array(MAX_32Bit, "2147483647", "2147483647.0000000", 2.147483647e9, 2147483647.0, MAX_32Bit + 1),
+MIN_32Bit, array(MIN_32Bit, "-2147483648", "-2147483648.000", -2.147483648e9, -2147483648.0, MIN_32Bit + 1),
+MAX_64Bit, array(MAX_64Bit, MAX_64Bit + 1, MAX_64Bit - 1),
+MIN_64Bit, array(MIN_64Bit, MIN_64Bit - 1, MIN_64Bit + 1),
+);
+
+$invalidLtOrEqual = array (
+MAX_32Bit, array("2147483646", 2.1474836460001e9, MAX_32Bit - 1),
+MIN_32Bit, array(MIN_32Bit - 1, "-2147483649", -2.1474836480001e9)
+);
+
+
+$failed = false;
+// test valid values
+for ($i = 0; $i < count($validLtOrEqual); $i +=2) {
+ $typeToTestVal = $validLtOrEqual[$i];
+ $compares = $validLtOrEqual[$i + 1];
+ foreach($compares as $compareVal) {
+ if ($typeToTestVal <= $compareVal) {
+ // do nothing
+ }
+ else {
+ echo "FAILED: '$typeToTestVal' > '$compareVal'\n";
+ $failed = true;
+ }
+ }
+}
+// test invalid values
+for ($i = 0; $i < count($invalidLtOrEqual); $i +=2) {
+ $typeToTestVal = $invalidLtOrEqual[$i];
+ $compares = $invalidLtOrEqual[$i + 1];
+ foreach($compares as $compareVal) {
+ if ($typeToTestVal <= $compareVal) {
+ echo "FAILED: '$typeToTestVal' <= '$compareVal'\n";
+ $failed = true;
+ }
+ }
+}
+
+if ($failed == false) {
+ echo "Test Passed\n";
+}
+
+?>
+===DONE===
+--EXPECT--
+Test Passed
===DONE===
diff --git a/tests/lang/operators/operator_lt_or_equal_variation_64bit.phpt b/tests/lang/operators/operator_lt_or_equal_variation_64bit.phpt
index 055cfc673b..f3b16c1fc9 100644
--- a/tests/lang/operators/operator_lt_or_equal_variation_64bit.phpt
+++ b/tests/lang/operators/operator_lt_or_equal_variation_64bit.phpt
@@ -1,63 +1,63 @@
---TEST--
-Test <= operator : max int 64bit range
---SKIPIF--
-<?php
-if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platform only");
-?>
---FILE--
-<?php
-
-define("MAX_64Bit", 9223372036854775807);
-define("MAX_32Bit", 2147483647);
-define("MIN_64Bit", -9223372036854775807 - 1);
-define("MIN_32Bit", -2147483647 - 1);
-
-$validLtOrEqual = array (
-MAX_32Bit, array(MAX_32Bit, "2147483647", "2147483647.0000000", 2.147483647e9, 2147483647.0, MAX_32Bit + 1),
-MIN_32Bit, array(MIN_32Bit, "-2147483648", "-2147483648.000", -2.147483648e9, -2147483648.0, MIN_32Bit + 1),
-MAX_64Bit, array(MAX_64Bit, MAX_64Bit + 1),
-MIN_64Bit, array(MIN_64Bit, MIN_64Bit - 1, MIN_64Bit + 1),
-);
-
-$invalidLtOrEqual = array (
-MAX_32Bit, array("2147483646", 2.1474836460001e9, MAX_32Bit - 1),
-MIN_32Bit, array(MIN_32Bit - 1, "-2147483649", -2.1474836480001e9)
-);
-
-
-$failed = false;
-// test valid values
-for ($i = 0; $i < count($validLtOrEqual); $i +=2) {
- $typeToTestVal = $validLtOrEqual[$i];
- $compares = $validLtOrEqual[$i + 1];
- foreach($compares as $compareVal) {
- if ($typeToTestVal <= $compareVal) {
- // do nothing
- }
- else {
- echo "FAILED: '$typeToTestVal' > '$compareVal'\n";
- $failed = true;
- }
- }
-}
-// test invalid values
-for ($i = 0; $i < count($invalidLtOrEqual); $i +=2) {
- $typeToTestVal = $invalidLtOrEqual[$i];
- $compares = $invalidLtOrEqual[$i + 1];
- foreach($compares as $compareVal) {
- if ($typeToTestVal <= $compareVal) {
- echo "FAILED: '$typeToTestVal' <= '$compareVal'\n";
- $failed = true;
- }
- }
-}
-
-if ($failed == false) {
- echo "Test Passed\n";
-}
-
-?>
-===DONE===
---EXPECT--
-Test Passed
+--TEST--
+Test <= operator : max int 64bit range
+--SKIPIF--
+<?php
+if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platform only");
+?>
+--FILE--
+<?php
+
+define("MAX_64Bit", 9223372036854775807);
+define("MAX_32Bit", 2147483647);
+define("MIN_64Bit", -9223372036854775807 - 1);
+define("MIN_32Bit", -2147483647 - 1);
+
+$validLtOrEqual = array (
+MAX_32Bit, array(MAX_32Bit, "2147483647", "2147483647.0000000", 2.147483647e9, 2147483647.0, MAX_32Bit + 1),
+MIN_32Bit, array(MIN_32Bit, "-2147483648", "-2147483648.000", -2.147483648e9, -2147483648.0, MIN_32Bit + 1),
+MAX_64Bit, array(MAX_64Bit, MAX_64Bit + 1),
+MIN_64Bit, array(MIN_64Bit, MIN_64Bit - 1, MIN_64Bit + 1),
+);
+
+$invalidLtOrEqual = array (
+MAX_32Bit, array("2147483646", 2.1474836460001e9, MAX_32Bit - 1),
+MIN_32Bit, array(MIN_32Bit - 1, "-2147483649", -2.1474836480001e9)
+);
+
+
+$failed = false;
+// test valid values
+for ($i = 0; $i < count($validLtOrEqual); $i +=2) {
+ $typeToTestVal = $validLtOrEqual[$i];
+ $compares = $validLtOrEqual[$i + 1];
+ foreach($compares as $compareVal) {
+ if ($typeToTestVal <= $compareVal) {
+ // do nothing
+ }
+ else {
+ echo "FAILED: '$typeToTestVal' > '$compareVal'\n";
+ $failed = true;
+ }
+ }
+}
+// test invalid values
+for ($i = 0; $i < count($invalidLtOrEqual); $i +=2) {
+ $typeToTestVal = $invalidLtOrEqual[$i];
+ $compares = $invalidLtOrEqual[$i + 1];
+ foreach($compares as $compareVal) {
+ if ($typeToTestVal <= $compareVal) {
+ echo "FAILED: '$typeToTestVal' <= '$compareVal'\n";
+ $failed = true;
+ }
+ }
+}
+
+if ($failed == false) {
+ echo "Test Passed\n";
+}
+
+?>
+===DONE===
+--EXPECT--
+Test Passed
===DONE===
diff --git a/tests/lang/operators/operator_lt_variation.phpt b/tests/lang/operators/operator_lt_variation.phpt
index 62fedfad5a..4f468638dc 100644
--- a/tests/lang/operators/operator_lt_variation.phpt
+++ b/tests/lang/operators/operator_lt_variation.phpt
@@ -1,60 +1,60 @@
---TEST--
-Test < operator : max int 32bit range
---SKIPIF--
-<?php
-if (PHP_INT_SIZE != 4) die("skip this test is for 32bit platform only");
-?>
---FILE--
-<?php
-
-define("MAX_64Bit", 9223372036854775807);
-define("MAX_32Bit", 2147483647);
-define("MIN_64Bit", -9223372036854775807 - 1);
-define("MIN_32Bit", -2147483647 - 1);
-
-$validLessThan = array (
-2147483646, array(MAX_32Bit, "2147483647", "2147483647.001", 2.147483647e9, 2147483647.9),
-MIN_32Bit, array(MIN_32Bit + 1, "-2147483647", "-2147483646.001", -2.1474836461e9, -2147483646.9),
-);
-
-$invalidLessThan = array (
-MAX_32Bit, array("2147483646", 2.1474836460001e9, MAX_32Bit - 1),
-MIN_32Bit, array(MIN_32Bit - 1, "-2147483649", -2.1474836480001e9)
-);
-
-$failed = false;
-// test for equality
-for ($i = 0; $i < count($validLessThan); $i +=2) {
- $typeToTestVal = $validLessThan[$i];
- $compares = $validLessThan[$i + 1];
- foreach($compares as $compareVal) {
- if ($typeToTestVal < $compareVal) {
- // do nothing
- }
- else {
- echo "FAILED: '$typeToTestVal' >= '$compareVal'\n";
- $failed = true;
- }
- }
-}
-// test for invalid values
-for ($i = 0; $i < count($invalidLessThan); $i +=2) {
- $typeToTestVal = $invalidLessThan[$i];
- $compares = $invalidLessThan[$i + 1];
- foreach($compares as $compareVal) {
- if ($typeToTestVal < $compareVal) {
- echo "FAILED: '$typeToTestVal' < '$compareVal'\n";
- $failed = true;
- }
- }
-}
-
-if ($failed == false) {
- echo "Test Passed\n";
-}
-
-?>
-===DONE===
---EXPECT--
-Test Passed
+--TEST--
+Test < operator : max int 32bit range
+--SKIPIF--
+<?php
+if (PHP_INT_SIZE != 4) die("skip this test is for 32bit platform only");
+?>
+--FILE--
+<?php
+
+define("MAX_64Bit", 9223372036854775807);
+define("MAX_32Bit", 2147483647);
+define("MIN_64Bit", -9223372036854775807 - 1);
+define("MIN_32Bit", -2147483647 - 1);
+
+$validLessThan = array (
+2147483646, array(MAX_32Bit, "2147483647", "2147483647.001", 2.147483647e9, 2147483647.9),
+MIN_32Bit, array(MIN_32Bit + 1, "-2147483647", "-2147483646.001", -2.1474836461e9, -2147483646.9),
+);
+
+$invalidLessThan = array (
+MAX_32Bit, array("2147483646", 2.1474836460001e9, MAX_32Bit - 1),
+MIN_32Bit, array(MIN_32Bit - 1, "-2147483649", -2.1474836480001e9)
+);
+
+$failed = false;
+// test for equality
+for ($i = 0; $i < count($validLessThan); $i +=2) {
+ $typeToTestVal = $validLessThan[$i];
+ $compares = $validLessThan[$i + 1];
+ foreach($compares as $compareVal) {
+ if ($typeToTestVal < $compareVal) {
+ // do nothing
+ }
+ else {
+ echo "FAILED: '$typeToTestVal' >= '$compareVal'\n";
+ $failed = true;
+ }
+ }
+}
+// test for invalid values
+for ($i = 0; $i < count($invalidLessThan); $i +=2) {
+ $typeToTestVal = $invalidLessThan[$i];
+ $compares = $invalidLessThan[$i + 1];
+ foreach($compares as $compareVal) {
+ if ($typeToTestVal < $compareVal) {
+ echo "FAILED: '$typeToTestVal' < '$compareVal'\n";
+ $failed = true;
+ }
+ }
+}
+
+if ($failed == false) {
+ echo "Test Passed\n";
+}
+
+?>
+===DONE===
+--EXPECT--
+Test Passed
===DONE===
diff --git a/tests/lang/operators/operator_lt_variation_64bit.phpt b/tests/lang/operators/operator_lt_variation_64bit.phpt
index e6f16a3883..3ee274aea0 100644
--- a/tests/lang/operators/operator_lt_variation_64bit.phpt
+++ b/tests/lang/operators/operator_lt_variation_64bit.phpt
@@ -1,60 +1,60 @@
---TEST--
-Test < operator : max int 64bit range
---SKIPIF--
-<?php
-if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platform only");
-?>
---FILE--
-<?php
-
-define("MAX_64Bit", 9223372036854775807);
-define("MAX_32Bit", 2147483647);
-define("MIN_64Bit", -9223372036854775807 - 1);
-define("MIN_32Bit", -2147483647 - 1);
-
-$validLessThan = array (
-2147483646, array(MAX_32Bit, "2147483647", "2147483647.001", 2.147483647e9, 2147483647.9),
-MIN_32Bit, array(MIN_32Bit + 1, "-2147483647", "-2147483646.001", -2.1474836461e9, -2147483646.9),
-);
-
-$invalidLessThan = array (
-MAX_32Bit, array("2147483646", 2.1474836460001e9, MAX_32Bit - 1),
-MIN_32Bit, array(MIN_32Bit - 1, "-2147483649", -2.1474836480001e9)
-);
-
-$failed = false;
-// test for equality
-for ($i = 0; $i < count($validLessThan); $i +=2) {
- $typeToTestVal = $validLessThan[$i];
- $compares = $validLessThan[$i + 1];
- foreach($compares as $compareVal) {
- if ($typeToTestVal < $compareVal) {
- // do nothing
- }
- else {
- echo "FAILED: '$typeToTestVal' >= '$compareVal'\n";
- $failed = true;
- }
- }
-}
-// test for invalid values
-for ($i = 0; $i < count($invalidLessThan); $i +=2) {
- $typeToTestVal = $invalidLessThan[$i];
- $compares = $invalidLessThan[$i + 1];
- foreach($compares as $compareVal) {
- if ($typeToTestVal < $compareVal) {
- echo "FAILED: '$typeToTestVal' < '$compareVal'\n";
- $failed = true;
- }
- }
-}
-
-if ($failed == false) {
- echo "Test Passed\n";
-}
-
-?>
-===DONE===
---EXPECT--
-Test Passed
+--TEST--
+Test < operator : max int 64bit range
+--SKIPIF--
+<?php
+if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platform only");
+?>
+--FILE--
+<?php
+
+define("MAX_64Bit", 9223372036854775807);
+define("MAX_32Bit", 2147483647);
+define("MIN_64Bit", -9223372036854775807 - 1);
+define("MIN_32Bit", -2147483647 - 1);
+
+$validLessThan = array (
+2147483646, array(MAX_32Bit, "2147483647", "2147483647.001", 2.147483647e9, 2147483647.9),
+MIN_32Bit, array(MIN_32Bit + 1, "-2147483647", "-2147483646.001", -2.1474836461e9, -2147483646.9),
+);
+
+$invalidLessThan = array (
+MAX_32Bit, array("2147483646", 2.1474836460001e9, MAX_32Bit - 1),
+MIN_32Bit, array(MIN_32Bit - 1, "-2147483649", -2.1474836480001e9)
+);
+
+$failed = false;
+// test for equality
+for ($i = 0; $i < count($validLessThan); $i +=2) {
+ $typeToTestVal = $validLessThan[$i];
+ $compares = $validLessThan[$i + 1];
+ foreach($compares as $compareVal) {
+ if ($typeToTestVal < $compareVal) {
+ // do nothing
+ }
+ else {
+ echo "FAILED: '$typeToTestVal' >= '$compareVal'\n";
+ $failed = true;
+ }
+ }
+}
+// test for invalid values
+for ($i = 0; $i < count($invalidLessThan); $i +=2) {
+ $typeToTestVal = $invalidLessThan[$i];
+ $compares = $invalidLessThan[$i + 1];
+ foreach($compares as $compareVal) {
+ if ($typeToTestVal < $compareVal) {
+ echo "FAILED: '$typeToTestVal' < '$compareVal'\n";
+ $failed = true;
+ }
+ }
+}
+
+if ($failed == false) {
+ echo "Test Passed\n";
+}
+
+?>
+===DONE===
+--EXPECT--
+Test Passed
===DONE===
diff --git a/tests/lang/operators/operator_notequals_basic.phpt b/tests/lang/operators/operator_notequals_basic.phpt
index 80754dacb4..cef0be6279 100644
--- a/tests/lang/operators/operator_notequals_basic.phpt
+++ b/tests/lang/operators/operator_notequals_basic.phpt
@@ -1,65 +1,65 @@
---TEST--
-Test != operator : different types
---FILE--
-<?php
-
-$valid_true = array(1, "1", "true", 1.0, array(1));
-$valid_false = array(0, "", 0.0, array(), NULL);
-
-$int1 = 679;
-$int2 = -67835;
-$valid_int1 = array("6 7 9", "6y79", 678);
-$valid_int2 = array("- 67835", "-67,835", "-67 835", "-678y35", -76834);
-$invalid_int1 = array("679", "679abc", " 679", "679 ", 679.0, 6.79E2, "+679", +679);
-$invalid_int2 = array("-67835", "-67835abc", " -67835", "-67835 ", -67835.000, -6.7835E4);
-
-$float1 = 57385.45835;
-$float2 = -67345.76567;
-$valid_float1 = array("57385. 45835", "57,385.45835", 57385.45834, 5.738545834e4);
-$valid_float2 = array("- 67345.76567", "-67,345.76567", -67345.76566, -6.734576566E4);
-$invalid_float1 = array("57385.45835", "57385.45835aaa", " 57385.45835", 5.738545835e4);
-$invalid_float2 = array("-67345.76567", "-67345.76567aaa", " -67345.76567", -6.734576567E4);
-
-
-$toCompare = array(
- true, $valid_false, $valid_true,
- false, $valid_true, $valid_false,
- $int1, $valid_int1, $invalid_int1,
- $int2, $valid_int2, $invalid_int2,
- $float1, $valid_float1, $invalid_float1,
- $float2, $valid_float2, $invalid_float2
-);
-
-$failed = false;
-for ($i = 0; $i < count($toCompare); $i +=3) {
- $typeToTest = $toCompare[$i];
- $valid_compares = $toCompare[$i + 1];
- $invalid_compares = $toCompare[$i + 2];
-
- foreach($valid_compares as $compareVal) {
- if ($typeToTest != $compareVal && $typeToTest <> $compareVal) {
- // do nothing
- }
- else {
- echo "FAILED: '$typeToTest' == '$compareVal'\n";
- $failed = true;
- }
- }
-
- foreach($invalid_compares as $compareVal) {
- if ($typeToTest != $compareVal || $typeToTest <> $compareVal) {
- echo "FAILED: '$typeToTest' != '$compareVal'\n";
- $failed = true;
- }
- }
-
-}
-if ($failed == false) {
- echo "Test Passed\n";
-}
-
-?>
-===DONE===
---EXPECT--
-Test Passed
+--TEST--
+Test != operator : different types
+--FILE--
+<?php
+
+$valid_true = array(1, "1", "true", 1.0, array(1));
+$valid_false = array(0, "", 0.0, array(), NULL);
+
+$int1 = 679;
+$int2 = -67835;
+$valid_int1 = array("6 7 9", "6y79", 678);
+$valid_int2 = array("- 67835", "-67,835", "-67 835", "-678y35", -76834);
+$invalid_int1 = array("679", "679abc", " 679", "679 ", 679.0, 6.79E2, "+679", +679);
+$invalid_int2 = array("-67835", "-67835abc", " -67835", "-67835 ", -67835.000, -6.7835E4);
+
+$float1 = 57385.45835;
+$float2 = -67345.76567;
+$valid_float1 = array("57385. 45835", "57,385.45835", 57385.45834, 5.738545834e4);
+$valid_float2 = array("- 67345.76567", "-67,345.76567", -67345.76566, -6.734576566E4);
+$invalid_float1 = array("57385.45835", "57385.45835aaa", " 57385.45835", 5.738545835e4);
+$invalid_float2 = array("-67345.76567", "-67345.76567aaa", " -67345.76567", -6.734576567E4);
+
+
+$toCompare = array(
+ true, $valid_false, $valid_true,
+ false, $valid_true, $valid_false,
+ $int1, $valid_int1, $invalid_int1,
+ $int2, $valid_int2, $invalid_int2,
+ $float1, $valid_float1, $invalid_float1,
+ $float2, $valid_float2, $invalid_float2
+);
+
+$failed = false;
+for ($i = 0; $i < count($toCompare); $i +=3) {
+ $typeToTest = $toCompare[$i];
+ $valid_compares = $toCompare[$i + 1];
+ $invalid_compares = $toCompare[$i + 2];
+
+ foreach($valid_compares as $compareVal) {
+ if ($typeToTest != $compareVal && $typeToTest <> $compareVal) {
+ // do nothing
+ }
+ else {
+ echo "FAILED: '$typeToTest' == '$compareVal'\n";
+ $failed = true;
+ }
+ }
+
+ foreach($invalid_compares as $compareVal) {
+ if ($typeToTest != $compareVal || $typeToTest <> $compareVal) {
+ echo "FAILED: '$typeToTest' != '$compareVal'\n";
+ $failed = true;
+ }
+ }
+
+}
+if ($failed == false) {
+ echo "Test Passed\n";
+}
+
+?>
+===DONE===
+--EXPECT--
+Test Passed
===DONE===
diff --git a/tests/lang/operators/operator_notequals_variation.phpt b/tests/lang/operators/operator_notequals_variation.phpt
index 2a0b57035d..25bbfc5859 100644
--- a/tests/lang/operators/operator_notequals_variation.phpt
+++ b/tests/lang/operators/operator_notequals_variation.phpt
@@ -1,63 +1,63 @@
---TEST--
-Test != operator : max int 32bit range
---SKIPIF--
-<?php
-if (PHP_INT_SIZE != 4) die("skip this test is for 32bit platform only");
-?>
---FILE--
-<?php
-
-define("MAX_64Bit", 9223372036854775807);
-define("MAX_32Bit", 2147483647);
-define("MIN_64Bit", -9223372036854775807 - 1);
-define("MIN_32Bit", -2147483647 - 1);
-
-$invalidNotEquals = array (
-MAX_32Bit, array(MAX_32Bit, "2147483647", "2147483647.0000000", 2.147483647e9),
-MIN_32Bit, array(MIN_32Bit, "-2147483648", "-2147483648.000", -2.147483648e9),
-MAX_64Bit, array(MAX_64Bit, MAX_64Bit + 1, MAX_64Bit - 1),
-MIN_64Bit, array(MIN_64Bit, MIN_64Bit - 1, MIN_64Bit + 1),
-);
-
-$validNotEquals = array (
-MAX_32Bit, array("2147483648", 2.1474836470001e9, MAX_32Bit - 1, MAX_32Bit + 1),
-MIN_32Bit, array("-2147483649", -2.1474836480001e9, MIN_32Bit -1, MIN_32Bit + 1),
-);
-
-
-$failed = false;
-// test valid values
-for ($i = 0; $i < count($validNotEquals); $i +=2) {
- $typeToTestVal = $validNotEquals[$i];
- $compares = $validNotEquals[$i + 1];
- foreach($compares as $compareVal) {
- if ($typeToTestVal != $compareVal && $typeToTestVal != $compareVal) {
- // do nothing
- }
- else {
- echo "FAILED: '$typeToTestVal' == '$compareVal'\n";
- $failed = true;
- }
- }
-}
-// test invalid values
-for ($i = 0; $i < count($invalidNotEquals); $i +=2) {
- $typeToTestVal = $invalidNotEquals[$i];
- $compares = $invalidNotEquals[$i + 1];
- foreach($compares as $compareVal) {
- if ($typeToTestVal != $compareVal || $typeToTestVal != $compareVal) {
- echo "FAILED: '$typeToTestVal' != '$compareVal'\n";
- $failed = true;
- }
- }
-}
-
-if ($failed == false) {
- echo "Test Passed\n";
-}
-
-?>
-===DONE===
---EXPECT--
-Test Passed
+--TEST--
+Test != operator : max int 32bit range
+--SKIPIF--
+<?php
+if (PHP_INT_SIZE != 4) die("skip this test is for 32bit platform only");
+?>
+--FILE--
+<?php
+
+define("MAX_64Bit", 9223372036854775807);
+define("MAX_32Bit", 2147483647);
+define("MIN_64Bit", -9223372036854775807 - 1);
+define("MIN_32Bit", -2147483647 - 1);
+
+$invalidNotEquals = array (
+MAX_32Bit, array(MAX_32Bit, "2147483647", "2147483647.0000000", 2.147483647e9),
+MIN_32Bit, array(MIN_32Bit, "-2147483648", "-2147483648.000", -2.147483648e9),
+MAX_64Bit, array(MAX_64Bit, MAX_64Bit + 1, MAX_64Bit - 1),
+MIN_64Bit, array(MIN_64Bit, MIN_64Bit - 1, MIN_64Bit + 1),
+);
+
+$validNotEquals = array (
+MAX_32Bit, array("2147483648", 2.1474836470001e9, MAX_32Bit - 1, MAX_32Bit + 1),
+MIN_32Bit, array("-2147483649", -2.1474836480001e9, MIN_32Bit -1, MIN_32Bit + 1),
+);
+
+
+$failed = false;
+// test valid values
+for ($i = 0; $i < count($validNotEquals); $i +=2) {
+ $typeToTestVal = $validNotEquals[$i];
+ $compares = $validNotEquals[$i + 1];
+ foreach($compares as $compareVal) {
+ if ($typeToTestVal != $compareVal && $typeToTestVal != $compareVal) {
+ // do nothing
+ }
+ else {
+ echo "FAILED: '$typeToTestVal' == '$compareVal'\n";
+ $failed = true;
+ }
+ }
+}
+// test invalid values
+for ($i = 0; $i < count($invalidNotEquals); $i +=2) {
+ $typeToTestVal = $invalidNotEquals[$i];
+ $compares = $invalidNotEquals[$i + 1];
+ foreach($compares as $compareVal) {
+ if ($typeToTestVal != $compareVal || $typeToTestVal != $compareVal) {
+ echo "FAILED: '$typeToTestVal' != '$compareVal'\n";
+ $failed = true;
+ }
+ }
+}
+
+if ($failed == false) {
+ echo "Test Passed\n";
+}
+
+?>
+===DONE===
+--EXPECT--
+Test Passed
===DONE===
diff --git a/tests/lang/operators/operator_notequals_variation_64bit.phpt b/tests/lang/operators/operator_notequals_variation_64bit.phpt
index 16ec925cb8..6fbc496fa5 100644
--- a/tests/lang/operators/operator_notequals_variation_64bit.phpt
+++ b/tests/lang/operators/operator_notequals_variation_64bit.phpt
@@ -1,65 +1,65 @@
---TEST--
-Test == operator : max int 64bit range
---SKIPIF--
-<?php
-if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platform only");
-?>
---FILE--
-<?php
-
-define("MAX_64Bit", 9223372036854775807);
-define("MAX_32Bit", 2147483647);
-define("MIN_64Bit", -9223372036854775807 - 1);
-define("MIN_32Bit", -2147483647 - 1);
-
-$invalidNotEquals = array (
-MAX_32Bit, array(MAX_32Bit, "2147483647", "2147483647.0000000", 2.147483647e9),
-MIN_32Bit, array(MIN_32Bit, "-2147483648", "-2147483648.000", -2.147483648e9),
-MAX_64Bit, array(MAX_64Bit, MAX_64Bit + 1),
-MIN_64Bit, array(MIN_64Bit, MIN_64Bit - 1),
-);
-
-$validNotEquals = array (
-MAX_32Bit, array("2147483648", 2.1474836470001e9, MAX_32Bit - 1, MAX_32Bit + 1),
-MIN_32Bit, array("-2147483649", -2.1474836480001e9, MIN_32Bit -1, MIN_32Bit + 1),
-MAX_64Bit, array(MAX_64Bit - 1),
-MIN_64Bit, array(MIN_64Bit + 1),
-);
-
-
-$failed = false;
-// test valid values
-for ($i = 0; $i < count($validNotEquals); $i +=2) {
- $typeToTestVal = $validNotEquals[$i];
- $compares = $validNotEquals[$i + 1];
- foreach($compares as $compareVal) {
- if ($typeToTestVal != $compareVal && $typeToTestVal <> $compareVal) {
- // do nothing
- }
- else {
- echo "FAILED: '$typeToTestVal' == '$compareVal'\n";
- $failed = true;
- }
- }
-}
-// test invalid values
-for ($i = 0; $i < count($invalidNotEquals); $i +=2) {
- $typeToTestVal = $invalidNotEquals[$i];
- $compares = $invalidNotEquals[$i + 1];
- foreach($compares as $compareVal) {
- if ($typeToTestVal != $compareVal || $typeToTestVal <> $compareVal) {
- echo "FAILED: '$typeToTestVal' != '$compareVal'\n";
- $failed = true;
- }
- }
-}
-
-if ($failed == false) {
- echo "Test Passed\n";
-}
-
-?>
-===DONE===
---EXPECT--
-Test Passed
+--TEST--
+Test == operator : max int 64bit range
+--SKIPIF--
+<?php
+if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platform only");
+?>
+--FILE--
+<?php
+
+define("MAX_64Bit", 9223372036854775807);
+define("MAX_32Bit", 2147483647);
+define("MIN_64Bit", -9223372036854775807 - 1);
+define("MIN_32Bit", -2147483647 - 1);
+
+$invalidNotEquals = array (
+MAX_32Bit, array(MAX_32Bit, "2147483647", "2147483647.0000000", 2.147483647e9),
+MIN_32Bit, array(MIN_32Bit, "-2147483648", "-2147483648.000", -2.147483648e9),
+MAX_64Bit, array(MAX_64Bit, MAX_64Bit + 1),
+MIN_64Bit, array(MIN_64Bit, MIN_64Bit - 1),
+);
+
+$validNotEquals = array (
+MAX_32Bit, array("2147483648", 2.1474836470001e9, MAX_32Bit - 1, MAX_32Bit + 1),
+MIN_32Bit, array("-2147483649", -2.1474836480001e9, MIN_32Bit -1, MIN_32Bit + 1),
+MAX_64Bit, array(MAX_64Bit - 1),
+MIN_64Bit, array(MIN_64Bit + 1),
+);
+
+
+$failed = false;
+// test valid values
+for ($i = 0; $i < count($validNotEquals); $i +=2) {
+ $typeToTestVal = $validNotEquals[$i];
+ $compares = $validNotEquals[$i + 1];
+ foreach($compares as $compareVal) {
+ if ($typeToTestVal != $compareVal && $typeToTestVal <> $compareVal) {
+ // do nothing
+ }
+ else {
+ echo "FAILED: '$typeToTestVal' == '$compareVal'\n";
+ $failed = true;
+ }
+ }
+}
+// test invalid values
+for ($i = 0; $i < count($invalidNotEquals); $i +=2) {
+ $typeToTestVal = $invalidNotEquals[$i];
+ $compares = $invalidNotEquals[$i + 1];
+ foreach($compares as $compareVal) {
+ if ($typeToTestVal != $compareVal || $typeToTestVal <> $compareVal) {
+ echo "FAILED: '$typeToTestVal' != '$compareVal'\n";
+ $failed = true;
+ }
+ }
+}
+
+if ($failed == false) {
+ echo "Test Passed\n";
+}
+
+?>
+===DONE===
+--EXPECT--
+Test Passed
===DONE===
diff --git a/tests/lang/operators/operator_notidentical_basic.phpt b/tests/lang/operators/operator_notidentical_basic.phpt
index 143d72038b..9f21ea4bca 100644
--- a/tests/lang/operators/operator_notidentical_basic.phpt
+++ b/tests/lang/operators/operator_notidentical_basic.phpt
@@ -1,65 +1,65 @@
---TEST--
-Test !== operator : different types
---FILE--
-<?php
-
-$valid_true = array(1, "1", "true", 1.0, array(1));
-$valid_false = array(0, "", 0.0, array(), NULL);
-
-$int1 = 679;
-$int2 = -67835;
-$valid_int1 = array("679", "679abc", " 679", "679 ", 679.0, 6.79E2, "+679", "6 7 9", "6y79", 678);
-$valid_int2 = array("-67835", "-67835abc", " -67835", "-67835 ", -67835.000, -6.7835E4, "- 67835", "-67,835", "-67 835", "-678y35", -76834);
-$invalid_int1 = array(679, +679);
-$invalid_int2 = array(-67835);
-
-$float1 = 57385.45835;
-$float2 = -67345.76567;
-$valid_float1 = array("57385.45835", "57385.45835aaa", " 57385.45835", "57385. 45835", "57,385.45835", 57385.45834, 5.738545834e4);
-$valid_float2 = array("-67345.76567", "-67345.76567aaa", " -67345.76567", "- 67345.76567", "-67,345.76567", -67345.76566, -6.734576566E4);
-$invalid_float1 = array(57385.45835, 5.738545835e4);
-$invalid_float2 = array(-67345.76567, -6.734576567E4);
-
-
-$toCompare = array(
- true, array_merge($valid_true, $valid_false), array(true),
- false, array_merge($valid_true, $valid_false), array(false),
- $int1, $valid_int1, $invalid_int1,
- $int2, $valid_int2, $invalid_int2,
- $float1, $valid_float1, $invalid_float1,
- $float2, $valid_float2, $invalid_float2
-);
-
-$failed = false;
-for ($i = 0; $i < count($toCompare); $i +=3) {
- $typeToTest = $toCompare[$i];
- $valid_compares = $toCompare[$i + 1];
- $invalid_compares = $toCompare[$i + 2];
-
- foreach($valid_compares as $compareVal) {
- if ($typeToTest !== $compareVal) {
- // do nothing
- }
- else {
- echo "FAILED: '$typeToTest' === '$compareVal'\n";
- $failed = true;
- }
- }
-
- foreach($invalid_compares as $compareVal) {
- if ($typeToTest !== $compareVal) {
- echo "FAILED: '$typeToTest' !== '$compareVal'\n";
- $failed = true;
- }
- }
-
-}
-if ($failed == false) {
- echo "Test Passed\n";
-}
-
-?>
-===DONE===
---EXPECT--
-Test Passed
+--TEST--
+Test !== operator : different types
+--FILE--
+<?php
+
+$valid_true = array(1, "1", "true", 1.0, array(1));
+$valid_false = array(0, "", 0.0, array(), NULL);
+
+$int1 = 679;
+$int2 = -67835;
+$valid_int1 = array("679", "679abc", " 679", "679 ", 679.0, 6.79E2, "+679", "6 7 9", "6y79", 678);
+$valid_int2 = array("-67835", "-67835abc", " -67835", "-67835 ", -67835.000, -6.7835E4, "- 67835", "-67,835", "-67 835", "-678y35", -76834);
+$invalid_int1 = array(679, +679);
+$invalid_int2 = array(-67835);
+
+$float1 = 57385.45835;
+$float2 = -67345.76567;
+$valid_float1 = array("57385.45835", "57385.45835aaa", " 57385.45835", "57385. 45835", "57,385.45835", 57385.45834, 5.738545834e4);
+$valid_float2 = array("-67345.76567", "-67345.76567aaa", " -67345.76567", "- 67345.76567", "-67,345.76567", -67345.76566, -6.734576566E4);
+$invalid_float1 = array(57385.45835, 5.738545835e4);
+$invalid_float2 = array(-67345.76567, -6.734576567E4);
+
+
+$toCompare = array(
+ true, array_merge($valid_true, $valid_false), array(true),
+ false, array_merge($valid_true, $valid_false), array(false),
+ $int1, $valid_int1, $invalid_int1,
+ $int2, $valid_int2, $invalid_int2,
+ $float1, $valid_float1, $invalid_float1,
+ $float2, $valid_float2, $invalid_float2
+);
+
+$failed = false;
+for ($i = 0; $i < count($toCompare); $i +=3) {
+ $typeToTest = $toCompare[$i];
+ $valid_compares = $toCompare[$i + 1];
+ $invalid_compares = $toCompare[$i + 2];
+
+ foreach($valid_compares as $compareVal) {
+ if ($typeToTest !== $compareVal) {
+ // do nothing
+ }
+ else {
+ echo "FAILED: '$typeToTest' === '$compareVal'\n";
+ $failed = true;
+ }
+ }
+
+ foreach($invalid_compares as $compareVal) {
+ if ($typeToTest !== $compareVal) {
+ echo "FAILED: '$typeToTest' !== '$compareVal'\n";
+ $failed = true;
+ }
+ }
+
+}
+if ($failed == false) {
+ echo "Test Passed\n";
+}
+
+?>
+===DONE===
+--EXPECT--
+Test Passed
===DONE===
diff --git a/tests/lang/operators/operator_notidentical_variation.phpt b/tests/lang/operators/operator_notidentical_variation.phpt
index 702797ec8d..a9fbcf60e1 100644
--- a/tests/lang/operators/operator_notidentical_variation.phpt
+++ b/tests/lang/operators/operator_notidentical_variation.phpt
@@ -1,64 +1,64 @@
---TEST--
-Test !== operator : max int 32bit range
---SKIPIF--
-<?php
-if (PHP_INT_SIZE != 4) die("skip this test is for 32bit platform only");
-?>
---FILE--
-<?php
-
-define("MAX_64Bit", 9223372036854775807);
-define("MAX_32Bit", 2147483647);
-define("MIN_64Bit", -9223372036854775807 - 1);
-define("MIN_32Bit", -2147483647 - 1);
-
-$invalidNotIdentical = array (
-MAX_32Bit, array(MAX_32Bit),
-MIN_32Bit, array(MIN_32Bit),
-MAX_64Bit, array(MAX_64Bit, MAX_64Bit + 1, MAX_64Bit - 1),
-MIN_64Bit, array(MIN_64Bit, MIN_64Bit - 1, MIN_64Bit + 1),
-);
-
-$validNotIdentical = array (
-MAX_32Bit, array("2147483647", "2147483647.0000000", 2.147483647e9, 2147483647.0, "2147483648", 2.1474836470001e9, MAX_32Bit - 1, MAX_32Bit + 1),
-MIN_32Bit, array("-2147483648", "-2147483648.000", -2.147483648e9, -2147483648.0, "-2147483649", -2.1474836480001e9, MIN_32Bit -1, MIN_32Bit + 1),
-);
-
-
-$failed = false;
-// test for valid values
-for ($i = 0; $i < count($validNotIdentical); $i +=2) {
- $typeToTestVal = $validNotIdentical[$i];
- $compares = $validNotIdentical[$i + 1];
- foreach($compares as $compareVal) {
- if ($typeToTestVal !== $compareVal) {
- //Do Nothing
- }
- else {
- echo "FAILED: '$typeToTestVal' === '$compareVal'\n";
- $failed = true;
- }
- }
-}
-// test for invalid values
-for ($i = 0; $i < count($invalidNotIdentical); $i +=2) {
- $typeToTestVal = $invalidNotIdentical[$i];
- $compares = $invalidNotIdentical[$i + 1];
- foreach($compares as $compareVal) {
- if ($typeToTestVal !== $compareVal) {
- echo "FAILED: '$typeToTestVal' !== '$compareVal'\n";
- $failed = true;
- }
- }
-}
-
-
-if ($failed == false) {
- echo "Test Passed\n";
-}
-
-?>
-===DONE===
---EXPECT--
-Test Passed
+--TEST--
+Test !== operator : max int 32bit range
+--SKIPIF--
+<?php
+if (PHP_INT_SIZE != 4) die("skip this test is for 32bit platform only");
+?>
+--FILE--
+<?php
+
+define("MAX_64Bit", 9223372036854775807);
+define("MAX_32Bit", 2147483647);
+define("MIN_64Bit", -9223372036854775807 - 1);
+define("MIN_32Bit", -2147483647 - 1);
+
+$invalidNotIdentical = array (
+MAX_32Bit, array(MAX_32Bit),
+MIN_32Bit, array(MIN_32Bit),
+MAX_64Bit, array(MAX_64Bit, MAX_64Bit + 1, MAX_64Bit - 1),
+MIN_64Bit, array(MIN_64Bit, MIN_64Bit - 1, MIN_64Bit + 1),
+);
+
+$validNotIdentical = array (
+MAX_32Bit, array("2147483647", "2147483647.0000000", 2.147483647e9, 2147483647.0, "2147483648", 2.1474836470001e9, MAX_32Bit - 1, MAX_32Bit + 1),
+MIN_32Bit, array("-2147483648", "-2147483648.000", -2.147483648e9, -2147483648.0, "-2147483649", -2.1474836480001e9, MIN_32Bit -1, MIN_32Bit + 1),
+);
+
+
+$failed = false;
+// test for valid values
+for ($i = 0; $i < count($validNotIdentical); $i +=2) {
+ $typeToTestVal = $validNotIdentical[$i];
+ $compares = $validNotIdentical[$i + 1];
+ foreach($compares as $compareVal) {
+ if ($typeToTestVal !== $compareVal) {
+ //Do Nothing
+ }
+ else {
+ echo "FAILED: '$typeToTestVal' === '$compareVal'\n";
+ $failed = true;
+ }
+ }
+}
+// test for invalid values
+for ($i = 0; $i < count($invalidNotIdentical); $i +=2) {
+ $typeToTestVal = $invalidNotIdentical[$i];
+ $compares = $invalidNotIdentical[$i + 1];
+ foreach($compares as $compareVal) {
+ if ($typeToTestVal !== $compareVal) {
+ echo "FAILED: '$typeToTestVal' !== '$compareVal'\n";
+ $failed = true;
+ }
+ }
+}
+
+
+if ($failed == false) {
+ echo "Test Passed\n";
+}
+
+?>
+===DONE===
+--EXPECT--
+Test Passed
===DONE===
diff --git a/tests/lang/operators/operator_notidentical_variation_64bit.phpt b/tests/lang/operators/operator_notidentical_variation_64bit.phpt
index 8a60cfdbb4..aa5aab7a59 100644
--- a/tests/lang/operators/operator_notidentical_variation_64bit.phpt
+++ b/tests/lang/operators/operator_notidentical_variation_64bit.phpt
@@ -1,65 +1,65 @@
---TEST--
-Test !== operator : max int 64bit range
---SKIPIF--
-<?php
-if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platform only");
-?>
---FILE--
-<?php
-
-define("MAX_64Bit", 9223372036854775807);
-define("MAX_32Bit", 2147483647);
-define("MIN_64Bit", -9223372036854775807 - 1);
-define("MIN_32Bit", -2147483647 - 1);
-
-$invalidNotIdentical = array (
-MAX_32Bit, array(MAX_32Bit),
-MIN_32Bit, array(MIN_32Bit),
-MAX_64Bit, array(MAX_64Bit),
-MIN_64Bit, array(MIN_64Bit),
-);
-
-$validNotIdentical = array (
-MAX_32Bit, array("2147483647", "2147483647.0000000", 2.147483647e9, 2147483647.0, "2147483648", 2.1474836470001e9, MAX_32Bit - 1, MAX_32Bit + 1),
-MIN_32Bit, array("-2147483648", "-2147483648.000", -2.147483648e9, -2147483648.0, "-2147483649", -2.1474836480001e9, MIN_32Bit -1, MIN_32Bit + 1),
-MAX_64Bit, array(MAX_64Bit - 1, MAX_64Bit + 1),
-MIN_64Bit, array(MIN_64Bit + 1, MIN_64Bit - 1),
-);
-
-
-$failed = false;
-// test for valid values
-for ($i = 0; $i < count($validNotIdentical); $i +=2) {
- $typeToTestVal = $validNotIdentical[$i];
- $compares = $validNotIdentical[$i + 1];
- foreach($compares as $compareVal) {
- if ($typeToTestVal !== $compareVal) {
- //Do Nothing
- }
- else {
- echo "FAILED: '$typeToTestVal' === '$compareVal'\n";
- $failed = true;
- }
- }
-}
-// test for invalid values
-for ($i = 0; $i < count($invalidNotIdentical); $i +=2) {
- $typeToTestVal = $invalidNotIdentical[$i];
- $compares = $invalidNotIdentical[$i + 1];
- foreach($compares as $compareVal) {
- if ($typeToTestVal !== $compareVal) {
- echo "FAILED: '$typeToTestVal' !== '$compareVal'\n";
- $failed = true;
- }
- }
-}
-
-if ($failed == false) {
- echo "Test Passed\n";
-}
-
-?>
-===DONE===
---EXPECT--
-Test Passed
+--TEST--
+Test !== operator : max int 64bit range
+--SKIPIF--
+<?php
+if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platform only");
+?>
+--FILE--
+<?php
+
+define("MAX_64Bit", 9223372036854775807);
+define("MAX_32Bit", 2147483647);
+define("MIN_64Bit", -9223372036854775807 - 1);
+define("MIN_32Bit", -2147483647 - 1);
+
+$invalidNotIdentical = array (
+MAX_32Bit, array(MAX_32Bit),
+MIN_32Bit, array(MIN_32Bit),
+MAX_64Bit, array(MAX_64Bit),
+MIN_64Bit, array(MIN_64Bit),
+);
+
+$validNotIdentical = array (
+MAX_32Bit, array("2147483647", "2147483647.0000000", 2.147483647e9, 2147483647.0, "2147483648", 2.1474836470001e9, MAX_32Bit - 1, MAX_32Bit + 1),
+MIN_32Bit, array("-2147483648", "-2147483648.000", -2.147483648e9, -2147483648.0, "-2147483649", -2.1474836480001e9, MIN_32Bit -1, MIN_32Bit + 1),
+MAX_64Bit, array(MAX_64Bit - 1, MAX_64Bit + 1),
+MIN_64Bit, array(MIN_64Bit + 1, MIN_64Bit - 1),
+);
+
+
+$failed = false;
+// test for valid values
+for ($i = 0; $i < count($validNotIdentical); $i +=2) {
+ $typeToTestVal = $validNotIdentical[$i];
+ $compares = $validNotIdentical[$i + 1];
+ foreach($compares as $compareVal) {
+ if ($typeToTestVal !== $compareVal) {
+ //Do Nothing
+ }
+ else {
+ echo "FAILED: '$typeToTestVal' === '$compareVal'\n";
+ $failed = true;
+ }
+ }
+}
+// test for invalid values
+for ($i = 0; $i < count($invalidNotIdentical); $i +=2) {
+ $typeToTestVal = $invalidNotIdentical[$i];
+ $compares = $invalidNotIdentical[$i + 1];
+ foreach($compares as $compareVal) {
+ if ($typeToTestVal !== $compareVal) {
+ echo "FAILED: '$typeToTestVal' !== '$compareVal'\n";
+ $failed = true;
+ }
+ }
+}
+
+if ($failed == false) {
+ echo "Test Passed\n";
+}
+
+?>
+===DONE===
+--EXPECT--
+Test Passed
===DONE===
diff --git a/tests/lang/operators/operator_spaceship_basic.phpt b/tests/lang/operators/operator_spaceship_basic.phpt
index 3dbdbb4197..81b0516757 100644
--- a/tests/lang/operators/operator_spaceship_basic.phpt
+++ b/tests/lang/operators/operator_spaceship_basic.phpt
@@ -1,94 +1,94 @@
---TEST--
-Test <=> operator : different types
---FILE--
-<?php
-$valid_true = array(1, "1", "true", 1.0, array(1));
-$valid_false = array(0, "", 0.0, array(), NULL);
-
-$int1 = 679;
-$int2 = -67835;
-$valid_int1 = array("678", "678abc", " 678", "678 ", 678.0, 6.789E2, "+678", +678);
-$valid_int2 = array("-67836", "-67836abc", " -67836", "-67836 ", -67835.0001, -6.78351E4);
-$invalid_int1 = array(679, "679");
-$invalid_int2 = array(-67835, "-67835");
-
-$float1 = 57385.45835;
-$float2 = -67345.76567;
-$valid_float1 = array("57385.45834", "57385.45834aaa", " 57385.45834", 5.738545834e4);
-$valid_float2 = array("-67345.76568", "-67345.76568aaa", " -67345.76568", -6.734576568E4);
-$invalid_float1 = array(57385.45835, 5.738545835e4);
-$invalid_float2 = array(-67345.76567, -6.734576567E4);
-
-
-$toCompare = array(
-// boolean test will result in both sides being converted to boolean so !0 = true and true is not > true for example
-// also note that a string of "0" is converted to false but a string of "0.0" is converted to true
-// false cannot be tested as 0 can never be > 0 or 1
- true, $valid_false, $valid_true,
- $int1, $valid_int1, $invalid_int1,
- $int2, $valid_int2, $invalid_int2,
- $float1, $valid_float1, $invalid_float1,
- $float2, $valid_float2, $invalid_float2
-);
-
-$failed = false;
-for ($i = 0; $i < count($toCompare); $i +=3) {
- $typeToTest = $toCompare[$i];
- $valid_compares = $toCompare[$i + 1];
- $invalid_compares = $toCompare[$i + 2];
-
- foreach($valid_compares as $compareVal) {
- if (($typeToTest <=> $compareVal) === 1) {
- // do nothing
- }
- else {
- echo "FAILED: ('$typeToTest' <=> '$compareVal') !== 1\n";
- $failed = true;
- }
- if (($compareVal <=> $typeToTest) === -1) {
- // do nothing
- }
- else {
- echo "FAILED: ('$compareVal' <=> '$typeToTest') !== -1\n";
- $failed = true;
- }
- if (($compareVal <=> $compareVal) === 0) {
- // do nothing
- }
- else {
- echo "FAILED: ('$compareVal' <=> '$compareVal') !== 0\n";
- $failed = true;
- }
- }
-
- foreach($invalid_compares as $compareVal) {
- if (($typeToTest <=> $compareVal) === 1) {
- echo "FAILED: ('$typeToTest' <=> '$compareVal') === 1\n";
- $failed = true;
- }
- if (($compareVal <=> $typeToTest) === -1) {
- echo "FAILED: ('$compareVal' <=> '$typeToTest') === -1\n";
- $failed = true;
- }
- if (($compareVal <=> $compareVal) !== 0) {
- echo "FAILED: ('$compareVal' <=> '$compareVal') !== 0\n";
- $failed = true;
- }
- }
-
- if (($typeToTest <=> $typeToTest) === 0) {
- // do nothing
- }
- else {
- echo "FAILED: ('$typeToTest' <=> '$typeToTest') !== 0\n";
- $failed = true;
- }
-}
-if ($failed == false) {
- echo "Test Passed\n";
-}
-?>
-===DONE===
---EXPECT--
-Test Passed
+--TEST--
+Test <=> operator : different types
+--FILE--
+<?php
+$valid_true = array(1, "1", "true", 1.0, array(1));
+$valid_false = array(0, "", 0.0, array(), NULL);
+
+$int1 = 679;
+$int2 = -67835;
+$valid_int1 = array("678", "678abc", " 678", "678 ", 678.0, 6.789E2, "+678", +678);
+$valid_int2 = array("-67836", "-67836abc", " -67836", "-67836 ", -67835.0001, -6.78351E4);
+$invalid_int1 = array(679, "679");
+$invalid_int2 = array(-67835, "-67835");
+
+$float1 = 57385.45835;
+$float2 = -67345.76567;
+$valid_float1 = array("57385.45834", "57385.45834aaa", " 57385.45834", 5.738545834e4);
+$valid_float2 = array("-67345.76568", "-67345.76568aaa", " -67345.76568", -6.734576568E4);
+$invalid_float1 = array(57385.45835, 5.738545835e4);
+$invalid_float2 = array(-67345.76567, -6.734576567E4);
+
+
+$toCompare = array(
+// boolean test will result in both sides being converted to boolean so !0 = true and true is not > true for example
+// also note that a string of "0" is converted to false but a string of "0.0" is converted to true
+// false cannot be tested as 0 can never be > 0 or 1
+ true, $valid_false, $valid_true,
+ $int1, $valid_int1, $invalid_int1,
+ $int2, $valid_int2, $invalid_int2,
+ $float1, $valid_float1, $invalid_float1,
+ $float2, $valid_float2, $invalid_float2
+);
+
+$failed = false;
+for ($i = 0; $i < count($toCompare); $i +=3) {
+ $typeToTest = $toCompare[$i];
+ $valid_compares = $toCompare[$i + 1];
+ $invalid_compares = $toCompare[$i + 2];
+
+ foreach($valid_compares as $compareVal) {
+ if (($typeToTest <=> $compareVal) === 1) {
+ // do nothing
+ }
+ else {
+ echo "FAILED: ('$typeToTest' <=> '$compareVal') !== 1\n";
+ $failed = true;
+ }
+ if (($compareVal <=> $typeToTest) === -1) {
+ // do nothing
+ }
+ else {
+ echo "FAILED: ('$compareVal' <=> '$typeToTest') !== -1\n";
+ $failed = true;
+ }
+ if (($compareVal <=> $compareVal) === 0) {
+ // do nothing
+ }
+ else {
+ echo "FAILED: ('$compareVal' <=> '$compareVal') !== 0\n";
+ $failed = true;
+ }
+ }
+
+ foreach($invalid_compares as $compareVal) {
+ if (($typeToTest <=> $compareVal) === 1) {
+ echo "FAILED: ('$typeToTest' <=> '$compareVal') === 1\n";
+ $failed = true;
+ }
+ if (($compareVal <=> $typeToTest) === -1) {
+ echo "FAILED: ('$compareVal' <=> '$typeToTest') === -1\n";
+ $failed = true;
+ }
+ if (($compareVal <=> $compareVal) !== 0) {
+ echo "FAILED: ('$compareVal' <=> '$compareVal') !== 0\n";
+ $failed = true;
+ }
+ }
+
+ if (($typeToTest <=> $typeToTest) === 0) {
+ // do nothing
+ }
+ else {
+ echo "FAILED: ('$typeToTest' <=> '$typeToTest') !== 0\n";
+ $failed = true;
+ }
+}
+if ($failed == false) {
+ echo "Test Passed\n";
+}
+?>
+===DONE===
+--EXPECT--
+Test Passed
===DONE===
diff --git a/tests/lang/operators/postdec_basiclong_64bit.phpt b/tests/lang/operators/postdec_basiclong_64bit.phpt
index 9875df85ae..f3e825ca3d 100644
--- a/tests/lang/operators/postdec_basiclong_64bit.phpt
+++ b/tests/lang/operators/postdec_basiclong_64bit.phpt
@@ -1,61 +1,61 @@
---TEST--
-Test N-- operator : 64bit long tests
---SKIPIF--
-<?php
-if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platform only");
-?>
---FILE--
-<?php
-
-define("MAX_64Bit", 9223372036854775807);
-define("MAX_32Bit", 2147483647);
-define("MIN_64Bit", -9223372036854775807 - 1);
-define("MIN_32Bit", -2147483647 - 1);
-
-$longVals = array(
- MAX_64Bit, MIN_64Bit, MAX_32Bit, MIN_32Bit, MAX_64Bit - MAX_32Bit, MIN_64Bit - MIN_32Bit,
- MAX_32Bit + 1, MIN_32Bit - 1, MAX_32Bit * 2, (MAX_32Bit * 2) + 1, (MAX_32Bit * 2) - 1,
- MAX_64Bit -1, MAX_64Bit + 1, MIN_64Bit + 1, MIN_64Bit - 1
-);
-
-
-foreach ($longVals as $longVal) {
- echo "--- testing: $longVal ---\n";
- $longVal--;
- var_dump($longVal);
-}
-
-?>
-===DONE===
---EXPECT--
---- testing: 9223372036854775807 ---
-int(9223372036854775806)
---- testing: -9223372036854775808 ---
-float(-9.2233720368548E+18)
---- testing: 2147483647 ---
-int(2147483646)
---- testing: -2147483648 ---
-int(-2147483649)
---- testing: 9223372034707292160 ---
-int(9223372034707292159)
---- testing: -9223372034707292160 ---
-int(-9223372034707292161)
---- testing: 2147483648 ---
-int(2147483647)
---- testing: -2147483649 ---
-int(-2147483650)
---- testing: 4294967294 ---
-int(4294967293)
---- testing: 4294967295 ---
-int(4294967294)
---- testing: 4294967293 ---
-int(4294967292)
---- testing: 9223372036854775806 ---
-int(9223372036854775805)
---- testing: 9.2233720368548E+18 ---
-float(9.2233720368548E+18)
---- testing: -9223372036854775807 ---
-int(-9223372036854775808)
---- testing: -9.2233720368548E+18 ---
-float(-9.2233720368548E+18)
-===DONE===
+--TEST--
+Test N-- operator : 64bit long tests
+--SKIPIF--
+<?php
+if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platform only");
+?>
+--FILE--
+<?php
+
+define("MAX_64Bit", 9223372036854775807);
+define("MAX_32Bit", 2147483647);
+define("MIN_64Bit", -9223372036854775807 - 1);
+define("MIN_32Bit", -2147483647 - 1);
+
+$longVals = array(
+ MAX_64Bit, MIN_64Bit, MAX_32Bit, MIN_32Bit, MAX_64Bit - MAX_32Bit, MIN_64Bit - MIN_32Bit,
+ MAX_32Bit + 1, MIN_32Bit - 1, MAX_32Bit * 2, (MAX_32Bit * 2) + 1, (MAX_32Bit * 2) - 1,
+ MAX_64Bit -1, MAX_64Bit + 1, MIN_64Bit + 1, MIN_64Bit - 1
+);
+
+
+foreach ($longVals as $longVal) {
+ echo "--- testing: $longVal ---\n";
+ $longVal--;
+ var_dump($longVal);
+}
+
+?>
+===DONE===
+--EXPECT--
+--- testing: 9223372036854775807 ---
+int(9223372036854775806)
+--- testing: -9223372036854775808 ---
+float(-9.2233720368548E+18)
+--- testing: 2147483647 ---
+int(2147483646)
+--- testing: -2147483648 ---
+int(-2147483649)
+--- testing: 9223372034707292160 ---
+int(9223372034707292159)
+--- testing: -9223372034707292160 ---
+int(-9223372034707292161)
+--- testing: 2147483648 ---
+int(2147483647)
+--- testing: -2147483649 ---
+int(-2147483650)
+--- testing: 4294967294 ---
+int(4294967293)
+--- testing: 4294967295 ---
+int(4294967294)
+--- testing: 4294967293 ---
+int(4294967292)
+--- testing: 9223372036854775806 ---
+int(9223372036854775805)
+--- testing: 9.2233720368548E+18 ---
+float(9.2233720368548E+18)
+--- testing: -9223372036854775807 ---
+int(-9223372036854775808)
+--- testing: -9.2233720368548E+18 ---
+float(-9.2233720368548E+18)
+===DONE===
diff --git a/tests/lang/operators/postdec_variationStr.phpt b/tests/lang/operators/postdec_variationStr.phpt
index ee5a8cd4b7..0db326d27e 100644
--- a/tests/lang/operators/postdec_variationStr.phpt
+++ b/tests/lang/operators/postdec_variationStr.phpt
@@ -1,49 +1,49 @@
---TEST--
-Test N-- operator : various numbers as strings
---FILE--
-<?php
-
-$strVals = array(
- "0","65","-44", "1.2", "-7.7", "abc", "123abc", "123e5", "123e5xyz", " 123abc", "123 abc", "123abc ", "3.4a",
- "a5.9"
-);
-
-
-foreach ($strVals as $strVal) {
- echo "--- testing: '$strVal' ---\n";
- $strVal--;
- var_dump($strVal);
-}
-
-?>
-===DONE===
---EXPECT--
---- testing: '0' ---
-int(-1)
---- testing: '65' ---
-int(64)
---- testing: '-44' ---
-int(-45)
---- testing: '1.2' ---
-float(0.2)
---- testing: '-7.7' ---
-float(-8.7)
---- testing: 'abc' ---
-string(3) "abc"
---- testing: '123abc' ---
-string(6) "123abc"
---- testing: '123e5' ---
-float(12299999)
---- testing: '123e5xyz' ---
-string(8) "123e5xyz"
---- testing: ' 123abc' ---
-string(7) " 123abc"
---- testing: '123 abc' ---
-string(7) "123 abc"
---- testing: '123abc ' ---
-string(7) "123abc "
---- testing: '3.4a' ---
-string(4) "3.4a"
---- testing: 'a5.9' ---
-string(4) "a5.9"
-===DONE===
+--TEST--
+Test N-- operator : various numbers as strings
+--FILE--
+<?php
+
+$strVals = array(
+ "0","65","-44", "1.2", "-7.7", "abc", "123abc", "123e5", "123e5xyz", " 123abc", "123 abc", "123abc ", "3.4a",
+ "a5.9"
+);
+
+
+foreach ($strVals as $strVal) {
+ echo "--- testing: '$strVal' ---\n";
+ $strVal--;
+ var_dump($strVal);
+}
+
+?>
+===DONE===
+--EXPECT--
+--- testing: '0' ---
+int(-1)
+--- testing: '65' ---
+int(64)
+--- testing: '-44' ---
+int(-45)
+--- testing: '1.2' ---
+float(0.2)
+--- testing: '-7.7' ---
+float(-8.7)
+--- testing: 'abc' ---
+string(3) "abc"
+--- testing: '123abc' ---
+string(6) "123abc"
+--- testing: '123e5' ---
+float(12299999)
+--- testing: '123e5xyz' ---
+string(8) "123e5xyz"
+--- testing: ' 123abc' ---
+string(7) " 123abc"
+--- testing: '123 abc' ---
+string(7) "123 abc"
+--- testing: '123abc ' ---
+string(7) "123abc "
+--- testing: '3.4a' ---
+string(4) "3.4a"
+--- testing: 'a5.9' ---
+string(4) "a5.9"
+===DONE===
diff --git a/tests/lang/operators/postinc_basiclong_64bit.phpt b/tests/lang/operators/postinc_basiclong_64bit.phpt
index 494259acd8..18e8bddedd 100644
--- a/tests/lang/operators/postinc_basiclong_64bit.phpt
+++ b/tests/lang/operators/postinc_basiclong_64bit.phpt
@@ -1,61 +1,61 @@
---TEST--
-Test N++ operator : 64bit long tests
---SKIPIF--
-<?php
-if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platform only");
-?>
---FILE--
-<?php
-
-define("MAX_64Bit", 9223372036854775807);
-define("MAX_32Bit", 2147483647);
-define("MIN_64Bit", -9223372036854775807 - 1);
-define("MIN_32Bit", -2147483647 - 1);
-
-$longVals = array(
- MAX_64Bit, MIN_64Bit, MAX_32Bit, MIN_32Bit, MAX_64Bit - MAX_32Bit, MIN_64Bit - MIN_32Bit,
- MAX_32Bit + 1, MIN_32Bit - 1, MAX_32Bit * 2, (MAX_32Bit * 2) + 1, (MAX_32Bit * 2) - 1,
- MAX_64Bit -1, MAX_64Bit + 1, MIN_64Bit + 1, MIN_64Bit - 1
-);
-
-
-foreach ($longVals as $longVal) {
- echo "--- testing: $longVal ---\n";
- $longVal++;
- var_dump($longVal);
-}
-
-?>
-===DONE===
---EXPECT--
---- testing: 9223372036854775807 ---
-float(9.2233720368548E+18)
---- testing: -9223372036854775808 ---
-int(-9223372036854775807)
---- testing: 2147483647 ---
-int(2147483648)
---- testing: -2147483648 ---
-int(-2147483647)
---- testing: 9223372034707292160 ---
-int(9223372034707292161)
---- testing: -9223372034707292160 ---
-int(-9223372034707292159)
---- testing: 2147483648 ---
-int(2147483649)
---- testing: -2147483649 ---
-int(-2147483648)
---- testing: 4294967294 ---
-int(4294967295)
---- testing: 4294967295 ---
-int(4294967296)
---- testing: 4294967293 ---
-int(4294967294)
---- testing: 9223372036854775806 ---
-int(9223372036854775807)
---- testing: 9.2233720368548E+18 ---
-float(9.2233720368548E+18)
---- testing: -9223372036854775807 ---
-int(-9223372036854775806)
---- testing: -9.2233720368548E+18 ---
-float(-9.2233720368548E+18)
-===DONE===
+--TEST--
+Test N++ operator : 64bit long tests
+--SKIPIF--
+<?php
+if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platform only");
+?>
+--FILE--
+<?php
+
+define("MAX_64Bit", 9223372036854775807);
+define("MAX_32Bit", 2147483647);
+define("MIN_64Bit", -9223372036854775807 - 1);
+define("MIN_32Bit", -2147483647 - 1);
+
+$longVals = array(
+ MAX_64Bit, MIN_64Bit, MAX_32Bit, MIN_32Bit, MAX_64Bit - MAX_32Bit, MIN_64Bit - MIN_32Bit,
+ MAX_32Bit + 1, MIN_32Bit - 1, MAX_32Bit * 2, (MAX_32Bit * 2) + 1, (MAX_32Bit * 2) - 1,
+ MAX_64Bit -1, MAX_64Bit + 1, MIN_64Bit + 1, MIN_64Bit - 1
+);
+
+
+foreach ($longVals as $longVal) {
+ echo "--- testing: $longVal ---\n";
+ $longVal++;
+ var_dump($longVal);
+}
+
+?>
+===DONE===
+--EXPECT--
+--- testing: 9223372036854775807 ---
+float(9.2233720368548E+18)
+--- testing: -9223372036854775808 ---
+int(-9223372036854775807)
+--- testing: 2147483647 ---
+int(2147483648)
+--- testing: -2147483648 ---
+int(-2147483647)
+--- testing: 9223372034707292160 ---
+int(9223372034707292161)
+--- testing: -9223372034707292160 ---
+int(-9223372034707292159)
+--- testing: 2147483648 ---
+int(2147483649)
+--- testing: -2147483649 ---
+int(-2147483648)
+--- testing: 4294967294 ---
+int(4294967295)
+--- testing: 4294967295 ---
+int(4294967296)
+--- testing: 4294967293 ---
+int(4294967294)
+--- testing: 9223372036854775806 ---
+int(9223372036854775807)
+--- testing: 9.2233720368548E+18 ---
+float(9.2233720368548E+18)
+--- testing: -9223372036854775807 ---
+int(-9223372036854775806)
+--- testing: -9.2233720368548E+18 ---
+float(-9.2233720368548E+18)
+===DONE===
diff --git a/tests/lang/operators/postinc_variationStr.phpt b/tests/lang/operators/postinc_variationStr.phpt
index 6fbe804319..35e19888e1 100644
--- a/tests/lang/operators/postinc_variationStr.phpt
+++ b/tests/lang/operators/postinc_variationStr.phpt
@@ -1,49 +1,49 @@
---TEST--
-Test N++ operator : various numbers as strings
---FILE--
-<?php
-
-$strVals = array(
- "0","65","-44", "1.2", "-7.7", "abc", "123abc", "123e5", "123e5xyz", " 123abc", "123 abc", "123abc ", "3.4a",
- "a5.9"
-);
-
-
-foreach ($strVals as $strVal) {
- echo "--- testing: '$strVal' ---\n";
- $strVal++;
- var_dump($strVal);
-}
-
-?>
-===DONE===
---EXPECT--
---- testing: '0' ---
-int(1)
---- testing: '65' ---
-int(66)
---- testing: '-44' ---
-int(-43)
---- testing: '1.2' ---
-float(2.2)
---- testing: '-7.7' ---
-float(-6.7)
---- testing: 'abc' ---
-string(3) "abd"
---- testing: '123abc' ---
-string(6) "123abd"
---- testing: '123e5' ---
-float(12300001)
---- testing: '123e5xyz' ---
-string(8) "123e5xza"
---- testing: ' 123abc' ---
-string(7) " 123abd"
---- testing: '123 abc' ---
-string(7) "123 abd"
---- testing: '123abc ' ---
-string(7) "123abc "
---- testing: '3.4a' ---
-string(4) "3.4b"
---- testing: 'a5.9' ---
-string(4) "a5.0"
-===DONE===
+--TEST--
+Test N++ operator : various numbers as strings
+--FILE--
+<?php
+
+$strVals = array(
+ "0","65","-44", "1.2", "-7.7", "abc", "123abc", "123e5", "123e5xyz", " 123abc", "123 abc", "123abc ", "3.4a",
+ "a5.9"
+);
+
+
+foreach ($strVals as $strVal) {
+ echo "--- testing: '$strVal' ---\n";
+ $strVal++;
+ var_dump($strVal);
+}
+
+?>
+===DONE===
+--EXPECT--
+--- testing: '0' ---
+int(1)
+--- testing: '65' ---
+int(66)
+--- testing: '-44' ---
+int(-43)
+--- testing: '1.2' ---
+float(2.2)
+--- testing: '-7.7' ---
+float(-6.7)
+--- testing: 'abc' ---
+string(3) "abd"
+--- testing: '123abc' ---
+string(6) "123abd"
+--- testing: '123e5' ---
+float(12300001)
+--- testing: '123e5xyz' ---
+string(8) "123e5xza"
+--- testing: ' 123abc' ---
+string(7) " 123abd"
+--- testing: '123 abc' ---
+string(7) "123 abd"
+--- testing: '123abc ' ---
+string(7) "123abc "
+--- testing: '3.4a' ---
+string(4) "3.4b"
+--- testing: 'a5.9' ---
+string(4) "a5.0"
+===DONE===
diff --git a/tests/lang/operators/predec_basiclong_64bit.phpt b/tests/lang/operators/predec_basiclong_64bit.phpt
index c1b15fdf34..b2b11709b3 100644
--- a/tests/lang/operators/predec_basiclong_64bit.phpt
+++ b/tests/lang/operators/predec_basiclong_64bit.phpt
@@ -1,32 +1,32 @@
---TEST--
-Test --N operator : 64bit long tests
---SKIPIF--
-<?php
-if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platform only");
-?>
---FILE--
-<?php
-
-define("MAX_64Bit", 9223372036854775807);
-define("MAX_32Bit", 2147483647);
-define("MIN_64Bit", -9223372036854775807 - 1);
-define("MIN_32Bit", -2147483647 - 1);
-
-$longVals = array(
- MAX_64Bit, MIN_64Bit, MAX_32Bit, MIN_32Bit, MAX_64Bit - MAX_32Bit, MIN_64Bit - MIN_32Bit,
- MAX_32Bit + 1, MIN_32Bit - 1, MAX_32Bit * 2, (MAX_32Bit * 2) + 1, (MAX_32Bit * 2) - 1,
- MAX_64Bit -1, MAX_64Bit + 1, MIN_64Bit + 1, MIN_64Bit - 1
-);
-
-
-foreach ($longVals as $longVal) {
- echo "--- testing: $longVal ---\n";
- var_dump(--$longVal);
-}
-
-?>
-===DONE===
---EXPECT--
+--TEST--
+Test --N operator : 64bit long tests
+--SKIPIF--
+<?php
+if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platform only");
+?>
+--FILE--
+<?php
+
+define("MAX_64Bit", 9223372036854775807);
+define("MAX_32Bit", 2147483647);
+define("MIN_64Bit", -9223372036854775807 - 1);
+define("MIN_32Bit", -2147483647 - 1);
+
+$longVals = array(
+ MAX_64Bit, MIN_64Bit, MAX_32Bit, MIN_32Bit, MAX_64Bit - MAX_32Bit, MIN_64Bit - MIN_32Bit,
+ MAX_32Bit + 1, MIN_32Bit - 1, MAX_32Bit * 2, (MAX_32Bit * 2) + 1, (MAX_32Bit * 2) - 1,
+ MAX_64Bit -1, MAX_64Bit + 1, MIN_64Bit + 1, MIN_64Bit - 1
+);
+
+
+foreach ($longVals as $longVal) {
+ echo "--- testing: $longVal ---\n";
+ var_dump(--$longVal);
+}
+
+?>
+===DONE===
+--EXPECT--
--- testing: 9223372036854775807 ---
int(9223372036854775806)
--- testing: -9223372036854775808 ---
@@ -56,5 +56,5 @@ float(9.2233720368548E+18)
--- testing: -9223372036854775807 ---
int(-9223372036854775808)
--- testing: -9.2233720368548E+18 ---
-float(-9.2233720368548E+18)
-===DONE===
+float(-9.2233720368548E+18)
+===DONE===
diff --git a/tests/lang/operators/predec_variationStr.phpt b/tests/lang/operators/predec_variationStr.phpt
index c7fb5744a0..1d1fade74d 100644
--- a/tests/lang/operators/predec_variationStr.phpt
+++ b/tests/lang/operators/predec_variationStr.phpt
@@ -1,22 +1,22 @@
---TEST--
-Test --N operator : various numbers as strings
---FILE--
-<?php
-
-$strVals = array(
- "0","65","-44", "1.2", "-7.7", "abc", "123abc", "123e5", "123e5xyz", " 123abc", "123 abc", "123abc ", "3.4a",
- "a5.9"
-);
-
-
-foreach ($strVals as $strVal) {
- echo "--- testing: '$strVal' ---\n";
- var_dump(--$strVal);
-}
-
-?>
-===DONE===
---EXPECT--
+--TEST--
+Test --N operator : various numbers as strings
+--FILE--
+<?php
+
+$strVals = array(
+ "0","65","-44", "1.2", "-7.7", "abc", "123abc", "123e5", "123e5xyz", " 123abc", "123 abc", "123abc ", "3.4a",
+ "a5.9"
+);
+
+
+foreach ($strVals as $strVal) {
+ echo "--- testing: '$strVal' ---\n";
+ var_dump(--$strVal);
+}
+
+?>
+===DONE===
+--EXPECT--
--- testing: '0' ---
int(-1)
--- testing: '65' ---
@@ -44,5 +44,5 @@ string(7) "123abc "
--- testing: '3.4a' ---
string(4) "3.4a"
--- testing: 'a5.9' ---
-string(4) "a5.9"
-===DONE===
+string(4) "a5.9"
+===DONE===
diff --git a/tests/lang/operators/preinc_basiclong_64bit.phpt b/tests/lang/operators/preinc_basiclong_64bit.phpt
index 599aa4e001..e24cc283aa 100644
--- a/tests/lang/operators/preinc_basiclong_64bit.phpt
+++ b/tests/lang/operators/preinc_basiclong_64bit.phpt
@@ -1,32 +1,32 @@
---TEST--
-Test ++N operator : 64bit long tests
---SKIPIF--
-<?php
-if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platform only");
-?>
---FILE--
-<?php
-
-define("MAX_64Bit", 9223372036854775807);
-define("MAX_32Bit", 2147483647);
-define("MIN_64Bit", -9223372036854775807 - 1);
-define("MIN_32Bit", -2147483647 - 1);
-
-$longVals = array(
- MAX_64Bit, MIN_64Bit, MAX_32Bit, MIN_32Bit, MAX_64Bit - MAX_32Bit, MIN_64Bit - MIN_32Bit,
- MAX_32Bit + 1, MIN_32Bit - 1, MAX_32Bit * 2, (MAX_32Bit * 2) + 1, (MAX_32Bit * 2) - 1,
- MAX_64Bit -1, MAX_64Bit + 1, MIN_64Bit + 1, MIN_64Bit - 1
-);
-
-
-foreach ($longVals as $longVal) {
- echo "--- testing: $longVal ---\n";
- var_dump(++$longVal);
-}
-
-?>
-===DONE===
---EXPECT--
+--TEST--
+Test ++N operator : 64bit long tests
+--SKIPIF--
+<?php
+if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platform only");
+?>
+--FILE--
+<?php
+
+define("MAX_64Bit", 9223372036854775807);
+define("MAX_32Bit", 2147483647);
+define("MIN_64Bit", -9223372036854775807 - 1);
+define("MIN_32Bit", -2147483647 - 1);
+
+$longVals = array(
+ MAX_64Bit, MIN_64Bit, MAX_32Bit, MIN_32Bit, MAX_64Bit - MAX_32Bit, MIN_64Bit - MIN_32Bit,
+ MAX_32Bit + 1, MIN_32Bit - 1, MAX_32Bit * 2, (MAX_32Bit * 2) + 1, (MAX_32Bit * 2) - 1,
+ MAX_64Bit -1, MAX_64Bit + 1, MIN_64Bit + 1, MIN_64Bit - 1
+);
+
+
+foreach ($longVals as $longVal) {
+ echo "--- testing: $longVal ---\n";
+ var_dump(++$longVal);
+}
+
+?>
+===DONE===
+--EXPECT--
--- testing: 9223372036854775807 ---
float(9.2233720368548E+18)
--- testing: -9223372036854775808 ---
@@ -56,5 +56,5 @@ float(9.2233720368548E+18)
--- testing: -9223372036854775807 ---
int(-9223372036854775806)
--- testing: -9.2233720368548E+18 ---
-float(-9.2233720368548E+18)
-===DONE===
+float(-9.2233720368548E+18)
+===DONE===
diff --git a/tests/lang/operators/subtract_basiclong_64bit.phpt b/tests/lang/operators/subtract_basiclong_64bit.phpt
index f52b951442..ca80e3f52d 100644
--- a/tests/lang/operators/subtract_basiclong_64bit.phpt
+++ b/tests/lang/operators/subtract_basiclong_64bit.phpt
@@ -1,44 +1,44 @@
---TEST--
-Test - operator : 64bit long tests
---SKIPIF--
-<?php
-if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platform only");
-?>
---FILE--
-<?php
-
-define("MAX_64Bit", 9223372036854775807);
-define("MAX_32Bit", 2147483647);
-define("MIN_64Bit", -9223372036854775807 - 1);
-define("MIN_32Bit", -2147483647 - 1);
-
-$longVals = array(
- MAX_64Bit, MIN_64Bit, MAX_32Bit, MIN_32Bit, MAX_64Bit - MAX_32Bit, MIN_64Bit - MIN_32Bit,
- MAX_32Bit + 1, MIN_32Bit - 1, MAX_32Bit * 2, (MAX_32Bit * 2) + 1, (MAX_32Bit * 2) - 1,
- MAX_64Bit -1, MAX_64Bit + 1, MIN_64Bit + 1, MIN_64Bit - 1
-);
-
-$otherVals = array(0, 1, -1, 7, 9, 65, -44, MAX_32Bit, MAX_64Bit);
-
-error_reporting(E_ERROR);
-
-foreach ($longVals as $longVal) {
- foreach($otherVals as $otherVal) {
- echo "--- testing: $longVal - $otherVal ---\n";
- var_dump($longVal-$otherVal);
- }
-}
-
-foreach ($otherVals as $otherVal) {
- foreach($longVals as $longVal) {
- echo "--- testing: $otherVal - $longVal ---\n";
- var_dump($otherVal-$longVal);
- }
-}
-
-?>
-===DONE===
---EXPECT--
+--TEST--
+Test - operator : 64bit long tests
+--SKIPIF--
+<?php
+if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platform only");
+?>
+--FILE--
+<?php
+
+define("MAX_64Bit", 9223372036854775807);
+define("MAX_32Bit", 2147483647);
+define("MIN_64Bit", -9223372036854775807 - 1);
+define("MIN_32Bit", -2147483647 - 1);
+
+$longVals = array(
+ MAX_64Bit, MIN_64Bit, MAX_32Bit, MIN_32Bit, MAX_64Bit - MAX_32Bit, MIN_64Bit - MIN_32Bit,
+ MAX_32Bit + 1, MIN_32Bit - 1, MAX_32Bit * 2, (MAX_32Bit * 2) + 1, (MAX_32Bit * 2) - 1,
+ MAX_64Bit -1, MAX_64Bit + 1, MIN_64Bit + 1, MIN_64Bit - 1
+);
+
+$otherVals = array(0, 1, -1, 7, 9, 65, -44, MAX_32Bit, MAX_64Bit);
+
+error_reporting(E_ERROR);
+
+foreach ($longVals as $longVal) {
+ foreach($otherVals as $otherVal) {
+ echo "--- testing: $longVal - $otherVal ---\n";
+ var_dump($longVal-$otherVal);
+ }
+}
+
+foreach ($otherVals as $otherVal) {
+ foreach($longVals as $longVal) {
+ echo "--- testing: $otherVal - $longVal ---\n";
+ var_dump($otherVal-$longVal);
+ }
+}
+
+?>
+===DONE===
+--EXPECT--
--- testing: 9223372036854775807 - 0 ---
int(9223372036854775807)
--- testing: 9223372036854775807 - 1 ---
@@ -578,5 +578,5 @@ float(0)
--- testing: 9223372036854775807 - -9223372036854775807 ---
float(1.844674407371E+19)
--- testing: 9223372036854775807 - -9.2233720368548E+18 ---
-float(1.844674407371E+19)
-===DONE===
+float(1.844674407371E+19)
+===DONE===
diff --git a/tests/lang/operators/subtract_variationStr.phpt b/tests/lang/operators/subtract_variationStr.phpt
index 5b5bae2e35..51b5ed4dca 100644
--- a/tests/lang/operators/subtract_variationStr.phpt
+++ b/tests/lang/operators/subtract_variationStr.phpt
@@ -1,26 +1,26 @@
---TEST--
-Test - operator : various numbers as strings
---FILE--
-<?php
-
-$strVals = array(
- "0","65","-44", "1.2", "-7.7", "abc", "123abc", "123e5", "123e5xyz", " 123abc", "123 abc", "123abc ", "3.4a",
- "a5.9"
-);
-
-error_reporting(E_ERROR);
-
-foreach ($strVals as $strVal) {
- foreach($strVals as $otherVal) {
- echo "--- testing: '$strVal' - '$otherVal' ---\n";
- var_dump($strVal-$otherVal);
- }
-}
-
-
-?>
-===DONE===
---EXPECT--
+--TEST--
+Test - operator : various numbers as strings
+--FILE--
+<?php
+
+$strVals = array(
+ "0","65","-44", "1.2", "-7.7", "abc", "123abc", "123e5", "123e5xyz", " 123abc", "123 abc", "123abc ", "3.4a",
+ "a5.9"
+);
+
+error_reporting(E_ERROR);
+
+foreach ($strVals as $strVal) {
+ foreach($strVals as $otherVal) {
+ echo "--- testing: '$strVal' - '$otherVal' ---\n";
+ var_dump($strVal-$otherVal);
+ }
+}
+
+
+?>
+===DONE===
+--EXPECT--
--- testing: '0' - '0' ---
int(0)
--- testing: '0' - '65' ---
@@ -412,5 +412,5 @@ int(-123)
--- testing: 'a5.9' - '3.4a' ---
float(-3.4)
--- testing: 'a5.9' - 'a5.9' ---
-int(0)
-===DONE===
+int(0)
+===DONE===
diff --git a/tests/lang/returnByReference.001.phpt b/tests/lang/returnByReference.001.phpt
index 51e63b8694..1feccd4a97 100644
--- a/tests/lang/returnByReference.001.phpt
+++ b/tests/lang/returnByReference.001.phpt
@@ -1,20 +1,20 @@
---TEST--
-Returning a reference from a function
---FILE--
-<?php
-
-function &returnByRef(&$arg1)
-{
- return $arg1;
-}
-
-$a = 7;
-$b =& returnByRef($a);
-var_dump($b);
-$a++;
-var_dump($b);
-
-?>
---EXPECT--
-int(7)
+--TEST--
+Returning a reference from a function
+--FILE--
+<?php
+
+function &returnByRef(&$arg1)
+{
+ return $arg1;
+}
+
+$a = 7;
+$b =& returnByRef($a);
+var_dump($b);
+$a++;
+var_dump($b);
+
+?>
+--EXPECT--
+int(7)
int(8)
diff --git a/tests/lang/returnByReference.002.phpt b/tests/lang/returnByReference.002.phpt
index 1c635b5298..99365f1b14 100644
--- a/tests/lang/returnByReference.002.phpt
+++ b/tests/lang/returnByReference.002.phpt
@@ -1,29 +1,29 @@
---TEST--
-Returning a reference from a function.
---FILE--
-<?php
-function &returnRef() {
- global $a;
- return $a;
-}
-
-function returnVal() {
- global $a;
- return $a;
-}
-
-$a = "original";
-$b =& returnVal();
-$b = "changed";
-var_dump($a); //expecting warning + "original"
-
-$a = "original";
-$b =& returnRef();
-$b = "changed";
-var_dump($a); //expecting "changed"
-?>
---EXPECTF--
-
-Notice: Only variables should be assigned by reference in %s on line 13
-string(8) "original"
-string(7) "changed"
+--TEST--
+Returning a reference from a function.
+--FILE--
+<?php
+function &returnRef() {
+ global $a;
+ return $a;
+}
+
+function returnVal() {
+ global $a;
+ return $a;
+}
+
+$a = "original";
+$b =& returnVal();
+$b = "changed";
+var_dump($a); //expecting warning + "original"
+
+$a = "original";
+$b =& returnRef();
+$b = "changed";
+var_dump($a); //expecting "changed"
+?>
+--EXPECTF--
+
+Notice: Only variables should be assigned by reference in %s on line 13
+string(8) "original"
+string(7) "changed"
diff --git a/tests/lang/returnByReference.003.phpt b/tests/lang/returnByReference.003.phpt
index 3f03037bf5..b14ae69549 100644
--- a/tests/lang/returnByReference.003.phpt
+++ b/tests/lang/returnByReference.003.phpt
@@ -1,55 +1,55 @@
---TEST--
-Returning a reference from a function
---FILE--
-<?php
-function returnConstantByValue() {
- return 100;
-}
-
-function &returnConstantByRef() {
- return 100;
-}
-
-function &returnVariableByRef() {
- return $GLOBALS['a'];
-}
-
-echo "\n---> 1. Trying to assign by reference the return value of a function that returns by value:\n";
-unset($a, $b);
-$a = 4;
-$b = &returnConstantByValue();
-$a++;
-var_dump($a, $b);
-
-echo "\n---> 2. Trying to assign by reference the return value of a function that returns a constant by ref:\n";
-unset($a, $b);
-$a = 4;
-$b = &returnConstantByRef();
-$a++;
-var_dump($a, $b);
-
-echo "\n---> 3. Trying to assign by reference the return value of a function that returns by ref:\n";
-unset($a, $b);
-$a = 4;
-$b = &returnVariableByRef();
-$a++;
-var_dump($a, $b);
-
-?>
---EXPECTF--
-
----> 1. Trying to assign by reference the return value of a function that returns by value:
-
-Notice: Only variables should be assigned by reference in %s on line 17
-int(5)
-int(100)
-
----> 2. Trying to assign by reference the return value of a function that returns a constant by ref:
-
-Notice: Only variable references should be returned by reference in %s on line 7
-int(5)
-int(100)
-
----> 3. Trying to assign by reference the return value of a function that returns by ref:
-int(5)
-int(5)
+--TEST--
+Returning a reference from a function
+--FILE--
+<?php
+function returnConstantByValue() {
+ return 100;
+}
+
+function &returnConstantByRef() {
+ return 100;
+}
+
+function &returnVariableByRef() {
+ return $GLOBALS['a'];
+}
+
+echo "\n---> 1. Trying to assign by reference the return value of a function that returns by value:\n";
+unset($a, $b);
+$a = 4;
+$b = &returnConstantByValue();
+$a++;
+var_dump($a, $b);
+
+echo "\n---> 2. Trying to assign by reference the return value of a function that returns a constant by ref:\n";
+unset($a, $b);
+$a = 4;
+$b = &returnConstantByRef();
+$a++;
+var_dump($a, $b);
+
+echo "\n---> 3. Trying to assign by reference the return value of a function that returns by ref:\n";
+unset($a, $b);
+$a = 4;
+$b = &returnVariableByRef();
+$a++;
+var_dump($a, $b);
+
+?>
+--EXPECTF--
+
+---> 1. Trying to assign by reference the return value of a function that returns by value:
+
+Notice: Only variables should be assigned by reference in %s on line 17
+int(5)
+int(100)
+
+---> 2. Trying to assign by reference the return value of a function that returns a constant by ref:
+
+Notice: Only variable references should be returned by reference in %s on line 7
+int(5)
+int(100)
+
+---> 3. Trying to assign by reference the return value of a function that returns by ref:
+int(5)
+int(5)
diff --git a/tests/lang/returnByReference.004.phpt b/tests/lang/returnByReference.004.phpt
index f7d1165a22..b37506ce0a 100644
--- a/tests/lang/returnByReference.004.phpt
+++ b/tests/lang/returnByReference.004.phpt
@@ -1,57 +1,57 @@
---TEST--
-Returning a reference from a static method
---FILE--
-<?php
-Class C {
- static function returnConstantByValue() {
- return 100;
- }
-
- static function &returnConstantByRef() {
- return 100;
- }
-
- static function &returnVariableByRef() {
- return $GLOBALS['a'];
- }
-}
-
-echo "\n---> 1. Trying to assign by reference the return value of a function that returns by value:\n";
-unset($a, $b);
-$a = 4;
-$b = &C::returnConstantByValue();
-$a++;
-var_dump($a, $b);
-
-echo "\n---> 2. Trying to assign by reference the return value of a function that returns a constant by ref:\n";
-unset($a, $b);
-$a = 4;
-$b = &C::returnConstantByRef();
-$a++;
-var_dump($a, $b);
-
-echo "\n---> 3. Trying to assign by reference the return value of a function that returns by ref:\n";
-unset($a, $b);
-$a = 4;
-$b = &C::returnVariableByRef();
-$a++;
-var_dump($a, $b);
-
-?>
---EXPECTF--
-
----> 1. Trying to assign by reference the return value of a function that returns by value:
-
-Notice: Only variables should be assigned by reference in %s on line 19
-int(5)
-int(100)
-
----> 2. Trying to assign by reference the return value of a function that returns a constant by ref:
-
-Notice: Only variable references should be returned by reference in %s on line 8
-int(5)
-int(100)
-
----> 3. Trying to assign by reference the return value of a function that returns by ref:
-int(5)
-int(5)
+--TEST--
+Returning a reference from a static method
+--FILE--
+<?php
+Class C {
+ static function returnConstantByValue() {
+ return 100;
+ }
+
+ static function &returnConstantByRef() {
+ return 100;
+ }
+
+ static function &returnVariableByRef() {
+ return $GLOBALS['a'];
+ }
+}
+
+echo "\n---> 1. Trying to assign by reference the return value of a function that returns by value:\n";
+unset($a, $b);
+$a = 4;
+$b = &C::returnConstantByValue();
+$a++;
+var_dump($a, $b);
+
+echo "\n---> 2. Trying to assign by reference the return value of a function that returns a constant by ref:\n";
+unset($a, $b);
+$a = 4;
+$b = &C::returnConstantByRef();
+$a++;
+var_dump($a, $b);
+
+echo "\n---> 3. Trying to assign by reference the return value of a function that returns by ref:\n";
+unset($a, $b);
+$a = 4;
+$b = &C::returnVariableByRef();
+$a++;
+var_dump($a, $b);
+
+?>
+--EXPECTF--
+
+---> 1. Trying to assign by reference the return value of a function that returns by value:
+
+Notice: Only variables should be assigned by reference in %s on line 19
+int(5)
+int(100)
+
+---> 2. Trying to assign by reference the return value of a function that returns a constant by ref:
+
+Notice: Only variable references should be returned by reference in %s on line 8
+int(5)
+int(100)
+
+---> 3. Trying to assign by reference the return value of a function that returns by ref:
+int(5)
+int(5)
diff --git a/tests/lang/returnByReference.005.phpt b/tests/lang/returnByReference.005.phpt
index 840b89fa53..adb11617c4 100644
--- a/tests/lang/returnByReference.005.phpt
+++ b/tests/lang/returnByReference.005.phpt
@@ -1,58 +1,58 @@
---TEST--
-Returning a reference from a method
---FILE--
-<?php
-Class C {
- function returnConstantByValue() {
- return 100;
- }
-
- function &returnConstantByRef() {
- return 100;
- }
-
- static function &returnVariableByRef() {
- return $GLOBALS['a'];
- }
-}
-$c = new C;
-
-echo "\n---> 1. Trying to assign by reference the return value of a function that returns by value:\n";
-unset($a, $b);
-$a = 4;
-$b = &$c->returnConstantByValue();
-$a++;
-var_dump($a, $b);
-
-echo "\n---> 2. Trying to assign by reference the return value of a function that returns a constant by ref:\n";
-unset($a, $b);
-$a = 4;
-$b = &$c->returnConstantByRef();
-$a++;
-var_dump($a, $b);
-
-echo "\n---> 3. Trying to assign by reference the return value of a function that returns by ref:\n";
-unset($a, $b);
-$a = 4;
-$b = &$c->returnVariableByRef();
-$a++;
-var_dump($a, $b);
-
-?>
---EXPECTF--
-
----> 1. Trying to assign by reference the return value of a function that returns by value:
-
-Notice: Only variables should be assigned by reference in %s on line 20
-int(5)
-int(100)
-
----> 2. Trying to assign by reference the return value of a function that returns a constant by ref:
-
-Notice: Only variable references should be returned by reference in %s on line 8
-int(5)
-int(100)
-
----> 3. Trying to assign by reference the return value of a function that returns by ref:
-int(5)
-int(5)
+--TEST--
+Returning a reference from a method
+--FILE--
+<?php
+Class C {
+ function returnConstantByValue() {
+ return 100;
+ }
+
+ function &returnConstantByRef() {
+ return 100;
+ }
+
+ static function &returnVariableByRef() {
+ return $GLOBALS['a'];
+ }
+}
+$c = new C;
+
+echo "\n---> 1. Trying to assign by reference the return value of a function that returns by value:\n";
+unset($a, $b);
+$a = 4;
+$b = &$c->returnConstantByValue();
+$a++;
+var_dump($a, $b);
+
+echo "\n---> 2. Trying to assign by reference the return value of a function that returns a constant by ref:\n";
+unset($a, $b);
+$a = 4;
+$b = &$c->returnConstantByRef();
+$a++;
+var_dump($a, $b);
+
+echo "\n---> 3. Trying to assign by reference the return value of a function that returns by ref:\n";
+unset($a, $b);
+$a = 4;
+$b = &$c->returnVariableByRef();
+$a++;
+var_dump($a, $b);
+
+?>
+--EXPECTF--
+
+---> 1. Trying to assign by reference the return value of a function that returns by value:
+
+Notice: Only variables should be assigned by reference in %s on line 20
+int(5)
+int(100)
+
+---> 2. Trying to assign by reference the return value of a function that returns a constant by ref:
+
+Notice: Only variable references should be returned by reference in %s on line 8
+int(5)
+int(100)
+
+---> 3. Trying to assign by reference the return value of a function that returns by ref:
+int(5)
+int(5)
diff --git a/tests/lang/returnByReference.006.phpt b/tests/lang/returnByReference.006.phpt
index 4019f3ab45..d2c7041be8 100644
--- a/tests/lang/returnByReference.006.phpt
+++ b/tests/lang/returnByReference.006.phpt
@@ -1,60 +1,60 @@
---TEST--
-Returning a reference from a function via another function
---INI--
-error_reporting = E_ALL & ~E_STRICT
---FILE--
-<?php
-function returnConstantByValue() {
- return 100;
-}
-
-function &returnConstantByRef() {
- return 100;
-}
-
-function &returnVariableByRef() {
- return $GLOBALS['a'];
-}
-
-function &returnFunctionCallByRef($functionToCall) {
- return $functionToCall();
-}
-
-echo "\n---> 1. Via a return by ref function call, assign by reference the return value of a function that returns by value:\n";
-unset($a, $b);
-$a = 4;
-$b = &returnFunctionCallByRef('returnConstantByValue');
-$a++;
-var_dump($a, $b);
-
-echo "\n---> 2. Via a return by ref function call, assign by reference the return value of a function that returns a constant by ref:\n";
-unset($a, $b);
-$a = 4;
-$b = &returnFunctionCallByRef('returnConstantByRef');
-$a++;
-var_dump($a, $b);
-
-echo "\n---> 3. Via a return by ref function call, assign by reference the return value of a function that returns by ref:\n";
-unset($a, $b);
-$a = 4;
-$b = &returnFunctionCallByRef('returnVariableByRef');
-$a++;
-var_dump($a, $b);
-
-?>
---EXPECTF--
----> 1. Via a return by ref function call, assign by reference the return value of a function that returns by value:
-
-Notice: Only variable references should be returned by reference in %s on line 15
-int(5)
-int(100)
-
----> 2. Via a return by ref function call, assign by reference the return value of a function that returns a constant by ref:
-
-Notice: Only variable references should be returned by reference in %s on line 7
-int(5)
-int(100)
-
----> 3. Via a return by ref function call, assign by reference the return value of a function that returns by ref:
-int(5)
-int(5)
+--TEST--
+Returning a reference from a function via another function
+--INI--
+error_reporting = E_ALL & ~E_STRICT
+--FILE--
+<?php
+function returnConstantByValue() {
+ return 100;
+}
+
+function &returnConstantByRef() {
+ return 100;
+}
+
+function &returnVariableByRef() {
+ return $GLOBALS['a'];
+}
+
+function &returnFunctionCallByRef($functionToCall) {
+ return $functionToCall();
+}
+
+echo "\n---> 1. Via a return by ref function call, assign by reference the return value of a function that returns by value:\n";
+unset($a, $b);
+$a = 4;
+$b = &returnFunctionCallByRef('returnConstantByValue');
+$a++;
+var_dump($a, $b);
+
+echo "\n---> 2. Via a return by ref function call, assign by reference the return value of a function that returns a constant by ref:\n";
+unset($a, $b);
+$a = 4;
+$b = &returnFunctionCallByRef('returnConstantByRef');
+$a++;
+var_dump($a, $b);
+
+echo "\n---> 3. Via a return by ref function call, assign by reference the return value of a function that returns by ref:\n";
+unset($a, $b);
+$a = 4;
+$b = &returnFunctionCallByRef('returnVariableByRef');
+$a++;
+var_dump($a, $b);
+
+?>
+--EXPECTF--
+---> 1. Via a return by ref function call, assign by reference the return value of a function that returns by value:
+
+Notice: Only variable references should be returned by reference in %s on line 15
+int(5)
+int(100)
+
+---> 2. Via a return by ref function call, assign by reference the return value of a function that returns a constant by ref:
+
+Notice: Only variable references should be returned by reference in %s on line 7
+int(5)
+int(100)
+
+---> 3. Via a return by ref function call, assign by reference the return value of a function that returns by ref:
+int(5)
+int(5)
diff --git a/tests/lang/returnByReference.007.phpt b/tests/lang/returnByReference.007.phpt
index badb7365f5..45fa0ddc88 100644
--- a/tests/lang/returnByReference.007.phpt
+++ b/tests/lang/returnByReference.007.phpt
@@ -1,63 +1,63 @@
---TEST--
-Returning a reference from a static method via another static method
---INI--
-error_reporting = E_ALL & ~E_STRICT
---FILE--
-<?php
-class C {
- static function returnConstantByValue() {
- return 100;
- }
-
- static function &returnConstantByRef() {
- return 100;
- }
-
- static function &returnVariableByRef() {
- return $GLOBALS['a'];
- }
-
- static function &returnFunctionCallByRef($functionToCall) {
- return C::$functionToCall();
- }
-}
-
-echo "\n---> 1. Via a return by ref function call, assign by reference the return value of a function that returns by value:\n";
-unset($a, $b);
-$a = 4;
-$b = &C::returnFunctionCallByRef('returnConstantByValue');
-$a++;
-var_dump($a, $b);
-
-echo "\n---> 2. Via a return by ref function call, assign by reference the return value of a function that returns a constant by ref:\n";
-unset($a, $b);
-$a = 4;
-$b = &C::returnFunctionCallByRef('returnConstantByRef');
-$a++;
-var_dump($a, $b);
-
-echo "\n---> 3. Via a return by ref function call, assign by reference the return value of a function that returns by ref:\n";
-unset($a, $b);
-$a = 4;
-$b = &C::returnFunctionCallByRef('returnVariableByRef');
-$a++;
-var_dump($a, $b);
-
-?>
---EXPECTF--
-
----> 1. Via a return by ref function call, assign by reference the return value of a function that returns by value:
-
-Notice: Only variable references should be returned by reference in %s on line 16
-int(5)
-int(100)
-
----> 2. Via a return by ref function call, assign by reference the return value of a function that returns a constant by ref:
-
-Notice: Only variable references should be returned by reference in %s on line 8
-int(5)
-int(100)
-
----> 3. Via a return by ref function call, assign by reference the return value of a function that returns by ref:
-int(5)
+--TEST--
+Returning a reference from a static method via another static method
+--INI--
+error_reporting = E_ALL & ~E_STRICT
+--FILE--
+<?php
+class C {
+ static function returnConstantByValue() {
+ return 100;
+ }
+
+ static function &returnConstantByRef() {
+ return 100;
+ }
+
+ static function &returnVariableByRef() {
+ return $GLOBALS['a'];
+ }
+
+ static function &returnFunctionCallByRef($functionToCall) {
+ return C::$functionToCall();
+ }
+}
+
+echo "\n---> 1. Via a return by ref function call, assign by reference the return value of a function that returns by value:\n";
+unset($a, $b);
+$a = 4;
+$b = &C::returnFunctionCallByRef('returnConstantByValue');
+$a++;
+var_dump($a, $b);
+
+echo "\n---> 2. Via a return by ref function call, assign by reference the return value of a function that returns a constant by ref:\n";
+unset($a, $b);
+$a = 4;
+$b = &C::returnFunctionCallByRef('returnConstantByRef');
+$a++;
+var_dump($a, $b);
+
+echo "\n---> 3. Via a return by ref function call, assign by reference the return value of a function that returns by ref:\n";
+unset($a, $b);
+$a = 4;
+$b = &C::returnFunctionCallByRef('returnVariableByRef');
+$a++;
+var_dump($a, $b);
+
+?>
+--EXPECTF--
+
+---> 1. Via a return by ref function call, assign by reference the return value of a function that returns by value:
+
+Notice: Only variable references should be returned by reference in %s on line 16
+int(5)
+int(100)
+
+---> 2. Via a return by ref function call, assign by reference the return value of a function that returns a constant by ref:
+
+Notice: Only variable references should be returned by reference in %s on line 8
+int(5)
+int(100)
+
+---> 3. Via a return by ref function call, assign by reference the return value of a function that returns by ref:
+int(5)
int(5)
diff --git a/tests/lang/returnByReference.008.phpt b/tests/lang/returnByReference.008.phpt
index 9c396be1bc..3774a917c5 100644
--- a/tests/lang/returnByReference.008.phpt
+++ b/tests/lang/returnByReference.008.phpt
@@ -1,64 +1,64 @@
---TEST--
-Returning a reference from a non-static method via another non-static method
---INI--
-error_reporting = E_ALL & ~E_STRICT
---FILE--
-<?php
-class C {
- function returnConstantByValue() {
- return 100;
- }
-
- function &returnConstantByRef() {
- return 100;
- }
-
- function &returnVariableByRef() {
- return $GLOBALS['a'];
- }
-
- function &returnFunctionCallByRef($functionToCall) {
- return $this->$functionToCall();
- }
-}
-$c = new C;
-
-echo "\n---> 1. Via a return by ref function call, assign by reference the return value of a function that returns by value:\n";
-unset($a, $b);
-$a = 4;
-$b = &$c->returnFunctionCallByRef('returnConstantByValue');
-$a++;
-var_dump($a, $b);
-
-echo "\n---> 2. Via a return by ref function call, assign by reference the return value of a function that returns a constant by ref:\n";
-unset($a, $b);
-$a = 4;
-$b = &$c->returnFunctionCallByRef('returnConstantByRef');
-$a++;
-var_dump($a, $b);
-
-echo "\n---> 3. Via a return by ref function call, assign by reference the return value of a function that returns by ref:\n";
-unset($a, $b);
-$a = 4;
-$b = &$c->returnFunctionCallByRef('returnVariableByRef');
-$a++;
-var_dump($a, $b);
-
-?>
---EXPECTF--
-
----> 1. Via a return by ref function call, assign by reference the return value of a function that returns by value:
-
-Notice: Only variable references should be returned by reference in %s on line 16
-int(5)
-int(100)
-
----> 2. Via a return by ref function call, assign by reference the return value of a function that returns a constant by ref:
-
-Notice: Only variable references should be returned by reference in %s on line 8
-int(5)
-int(100)
-
----> 3. Via a return by ref function call, assign by reference the return value of a function that returns by ref:
-int(5)
+--TEST--
+Returning a reference from a non-static method via another non-static method
+--INI--
+error_reporting = E_ALL & ~E_STRICT
+--FILE--
+<?php
+class C {
+ function returnConstantByValue() {
+ return 100;
+ }
+
+ function &returnConstantByRef() {
+ return 100;
+ }
+
+ function &returnVariableByRef() {
+ return $GLOBALS['a'];
+ }
+
+ function &returnFunctionCallByRef($functionToCall) {
+ return $this->$functionToCall();
+ }
+}
+$c = new C;
+
+echo "\n---> 1. Via a return by ref function call, assign by reference the return value of a function that returns by value:\n";
+unset($a, $b);
+$a = 4;
+$b = &$c->returnFunctionCallByRef('returnConstantByValue');
+$a++;
+var_dump($a, $b);
+
+echo "\n---> 2. Via a return by ref function call, assign by reference the return value of a function that returns a constant by ref:\n";
+unset($a, $b);
+$a = 4;
+$b = &$c->returnFunctionCallByRef('returnConstantByRef');
+$a++;
+var_dump($a, $b);
+
+echo "\n---> 3. Via a return by ref function call, assign by reference the return value of a function that returns by ref:\n";
+unset($a, $b);
+$a = 4;
+$b = &$c->returnFunctionCallByRef('returnVariableByRef');
+$a++;
+var_dump($a, $b);
+
+?>
+--EXPECTF--
+
+---> 1. Via a return by ref function call, assign by reference the return value of a function that returns by value:
+
+Notice: Only variable references should be returned by reference in %s on line 16
+int(5)
+int(100)
+
+---> 2. Via a return by ref function call, assign by reference the return value of a function that returns a constant by ref:
+
+Notice: Only variable references should be returned by reference in %s on line 8
+int(5)
+int(100)
+
+---> 3. Via a return by ref function call, assign by reference the return value of a function that returns by ref:
+int(5)
int(5)
diff --git a/tests/lang/returnByReference.009.phpt b/tests/lang/returnByReference.009.phpt
index 63203757de..9e7470edbc 100644
--- a/tests/lang/returnByReference.009.phpt
+++ b/tests/lang/returnByReference.009.phpt
@@ -1,39 +1,39 @@
---TEST--
-Returning a references returned by another function
---FILE--
-<?php
-
-
-function &returnVarByRef () {
- $b=1;
- return $b;
-}
-
-function &testReturnVarByRef() {
- return returnVarByRef();
-}
-
-function returnVal () {
-return 1;
-}
-
-function &testReturnValByRef() {
- return returnVal();
-}
-
-echo "\n---> 1. Return a variable by reference -> No warning:\n";
-
-var_dump (testReturnVarByRef());
-
-echo "\n---> 2. Return a value by reference -> Warning:\n";
-
-var_dump (testReturnValByRef());
-
---EXPECTF--
----> 1. Return a variable by reference -> No warning:
-int(1)
-
----> 2. Return a value by reference -> Warning:
-
-Notice: Only variable references should be returned by reference in %s on line %d
-int(1)
+--TEST--
+Returning a references returned by another function
+--FILE--
+<?php
+
+
+function &returnVarByRef () {
+ $b=1;
+ return $b;
+}
+
+function &testReturnVarByRef() {
+ return returnVarByRef();
+}
+
+function returnVal () {
+return 1;
+}
+
+function &testReturnValByRef() {
+ return returnVal();
+}
+
+echo "\n---> 1. Return a variable by reference -> No warning:\n";
+
+var_dump (testReturnVarByRef());
+
+echo "\n---> 2. Return a value by reference -> Warning:\n";
+
+var_dump (testReturnValByRef());
+
+--EXPECTF--
+---> 1. Return a variable by reference -> No warning:
+int(1)
+
+---> 2. Return a value by reference -> Warning:
+
+Notice: Only variable references should be returned by reference in %s on line %d
+int(1)
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/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..d1afa4d9a3
--- /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 === "WIN") {
+ 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..9c85a20725
--- /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 !== "WIN") {
+ 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..595b5c401f
--- /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 !== "WIN") {
+ 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..44fae220ff
--- /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 !== "WIN") {
+ 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..322e7ad229
--- /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 !== "WIN") {
+ 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..e61652c13f
--- /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 !== "WIN") {
+ 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..21966c8f64
--- /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 !== "WIN") {
+ 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..26da5564b3
--- /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 !== "WIN") {
+ 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..646e169d9b
--- /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 !== "WIN") {
+ 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..d277128095
--- /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 !== "WIN") {
+ 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..1dd889aa05
--- /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 !== "WIN") {
+ 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..e31b688179
--- /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 !== "WIN") {
+ 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..5379ac2059
--- /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 !== "WIN") {
+ 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/security/open_basedir_001.phpt b/tests/security/open_basedir_001.phpt
index 9ea9559942..7b198df843 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 === "WIN") {
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..e03b23eb60 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 === "WIN") {
die('skip no links on Windows');
}
?>
diff --git a/tests/security/open_basedir_linkinfo.phpt b/tests/security/open_basedir_linkinfo.phpt
index 55cf2c2f4b..0f2b941e3c 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 === "WIN") {
die('skip no symlinks on Windows');
}
?>
diff --git a/tests/security/open_basedir_mkdir.phpt b/tests/security/open_basedir_mkdir.phpt
index 9c32d408a2..fba0dfbc0a 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 !== "WIN") {
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..5dec5f83a7 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 !== "WIN") {
die('skip Windows only variation');
}
?>
diff --git a/tests/security/open_basedir_readlink.phpt b/tests/security/open_basedir_readlink.phpt
index 33720bbf1b..16c638a307 100644
--- a/tests/security/open_basedir_readlink.phpt
+++ b/tests/security/open_basedir_readlink.phpt
@@ -2,7 +2,7 @@
Test open_basedir configuration
--SKIPIF--
<?php
-if (substr(PHP_OS, 0, 3) == 'WIN') {
+if(PHP_OS_FAMILY === "WIN") {
die('skip no symlinks on Windows');
}
?>
diff --git a/tests/security/open_basedir_realpath.phpt b/tests/security/open_basedir_realpath.phpt
index 8cae890e99..c44215aa47 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 !== "WIN") {
die('skip only run on Windows');
}
?>
diff --git a/tests/security/open_basedir_symlink.phpt b/tests/security/open_basedir_symlink.phpt
index cdc8e7bcc4..fe138cf956 100644
--- a/tests/security/open_basedir_symlink.phpt
+++ b/tests/security/open_basedir_symlink.phpt
@@ -2,7 +2,7 @@
Test open_basedir configuration
--SKIPIF--
<?php
-if (substr(PHP_OS, 0, 3) == 'WIN') {
+if(PHP_OS_FAMILY === "WIN") {
die('skip no symlinks on Windows');
}
?>