summaryrefslogtreecommitdiff
path: root/ext/iconv
diff options
context:
space:
mode:
Diffstat (limited to 'ext/iconv')
-rw-r--r--ext/iconv/iconv.c16
-rw-r--r--ext/iconv/php_iconv.h9
-rw-r--r--ext/iconv/tests/eucjp2iso2022jp.phpt1
-rw-r--r--ext/iconv/tests/eucjp2sjis.phpt1
-rw-r--r--ext/iconv/tests/eucjp2utf8.phpt1
-rw-r--r--ext/iconv/tests/iconv001.phpt1
-rw-r--r--ext/iconv/tests/iconv002.phpt1
-rw-r--r--ext/iconv/tests/iconv_get_encoding_error.phpt177
-rw-r--r--ext/iconv/tests/iconv_mime_decode_headers_variation1.phpt218
-rw-r--r--ext/iconv/tests/iconv_mime_decode_headers_variation2.phpt466
-rw-r--r--ext/iconv/tests/iconv_mime_decode_headers_variation3.phpt469
-rw-r--r--ext/iconv/tests/iconv_mime_decode_variation1.phpt183
-rw-r--r--ext/iconv/tests/iconv_mime_decode_variation2.phpt198
-rw-r--r--ext/iconv/tests/iconv_mime_decode_variation3.phpt222
-rw-r--r--ext/iconv/tests/iconv_set_encoding_error.phpt177
-rw-r--r--ext/iconv/tests/iconv_set_encoding_variation.phpt309
-rw-r--r--ext/iconv/tests/iconv_strlen_variation1.phpt193
-rw-r--r--ext/iconv/tests/iconv_strlen_variation2.phpt203
-rw-r--r--ext/iconv/tests/iconv_strpos_variation1.phpt182
-rw-r--r--ext/iconv/tests/iconv_strpos_variation2.phpt182
-rw-r--r--ext/iconv/tests/iconv_strpos_variation3.phpt210
-rw-r--r--ext/iconv/tests/iconv_strpos_variation3_64bit.phpt208
-rw-r--r--ext/iconv/tests/iconv_strpos_variation4.phpt206
-rw-r--r--ext/iconv/tests/iconv_strrpos_variation1.phpt179
-rw-r--r--ext/iconv/tests/iconv_strrpos_variation2.phpt181
-rw-r--r--ext/iconv/tests/iconv_strrpos_variation3.phpt204
-rw-r--r--ext/iconv/tests/ob_iconv_handler.phpt1
-rw-r--r--ext/iconv/tests/test.inc7
-rw-r--r--ext/iconv/tests/translit-failure.phpt1
-rw-r--r--ext/iconv/tests/translit-utf8.phpt3
30 files changed, 4 insertions, 4405 deletions
diff --git a/ext/iconv/iconv.c b/ext/iconv/iconv.c
index d80bac77f3..0e85a5c3b3 100644
--- a/ext/iconv/iconv.c
+++ b/ext/iconv/iconv.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2018 The PHP Group |
+ | Copyright (c) The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -29,10 +29,7 @@
#include "SAPI.h"
#include "php_ini.h"
-#ifdef HAVE_STDLIB_H
-# include <stdlib.h>
-#endif
-
+#include <stdlib.h>
#include <errno.h>
#include "php_iconv.h"
@@ -2936,12 +2933,3 @@ static php_iconv_err_t php_iconv_stream_filter_unregister_factory(void)
/* }}} */
/* }}} */
#endif
-
-/*
- * Local variables:
- * tab-width: 4
- * c-basic-offset: 4
- * End:
- * vim600: sw=4 ts=4 fdm=marker
- * vim<600: sw=4 ts=4
- */
diff --git a/ext/iconv/php_iconv.h b/ext/iconv/php_iconv.h
index acf6ba4424..980d84c945 100644
--- a/ext/iconv/php_iconv.h
+++ b/ext/iconv/php_iconv.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2018 The PHP Group |
+ | Copyright (c) The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -116,10 +116,3 @@ PHP_ICONV_API php_iconv_err_t php_iconv_string(const char * in_p, size_t in_len,
#define phpext_iconv_ptr iconv_module_ptr
#endif /* PHP_ICONV_H */
-
-/*
- * Local variables:
- * tab-width: 4
- * c-basic-offset: 4
- * End:
- */
diff --git a/ext/iconv/tests/eucjp2iso2022jp.phpt b/ext/iconv/tests/eucjp2iso2022jp.phpt
index 19cb0f736a..6700ac9197 100644
--- a/ext/iconv/tests/eucjp2iso2022jp.phpt
+++ b/ext/iconv/tests/eucjp2iso2022jp.phpt
@@ -6,7 +6,6 @@ EUC-JP to ISO-2022-JP
error_reporting=2039
--FILE--
<?php
-/* include('test.inc'); */
/* charset=EUC-JP */
function hexdump($str) {
diff --git a/ext/iconv/tests/eucjp2sjis.phpt b/ext/iconv/tests/eucjp2sjis.phpt
index 1323ac1b30..ed851541fb 100644
--- a/ext/iconv/tests/eucjp2sjis.phpt
+++ b/ext/iconv/tests/eucjp2sjis.phpt
@@ -6,7 +6,6 @@ EUC-JP to SJIS
error_reporting=2039
--FILE--
<?php
-/* include('test.inc'); */
/* charset=EUC-JP */
$str = "
diff --git a/ext/iconv/tests/eucjp2utf8.phpt b/ext/iconv/tests/eucjp2utf8.phpt
index d859122ef1..cdd0d5deb8 100644
--- a/ext/iconv/tests/eucjp2utf8.phpt
+++ b/ext/iconv/tests/eucjp2utf8.phpt
@@ -6,7 +6,6 @@ EUC-JP to UTF8
error_reporting=2039
--FILE--
<?php
-/* include('test.inc'); */
/* charset=EUC-JP */
$str = "
diff --git a/ext/iconv/tests/iconv001.phpt b/ext/iconv/tests/iconv001.phpt
index 3ef49246e5..dc7bd38964 100644
--- a/ext/iconv/tests/iconv001.phpt
+++ b/ext/iconv/tests/iconv001.phpt
@@ -6,7 +6,6 @@ iconv() test 1
error_reporting=2039
--FILE--
<?php
-/* include('test.inc'); */
echo "iconv extension is available\n";
$test = "זרו";
var_dump("ISO-8859-1: $test");
diff --git a/ext/iconv/tests/iconv002.phpt b/ext/iconv/tests/iconv002.phpt
index d49e5eccc2..6be5a86a69 100644
--- a/ext/iconv/tests/iconv002.phpt
+++ b/ext/iconv/tests/iconv002.phpt
@@ -11,7 +11,6 @@ if (@iconv("ascii","UCS-4LE", "abcd") == '') {
error_reporting=2039
--FILE--
<?php
-/* include('test.inc'); */
/*
Expected output:
&#97;&#98;&#99;&#100;
diff --git a/ext/iconv/tests/iconv_get_encoding_error.phpt b/ext/iconv/tests/iconv_get_encoding_error.phpt
deleted file mode 100644
index c146051440..0000000000
--- a/ext/iconv/tests/iconv_get_encoding_error.phpt
+++ /dev/null
@@ -1,177 +0,0 @@
---TEST--
-Test iconv_get_encoding() function : basic functionality
---SKIPIF--
-<?php
-extension_loaded('iconv') or die('skip');
-function_exists('iconv_get_encoding') or die("skip iconv_get_encoding() is not available in this build");
-?>
---FILE--
-<?php
-/* Prototype : mixed iconv_get_encoding([string type])
- * Description: Get internal encoding and output encoding for ob_iconv_handler()
- * Source code: ext/iconv/iconv.c
- */
-
-/*
- * Test Error functionality of iconv_get_encoding
- */
-
-echo "*** Testing iconv_get_encoding() : error functionality ***\n";
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// get a class
-class classA
-{
- public function __toString() {
- return "UTF-8";
- }
-}
-
-// heredoc string
-$heredoc = <<<EOT
-Nothing
-EOT;
-
-// get a resource variable
-$fp = fopen(__FILE__, "r");
-
-// unexpected values to be passed to $encoding argument
-$inputs = array(
-
- // int data
-/*1*/ 0,
- 1,
- 12345,
- -2345,
-
- // float data
-/*5*/ 10.5,
- -10.5,
- 12.3456789000e10,
- 12.3456789000E-10,
- .5,
-
- // null data
-/*10*/ NULL,
- null,
-
- // boolean data
-/*12*/ true,
- false,
- TRUE,
- FALSE,
-
- // empty data
-/*16*/ "",
- '',
-
- // invalid string data
-/*18*/ "Nothing",
- 'Nothing',
- $heredoc,
-
- // object data
-/*21*/ new classA(),
-
- // undefined data
-/*22*/ @$undefined_var,
-
- // unset data
-/*23*/ @$unset_var,
-
- // resource variable
-/*24*/ $fp
-);
-
-// loop through each element of $inputs to check the behavior of mb_regex_encoding()
-$iterator = 1;
-foreach($inputs as $input) {
- echo "\n-- Iteration $iterator --\n";
- var_dump( iconv_get_encoding($input) );
- $iterator++;
-};
-
-fclose($fp);
-
-echo "Done";
-?>
---EXPECTF--
-*** Testing iconv_get_encoding() : error functionality ***
-
--- Iteration 1 --
-bool(false)
-
--- Iteration 2 --
-bool(false)
-
--- Iteration 3 --
-bool(false)
-
--- Iteration 4 --
-bool(false)
-
--- Iteration 5 --
-bool(false)
-
--- Iteration 6 --
-bool(false)
-
--- Iteration 7 --
-bool(false)
-
--- Iteration 8 --
-bool(false)
-
--- Iteration 9 --
-bool(false)
-
--- Iteration 10 --
-bool(false)
-
--- Iteration 11 --
-bool(false)
-
--- Iteration 12 --
-bool(false)
-
--- Iteration 13 --
-bool(false)
-
--- Iteration 14 --
-bool(false)
-
--- Iteration 15 --
-bool(false)
-
--- Iteration 16 --
-bool(false)
-
--- Iteration 17 --
-bool(false)
-
--- Iteration 18 --
-bool(false)
-
--- Iteration 19 --
-bool(false)
-
--- Iteration 20 --
-bool(false)
-
--- Iteration 21 --
-bool(false)
-
--- Iteration 22 --
-bool(false)
-
--- Iteration 23 --
-bool(false)
-
--- Iteration 24 --
-
-Warning: iconv_get_encoding() expects parameter 1 to be string, resource given in %s on line %d
-NULL
-Done
diff --git a/ext/iconv/tests/iconv_mime_decode_headers_variation1.phpt b/ext/iconv/tests/iconv_mime_decode_headers_variation1.phpt
deleted file mode 100644
index ae10b0dc9e..0000000000
--- a/ext/iconv/tests/iconv_mime_decode_headers_variation1.phpt
+++ /dev/null
@@ -1,218 +0,0 @@
---TEST--
-Test iconv_mime_encode() function : usage variations - Pass different data types to headers arg
---SKIPIF--
-<?php
-extension_loaded('iconv') or die('skip');
-function_exists('iconv_mime_decode_headers') or die("skip iconv_mime_decode_headers() is not available in this build");
-?>
---FILE--
-<?php
-/* Prototype : array iconv_mime_decode_headers(string headers [, int mode, string charset])
- * Description: Decodes multiple mime header fields
- * Source code: ext/iconv/iconv.c
- */
-
-/*
- * Pass different data types to $str argument to see how iconv_mime_decode_headers() behaves
- */
-
-echo "*** Testing iconv_mime_decode_headers() : usage variations ***\n";
-
-// Initialise function arguments not being substituted
-$headers = <<<EOF
-Subject: =?UTF-8?B?UHLDvGZ1bmcgUHLDvGZ1bmc=?=
-To: example@example.com
-Date: Thu, 1 Jan 1970 00:00:00 +0000
-Message-Id: <example@example.com>
-Received: from localhost (localhost [127.0.0.1]) by localhost
- with SMTP id example for <example@example.com>;
- Thu, 1 Jan 1970 00:00:00 +0000 (UTC)
- (envelope-from example-return-0000-example=example.com@example.com)
-Received: (qmail 0 invoked by uid 65534); 1 Thu 2003 00:00:00 +0000
-
-EOF;
-
-$mode = ICONV_MIME_DECODE_CONTINUE_ON_ERROR;
-$charset = 'ISO-8859-1';
-
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// get a class
-class classA
-{
- public function __toString() {
- return "Class A object";
- }
-}
-
-// heredoc string
-$heredoc = <<<EOT
-hello world
-EOT;
-
-// get a resource variable
-$fp = fopen(__FILE__, "r");
-
-// unexpected values to be passed to $str argument
-$inputs = array(
-
- // int data
-/*1*/ 0,
- 1,
- 12345,
- -2345,
-
- // float data
-/*5*/ 10.5,
- -10.5,
- 12.3456789000e10,
- 12.3456789000E-10,
- .5,
-
- // null data
-/*10*/ NULL,
- null,
-
- // boolean data
-/*12*/ true,
- false,
- TRUE,
- FALSE,
-
- // empty data
-/*16*/ "",
- '',
-
- // string data
-/*18*/ "string",
- 'string',
- $heredoc,
-
- // object data
-/*21*/ new classA(),
-
- // undefined data
-/*22*/ @$undefined_var,
-
- // unset data
-/*23*/ @$unset_var,
-
- // resource variable
-/*24*/ $fp
-);
-
-// loop through each element of $inputs to check the behavior of iconv_mime_decode_headers()
-$iterator = 1;
-foreach($inputs as $input) {
- echo "\n-- Iteration $iterator --\n";
- var_dump( iconv_mime_decode_headers($input, $mode, $charset));
- $iterator++;
-};
-
-fclose($fp);
-
-echo "Done";
-?>
---EXPECTF--
-*** Testing iconv_mime_decode_headers() : usage variations ***
-
--- Iteration 1 --
-array(0) {
-}
-
--- Iteration 2 --
-array(0) {
-}
-
--- Iteration 3 --
-array(0) {
-}
-
--- Iteration 4 --
-array(0) {
-}
-
--- Iteration 5 --
-array(0) {
-}
-
--- Iteration 6 --
-array(0) {
-}
-
--- Iteration 7 --
-array(0) {
-}
-
--- Iteration 8 --
-array(0) {
-}
-
--- Iteration 9 --
-array(0) {
-}
-
--- Iteration 10 --
-array(0) {
-}
-
--- Iteration 11 --
-array(0) {
-}
-
--- Iteration 12 --
-array(0) {
-}
-
--- Iteration 13 --
-array(0) {
-}
-
--- Iteration 14 --
-array(0) {
-}
-
--- Iteration 15 --
-array(0) {
-}
-
--- Iteration 16 --
-array(0) {
-}
-
--- Iteration 17 --
-array(0) {
-}
-
--- Iteration 18 --
-array(0) {
-}
-
--- Iteration 19 --
-array(0) {
-}
-
--- Iteration 20 --
-array(0) {
-}
-
--- Iteration 21 --
-array(0) {
-}
-
--- Iteration 22 --
-array(0) {
-}
-
--- Iteration 23 --
-array(0) {
-}
-
--- Iteration 24 --
-
-Warning: iconv_mime_decode_headers() expects parameter 1 to be string, resource given in %s on line %d
-bool(false)
-Done
diff --git a/ext/iconv/tests/iconv_mime_decode_headers_variation2.phpt b/ext/iconv/tests/iconv_mime_decode_headers_variation2.phpt
deleted file mode 100644
index f325f2816f..0000000000
--- a/ext/iconv/tests/iconv_mime_decode_headers_variation2.phpt
+++ /dev/null
@@ -1,466 +0,0 @@
---TEST--
-Test iconv_mime_encode() function : usage variations - Pass different data types to mode arg
---SKIPIF--
-<?php
-PHP_INT_SIZE == 4 or die('skip 32-bit only');
-extension_loaded('iconv') or die('skip iconv extension not loaded');
-function_exists('iconv_mime_decode_headers') or die("skip iconv_mime_decode_headers() is not available in this build");
-?>
---FILE--
-<?php
-/* Prototype : array iconv_mime_decode_headers(string headers [, int mode, string charset])
- * Description: Decodes multiple mime header fields
- * Source code: ext/iconv/iconv.c
- */
-
-/*
- * Pass different data types to $str argument to see how iconv_mime_decode_headers() behaves
- */
-
-echo "*** Testing iconv_mime_decode_headers() : usage variations ***\n";
-
-// Initialise function arguments not being substituted
-$headers = <<<EOF
-Subject: =?UTF-8?B?QSBTYW1wbGUgVGVzdA==?=
-To: example@example.com
-Date: Thu, 1 Jan 1970 00:00:00 +0000
-Message-Id: <example@example.com>
-Received: from localhost (localhost [127.0.0.1]) by localhost
- with SMTP id example for <example@example.com>;
- Thu, 1 Jan 1970 00:00:00 +0000 (UTC)
- (envelope-from example-return-0000-example=example.com@example.com)
-Received: (qmail 0 invoked by uid 65534); 1 Thu 2003 00:00:00 +0000
-
-EOF;
-
-$mode = ICONV_MIME_DECODE_CONTINUE_ON_ERROR;
-$charset = 'UTF-8';
-
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// get a class
-class classA
-{
- public function __toString() {
- return "Class A object";
- }
-}
-
-// heredoc string
-$heredoc = <<<EOT
-hello world
-EOT;
-
-// get a resource variable
-$fp = fopen(__FILE__, "r");
-
-// unexpected values to be passed to $str argument
-$inputs = array(
-
- // int data
-/*1*/ 0,
- 1,
- 12345,
- -2345,
-
- // float data
-/*5*/ 10.5,
- -10.5,
- 12.3456789000e10,
- 12.3456789000E-10,
- .5,
-
- // null data
-/*10*/ NULL,
- null,
-
- // boolean data
-/*12*/ true,
- false,
- TRUE,
- FALSE,
-
- // empty data
-/*16*/ "",
- '',
-
- // string data
-/*18*/ "string",
- 'string',
- $heredoc,
-
- // object data
-/*21*/ new classA(),
-
- // undefined data
-/*22*/ @$undefined_var,
-
- // unset data
-/*23*/ @$unset_var,
-
- // resource variable
-/*24*/ $fp
-);
-
-// loop through each element of $inputs to check the behavior of iconv_mime_decode_headers()
-$iterator = 1;
-foreach($inputs as $input) {
- echo "\n-- Iteration $iterator --\n";
- var_dump( iconv_mime_decode_headers($headers, $input, $charset));
- $iterator++;
-};
-
-fclose($fp);
-
-echo "Done";
-?>
---EXPECTF--
-*** Testing iconv_mime_decode_headers() : usage variations ***
-
--- Iteration 1 --
-array(5) {
- ["Subject"]=>
- string(13) "A Sample Test"
- ["To"]=>
- string(19) "example@example.com"
- ["Date"]=>
- string(30) "Thu, 1 Jan 1970 00:00:00 +0000"
- ["Message-Id"]=>
- string(21) "<example@example.com>"
- ["Received"]=>
- array(2) {
- [0]=>
- string(204) "from localhost (localhost [127.0.0.1]) by localhost with SMTP id example for <example@example.com>; Thu, 1 Jan 1970 00:00:00 +0000 (UTC) (envelope-from example-return-0000-example=example.com@example.com)"
- [1]=>
- string(57) "(qmail 0 invoked by uid 65534); 1 Thu 2003 00:00:00 +0000"
- }
-}
-
--- Iteration 2 --
-array(5) {
- ["Subject"]=>
- string(13) "A Sample Test"
- ["To"]=>
- string(19) "example@example.com"
- ["Date"]=>
- string(30) "Thu, 1 Jan 1970 00:00:00 +0000"
- ["Message-Id"]=>
- string(21) "<example@example.com>"
- ["Received"]=>
- array(2) {
- [0]=>
- string(204) "from localhost (localhost [127.0.0.1]) by localhost with SMTP id example for <example@example.com>; Thu, 1 Jan 1970 00:00:00 +0000 (UTC) (envelope-from example-return-0000-example=example.com@example.com)"
- [1]=>
- string(57) "(qmail 0 invoked by uid 65534); 1 Thu 2003 00:00:00 +0000"
- }
-}
-
--- Iteration 3 --
-array(5) {
- ["Subject"]=>
- string(13) "A Sample Test"
- ["To"]=>
- string(19) "example@example.com"
- ["Date"]=>
- string(30) "Thu, 1 Jan 1970 00:00:00 +0000"
- ["Message-Id"]=>
- string(21) "<example@example.com>"
- ["Received"]=>
- array(2) {
- [0]=>
- string(204) "from localhost (localhost [127.0.0.1]) by localhost with SMTP id example for <example@example.com>; Thu, 1 Jan 1970 00:00:00 +0000 (UTC) (envelope-from example-return-0000-example=example.com@example.com)"
- [1]=>
- string(57) "(qmail 0 invoked by uid 65534); 1 Thu 2003 00:00:00 +0000"
- }
-}
-
--- Iteration 4 --
-array(5) {
- ["Subject"]=>
- string(13) "A Sample Test"
- ["To"]=>
- string(19) "example@example.com"
- ["Date"]=>
- string(30) "Thu, 1 Jan 1970 00:00:00 +0000"
- ["Message-Id"]=>
- string(21) "<example@example.com>"
- ["Received"]=>
- array(2) {
- [0]=>
- string(204) "from localhost (localhost [127.0.0.1]) by localhost with SMTP id example for <example@example.com>; Thu, 1 Jan 1970 00:00:00 +0000 (UTC) (envelope-from example-return-0000-example=example.com@example.com)"
- [1]=>
- string(57) "(qmail 0 invoked by uid 65534); 1 Thu 2003 00:00:00 +0000"
- }
-}
-
--- Iteration 5 --
-array(5) {
- ["Subject"]=>
- string(13) "A Sample Test"
- ["To"]=>
- string(19) "example@example.com"
- ["Date"]=>
- string(30) "Thu, 1 Jan 1970 00:00:00 +0000"
- ["Message-Id"]=>
- string(21) "<example@example.com>"
- ["Received"]=>
- array(2) {
- [0]=>
- string(204) "from localhost (localhost [127.0.0.1]) by localhost with SMTP id example for <example@example.com>; Thu, 1 Jan 1970 00:00:00 +0000 (UTC) (envelope-from example-return-0000-example=example.com@example.com)"
- [1]=>
- string(57) "(qmail 0 invoked by uid 65534); 1 Thu 2003 00:00:00 +0000"
- }
-}
-
--- Iteration 6 --
-array(5) {
- ["Subject"]=>
- string(13) "A Sample Test"
- ["To"]=>
- string(19) "example@example.com"
- ["Date"]=>
- string(30) "Thu, 1 Jan 1970 00:00:00 +0000"
- ["Message-Id"]=>
- string(21) "<example@example.com>"
- ["Received"]=>
- array(2) {
- [0]=>
- string(204) "from localhost (localhost [127.0.0.1]) by localhost with SMTP id example for <example@example.com>; Thu, 1 Jan 1970 00:00:00 +0000 (UTC) (envelope-from example-return-0000-example=example.com@example.com)"
- [1]=>
- string(57) "(qmail 0 invoked by uid 65534); 1 Thu 2003 00:00:00 +0000"
- }
-}
-
--- Iteration 7 --
-
-Warning: iconv_mime_decode_headers() expects parameter 2 to be int, float given in %s on line %d
-bool(false)
-
--- Iteration 8 --
-array(5) {
- ["Subject"]=>
- string(13) "A Sample Test"
- ["To"]=>
- string(19) "example@example.com"
- ["Date"]=>
- string(30) "Thu, 1 Jan 1970 00:00:00 +0000"
- ["Message-Id"]=>
- string(21) "<example@example.com>"
- ["Received"]=>
- array(2) {
- [0]=>
- string(204) "from localhost (localhost [127.0.0.1]) by localhost with SMTP id example for <example@example.com>; Thu, 1 Jan 1970 00:00:00 +0000 (UTC) (envelope-from example-return-0000-example=example.com@example.com)"
- [1]=>
- string(57) "(qmail 0 invoked by uid 65534); 1 Thu 2003 00:00:00 +0000"
- }
-}
-
--- Iteration 9 --
-array(5) {
- ["Subject"]=>
- string(13) "A Sample Test"
- ["To"]=>
- string(19) "example@example.com"
- ["Date"]=>
- string(30) "Thu, 1 Jan 1970 00:00:00 +0000"
- ["Message-Id"]=>
- string(21) "<example@example.com>"
- ["Received"]=>
- array(2) {
- [0]=>
- string(204) "from localhost (localhost [127.0.0.1]) by localhost with SMTP id example for <example@example.com>; Thu, 1 Jan 1970 00:00:00 +0000 (UTC) (envelope-from example-return-0000-example=example.com@example.com)"
- [1]=>
- string(57) "(qmail 0 invoked by uid 65534); 1 Thu 2003 00:00:00 +0000"
- }
-}
-
--- Iteration 10 --
-array(5) {
- ["Subject"]=>
- string(13) "A Sample Test"
- ["To"]=>
- string(19) "example@example.com"
- ["Date"]=>
- string(30) "Thu, 1 Jan 1970 00:00:00 +0000"
- ["Message-Id"]=>
- string(21) "<example@example.com>"
- ["Received"]=>
- array(2) {
- [0]=>
- string(204) "from localhost (localhost [127.0.0.1]) by localhost with SMTP id example for <example@example.com>; Thu, 1 Jan 1970 00:00:00 +0000 (UTC) (envelope-from example-return-0000-example=example.com@example.com)"
- [1]=>
- string(57) "(qmail 0 invoked by uid 65534); 1 Thu 2003 00:00:00 +0000"
- }
-}
-
--- Iteration 11 --
-array(5) {
- ["Subject"]=>
- string(13) "A Sample Test"
- ["To"]=>
- string(19) "example@example.com"
- ["Date"]=>
- string(30) "Thu, 1 Jan 1970 00:00:00 +0000"
- ["Message-Id"]=>
- string(21) "<example@example.com>"
- ["Received"]=>
- array(2) {
- [0]=>
- string(204) "from localhost (localhost [127.0.0.1]) by localhost with SMTP id example for <example@example.com>; Thu, 1 Jan 1970 00:00:00 +0000 (UTC) (envelope-from example-return-0000-example=example.com@example.com)"
- [1]=>
- string(57) "(qmail 0 invoked by uid 65534); 1 Thu 2003 00:00:00 +0000"
- }
-}
-
--- Iteration 12 --
-array(5) {
- ["Subject"]=>
- string(13) "A Sample Test"
- ["To"]=>
- string(19) "example@example.com"
- ["Date"]=>
- string(30) "Thu, 1 Jan 1970 00:00:00 +0000"
- ["Message-Id"]=>
- string(21) "<example@example.com>"
- ["Received"]=>
- array(2) {
- [0]=>
- string(204) "from localhost (localhost [127.0.0.1]) by localhost with SMTP id example for <example@example.com>; Thu, 1 Jan 1970 00:00:00 +0000 (UTC) (envelope-from example-return-0000-example=example.com@example.com)"
- [1]=>
- string(57) "(qmail 0 invoked by uid 65534); 1 Thu 2003 00:00:00 +0000"
- }
-}
-
--- Iteration 13 --
-array(5) {
- ["Subject"]=>
- string(13) "A Sample Test"
- ["To"]=>
- string(19) "example@example.com"
- ["Date"]=>
- string(30) "Thu, 1 Jan 1970 00:00:00 +0000"
- ["Message-Id"]=>
- string(21) "<example@example.com>"
- ["Received"]=>
- array(2) {
- [0]=>
- string(204) "from localhost (localhost [127.0.0.1]) by localhost with SMTP id example for <example@example.com>; Thu, 1 Jan 1970 00:00:00 +0000 (UTC) (envelope-from example-return-0000-example=example.com@example.com)"
- [1]=>
- string(57) "(qmail 0 invoked by uid 65534); 1 Thu 2003 00:00:00 +0000"
- }
-}
-
--- Iteration 14 --
-array(5) {
- ["Subject"]=>
- string(13) "A Sample Test"
- ["To"]=>
- string(19) "example@example.com"
- ["Date"]=>
- string(30) "Thu, 1 Jan 1970 00:00:00 +0000"
- ["Message-Id"]=>
- string(21) "<example@example.com>"
- ["Received"]=>
- array(2) {
- [0]=>
- string(204) "from localhost (localhost [127.0.0.1]) by localhost with SMTP id example for <example@example.com>; Thu, 1 Jan 1970 00:00:00 +0000 (UTC) (envelope-from example-return-0000-example=example.com@example.com)"
- [1]=>
- string(57) "(qmail 0 invoked by uid 65534); 1 Thu 2003 00:00:00 +0000"
- }
-}
-
--- Iteration 15 --
-array(5) {
- ["Subject"]=>
- string(13) "A Sample Test"
- ["To"]=>
- string(19) "example@example.com"
- ["Date"]=>
- string(30) "Thu, 1 Jan 1970 00:00:00 +0000"
- ["Message-Id"]=>
- string(21) "<example@example.com>"
- ["Received"]=>
- array(2) {
- [0]=>
- string(204) "from localhost (localhost [127.0.0.1]) by localhost with SMTP id example for <example@example.com>; Thu, 1 Jan 1970 00:00:00 +0000 (UTC) (envelope-from example-return-0000-example=example.com@example.com)"
- [1]=>
- string(57) "(qmail 0 invoked by uid 65534); 1 Thu 2003 00:00:00 +0000"
- }
-}
-
--- Iteration 16 --
-
-Warning: iconv_mime_decode_headers() expects parameter 2 to be int, string given in %s on line %d
-bool(false)
-
--- Iteration 17 --
-
-Warning: iconv_mime_decode_headers() expects parameter 2 to be int, string given in %s on line %d
-bool(false)
-
--- Iteration 18 --
-
-Warning: iconv_mime_decode_headers() expects parameter 2 to be int, string given in %s on line %d
-bool(false)
-
--- Iteration 19 --
-
-Warning: iconv_mime_decode_headers() expects parameter 2 to be int, string given in %s on line %d
-bool(false)
-
--- Iteration 20 --
-
-Warning: iconv_mime_decode_headers() expects parameter 2 to be int, string given in %s on line %d
-bool(false)
-
--- Iteration 21 --
-
-Warning: iconv_mime_decode_headers() expects parameter 2 to be int, object given in %s on line %d
-bool(false)
-
--- Iteration 22 --
-array(5) {
- ["Subject"]=>
- string(13) "A Sample Test"
- ["To"]=>
- string(19) "example@example.com"
- ["Date"]=>
- string(30) "Thu, 1 Jan 1970 00:00:00 +0000"
- ["Message-Id"]=>
- string(21) "<example@example.com>"
- ["Received"]=>
- array(2) {
- [0]=>
- string(204) "from localhost (localhost [127.0.0.1]) by localhost with SMTP id example for <example@example.com>; Thu, 1 Jan 1970 00:00:00 +0000 (UTC) (envelope-from example-return-0000-example=example.com@example.com)"
- [1]=>
- string(57) "(qmail 0 invoked by uid 65534); 1 Thu 2003 00:00:00 +0000"
- }
-}
-
--- Iteration 23 --
-array(5) {
- ["Subject"]=>
- string(13) "A Sample Test"
- ["To"]=>
- string(19) "example@example.com"
- ["Date"]=>
- string(30) "Thu, 1 Jan 1970 00:00:00 +0000"
- ["Message-Id"]=>
- string(21) "<example@example.com>"
- ["Received"]=>
- array(2) {
- [0]=>
- string(204) "from localhost (localhost [127.0.0.1]) by localhost with SMTP id example for <example@example.com>; Thu, 1 Jan 1970 00:00:00 +0000 (UTC) (envelope-from example-return-0000-example=example.com@example.com)"
- [1]=>
- string(57) "(qmail 0 invoked by uid 65534); 1 Thu 2003 00:00:00 +0000"
- }
-}
-
--- Iteration 24 --
-
-Warning: iconv_mime_decode_headers() expects parameter 2 to be int, resource given in %s on line %d
-bool(false)
-Done
diff --git a/ext/iconv/tests/iconv_mime_decode_headers_variation3.phpt b/ext/iconv/tests/iconv_mime_decode_headers_variation3.phpt
deleted file mode 100644
index 1a0f7fc0c3..0000000000
--- a/ext/iconv/tests/iconv_mime_decode_headers_variation3.phpt
+++ /dev/null
@@ -1,469 +0,0 @@
---TEST--
-Test iconv_mime_encode() function : usage variations - Pass different data types to charset arg
---SKIPIF--
-<?php
-PHP_INT_SIZE == 4 or die('skip 32-bit only');
-extension_loaded('iconv') or die('skip iconv extension not loaded');
-function_exists('iconv_mime_decode_headers') or die("skip iconv_mime_decode_headers() is not available in this build");
-?>
---FILE--
-<?php
-/* Prototype : array iconv_mime_decode_headers(string headers [, int mode, string charset])
- * Description: Decodes multiple mime header fields
- * Source code: ext/iconv/iconv.c
- */
-
-/*
- * Pass different data types to $str argument to see how iconv_mime_decode_headers() behaves
- */
-
-echo "*** Testing iconv_mime_decode_headers() : usage variations ***\n";
-
-// Some of the parameters actually passed to charset will request to use
-// a default charset determined by the platform. In order for this test to
-// run on both linux and windows, the subject will have to be ascii only.
-// Initialise function arguments not being substituted
-$headers = <<<EOF
-Subject: =?UTF-8?B?QSBTYW1wbGUgVGVzdA==?=
-To: example@example.com
-Date: Thu, 1 Jan 1970 00:00:00 +0000
-Message-Id: <example@example.com>
-Received: from localhost (localhost [127.0.0.1]) by localhost
- with SMTP id example for <example@example.com>;
- Thu, 1 Jan 1970 00:00:00 +0000 (UTC)
- (envelope-from example-return-0000-example=example.com@example.com)
-Received: (qmail 0 invoked by uid 65534); 1 Thu 2003 00:00:00 +0000
-
-EOF;
-
-$mode = ICONV_MIME_DECODE_CONTINUE_ON_ERROR;
-$charset = 'UTF-8';
-
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// get a class
-class classA
-{
- public function __toString() {
- return "Class A object";
- }
-}
-
-// heredoc string
-$heredoc = <<<EOT
-hello world
-EOT;
-
-// get a resource variable
-$fp = fopen(__FILE__, "r");
-
-// unexpected values to be passed to $str argument
-$inputs = array(
-
- // int data
-/*1*/ 0,
- 1,
- 12345,
- -2345,
-
- // float data
-/*5*/ 10.5,
- -10.5,
- 12.3456789000e10,
- 12.3456789000E-10,
- .5,
-
- // null data
-/*10*/ NULL,
- null,
-
- // boolean data
-/*12*/ true,
- false,
- TRUE,
- FALSE,
-
- // empty data
-/*16*/ "",
- '',
-
- // string data
-/*18*/ "string",
- 'string',
- $heredoc,
-
- // object data
-/*21*/ new classA(),
-
- // undefined data
-/*22*/ @$undefined_var,
-
- // unset data
-/*23*/ @$unset_var,
-
- // resource variable
-/*24*/ $fp
-);
-
-// loop through each element of $inputs to check the behavior of iconv_mime_decode_headers()
-$iterator = 1;
-foreach($inputs as $input) {
- echo "\n-- Iteration $iterator --\n";
- var_dump( iconv_mime_decode_headers($headers, $input, $charset));
- $iterator++;
-};
-
-fclose($fp);
-
-echo "Done";
-?>
---EXPECTF--
-*** Testing iconv_mime_decode_headers() : usage variations ***
-
--- Iteration 1 --
-array(5) {
- ["Subject"]=>
- string(13) "A Sample Test"
- ["To"]=>
- string(19) "example@example.com"
- ["Date"]=>
- string(30) "Thu, 1 Jan 1970 00:00:00 +0000"
- ["Message-Id"]=>
- string(21) "<example@example.com>"
- ["Received"]=>
- array(2) {
- [0]=>
- string(204) "from localhost (localhost [127.0.0.1]) by localhost with SMTP id example for <example@example.com>; Thu, 1 Jan 1970 00:00:00 +0000 (UTC) (envelope-from example-return-0000-example=example.com@example.com)"
- [1]=>
- string(57) "(qmail 0 invoked by uid 65534); 1 Thu 2003 00:00:00 +0000"
- }
-}
-
--- Iteration 2 --
-array(5) {
- ["Subject"]=>
- string(13) "A Sample Test"
- ["To"]=>
- string(19) "example@example.com"
- ["Date"]=>
- string(30) "Thu, 1 Jan 1970 00:00:00 +0000"
- ["Message-Id"]=>
- string(21) "<example@example.com>"
- ["Received"]=>
- array(2) {
- [0]=>
- string(204) "from localhost (localhost [127.0.0.1]) by localhost with SMTP id example for <example@example.com>; Thu, 1 Jan 1970 00:00:00 +0000 (UTC) (envelope-from example-return-0000-example=example.com@example.com)"
- [1]=>
- string(57) "(qmail 0 invoked by uid 65534); 1 Thu 2003 00:00:00 +0000"
- }
-}
-
--- Iteration 3 --
-array(5) {
- ["Subject"]=>
- string(13) "A Sample Test"
- ["To"]=>
- string(19) "example@example.com"
- ["Date"]=>
- string(30) "Thu, 1 Jan 1970 00:00:00 +0000"
- ["Message-Id"]=>
- string(21) "<example@example.com>"
- ["Received"]=>
- array(2) {
- [0]=>
- string(204) "from localhost (localhost [127.0.0.1]) by localhost with SMTP id example for <example@example.com>; Thu, 1 Jan 1970 00:00:00 +0000 (UTC) (envelope-from example-return-0000-example=example.com@example.com)"
- [1]=>
- string(57) "(qmail 0 invoked by uid 65534); 1 Thu 2003 00:00:00 +0000"
- }
-}
-
--- Iteration 4 --
-array(5) {
- ["Subject"]=>
- string(13) "A Sample Test"
- ["To"]=>
- string(19) "example@example.com"
- ["Date"]=>
- string(30) "Thu, 1 Jan 1970 00:00:00 +0000"
- ["Message-Id"]=>
- string(21) "<example@example.com>"
- ["Received"]=>
- array(2) {
- [0]=>
- string(204) "from localhost (localhost [127.0.0.1]) by localhost with SMTP id example for <example@example.com>; Thu, 1 Jan 1970 00:00:00 +0000 (UTC) (envelope-from example-return-0000-example=example.com@example.com)"
- [1]=>
- string(57) "(qmail 0 invoked by uid 65534); 1 Thu 2003 00:00:00 +0000"
- }
-}
-
--- Iteration 5 --
-array(5) {
- ["Subject"]=>
- string(13) "A Sample Test"
- ["To"]=>
- string(19) "example@example.com"
- ["Date"]=>
- string(30) "Thu, 1 Jan 1970 00:00:00 +0000"
- ["Message-Id"]=>
- string(21) "<example@example.com>"
- ["Received"]=>
- array(2) {
- [0]=>
- string(204) "from localhost (localhost [127.0.0.1]) by localhost with SMTP id example for <example@example.com>; Thu, 1 Jan 1970 00:00:00 +0000 (UTC) (envelope-from example-return-0000-example=example.com@example.com)"
- [1]=>
- string(57) "(qmail 0 invoked by uid 65534); 1 Thu 2003 00:00:00 +0000"
- }
-}
-
--- Iteration 6 --
-array(5) {
- ["Subject"]=>
- string(13) "A Sample Test"
- ["To"]=>
- string(19) "example@example.com"
- ["Date"]=>
- string(30) "Thu, 1 Jan 1970 00:00:00 +0000"
- ["Message-Id"]=>
- string(21) "<example@example.com>"
- ["Received"]=>
- array(2) {
- [0]=>
- string(204) "from localhost (localhost [127.0.0.1]) by localhost with SMTP id example for <example@example.com>; Thu, 1 Jan 1970 00:00:00 +0000 (UTC) (envelope-from example-return-0000-example=example.com@example.com)"
- [1]=>
- string(57) "(qmail 0 invoked by uid 65534); 1 Thu 2003 00:00:00 +0000"
- }
-}
-
--- Iteration 7 --
-
-Warning: iconv_mime_decode_headers() expects parameter 2 to be int, float given in %s on line %d
-bool(false)
-
--- Iteration 8 --
-array(5) {
- ["Subject"]=>
- string(13) "A Sample Test"
- ["To"]=>
- string(19) "example@example.com"
- ["Date"]=>
- string(30) "Thu, 1 Jan 1970 00:00:00 +0000"
- ["Message-Id"]=>
- string(21) "<example@example.com>"
- ["Received"]=>
- array(2) {
- [0]=>
- string(204) "from localhost (localhost [127.0.0.1]) by localhost with SMTP id example for <example@example.com>; Thu, 1 Jan 1970 00:00:00 +0000 (UTC) (envelope-from example-return-0000-example=example.com@example.com)"
- [1]=>
- string(57) "(qmail 0 invoked by uid 65534); 1 Thu 2003 00:00:00 +0000"
- }
-}
-
--- Iteration 9 --
-array(5) {
- ["Subject"]=>
- string(13) "A Sample Test"
- ["To"]=>
- string(19) "example@example.com"
- ["Date"]=>
- string(30) "Thu, 1 Jan 1970 00:00:00 +0000"
- ["Message-Id"]=>
- string(21) "<example@example.com>"
- ["Received"]=>
- array(2) {
- [0]=>
- string(204) "from localhost (localhost [127.0.0.1]) by localhost with SMTP id example for <example@example.com>; Thu, 1 Jan 1970 00:00:00 +0000 (UTC) (envelope-from example-return-0000-example=example.com@example.com)"
- [1]=>
- string(57) "(qmail 0 invoked by uid 65534); 1 Thu 2003 00:00:00 +0000"
- }
-}
-
--- Iteration 10 --
-array(5) {
- ["Subject"]=>
- string(13) "A Sample Test"
- ["To"]=>
- string(19) "example@example.com"
- ["Date"]=>
- string(30) "Thu, 1 Jan 1970 00:00:00 +0000"
- ["Message-Id"]=>
- string(21) "<example@example.com>"
- ["Received"]=>
- array(2) {
- [0]=>
- string(204) "from localhost (localhost [127.0.0.1]) by localhost with SMTP id example for <example@example.com>; Thu, 1 Jan 1970 00:00:00 +0000 (UTC) (envelope-from example-return-0000-example=example.com@example.com)"
- [1]=>
- string(57) "(qmail 0 invoked by uid 65534); 1 Thu 2003 00:00:00 +0000"
- }
-}
-
--- Iteration 11 --
-array(5) {
- ["Subject"]=>
- string(13) "A Sample Test"
- ["To"]=>
- string(19) "example@example.com"
- ["Date"]=>
- string(30) "Thu, 1 Jan 1970 00:00:00 +0000"
- ["Message-Id"]=>
- string(21) "<example@example.com>"
- ["Received"]=>
- array(2) {
- [0]=>
- string(204) "from localhost (localhost [127.0.0.1]) by localhost with SMTP id example for <example@example.com>; Thu, 1 Jan 1970 00:00:00 +0000 (UTC) (envelope-from example-return-0000-example=example.com@example.com)"
- [1]=>
- string(57) "(qmail 0 invoked by uid 65534); 1 Thu 2003 00:00:00 +0000"
- }
-}
-
--- Iteration 12 --
-array(5) {
- ["Subject"]=>
- string(13) "A Sample Test"
- ["To"]=>
- string(19) "example@example.com"
- ["Date"]=>
- string(30) "Thu, 1 Jan 1970 00:00:00 +0000"
- ["Message-Id"]=>
- string(21) "<example@example.com>"
- ["Received"]=>
- array(2) {
- [0]=>
- string(204) "from localhost (localhost [127.0.0.1]) by localhost with SMTP id example for <example@example.com>; Thu, 1 Jan 1970 00:00:00 +0000 (UTC) (envelope-from example-return-0000-example=example.com@example.com)"
- [1]=>
- string(57) "(qmail 0 invoked by uid 65534); 1 Thu 2003 00:00:00 +0000"
- }
-}
-
--- Iteration 13 --
-array(5) {
- ["Subject"]=>
- string(13) "A Sample Test"
- ["To"]=>
- string(19) "example@example.com"
- ["Date"]=>
- string(30) "Thu, 1 Jan 1970 00:00:00 +0000"
- ["Message-Id"]=>
- string(21) "<example@example.com>"
- ["Received"]=>
- array(2) {
- [0]=>
- string(204) "from localhost (localhost [127.0.0.1]) by localhost with SMTP id example for <example@example.com>; Thu, 1 Jan 1970 00:00:00 +0000 (UTC) (envelope-from example-return-0000-example=example.com@example.com)"
- [1]=>
- string(57) "(qmail 0 invoked by uid 65534); 1 Thu 2003 00:00:00 +0000"
- }
-}
-
--- Iteration 14 --
-array(5) {
- ["Subject"]=>
- string(13) "A Sample Test"
- ["To"]=>
- string(19) "example@example.com"
- ["Date"]=>
- string(30) "Thu, 1 Jan 1970 00:00:00 +0000"
- ["Message-Id"]=>
- string(21) "<example@example.com>"
- ["Received"]=>
- array(2) {
- [0]=>
- string(204) "from localhost (localhost [127.0.0.1]) by localhost with SMTP id example for <example@example.com>; Thu, 1 Jan 1970 00:00:00 +0000 (UTC) (envelope-from example-return-0000-example=example.com@example.com)"
- [1]=>
- string(57) "(qmail 0 invoked by uid 65534); 1 Thu 2003 00:00:00 +0000"
- }
-}
-
--- Iteration 15 --
-array(5) {
- ["Subject"]=>
- string(13) "A Sample Test"
- ["To"]=>
- string(19) "example@example.com"
- ["Date"]=>
- string(30) "Thu, 1 Jan 1970 00:00:00 +0000"
- ["Message-Id"]=>
- string(21) "<example@example.com>"
- ["Received"]=>
- array(2) {
- [0]=>
- string(204) "from localhost (localhost [127.0.0.1]) by localhost with SMTP id example for <example@example.com>; Thu, 1 Jan 1970 00:00:00 +0000 (UTC) (envelope-from example-return-0000-example=example.com@example.com)"
- [1]=>
- string(57) "(qmail 0 invoked by uid 65534); 1 Thu 2003 00:00:00 +0000"
- }
-}
-
--- Iteration 16 --
-
-Warning: iconv_mime_decode_headers() expects parameter 2 to be int, string given in %s on line %d
-bool(false)
-
--- Iteration 17 --
-
-Warning: iconv_mime_decode_headers() expects parameter 2 to be int, string given in %s on line %d
-bool(false)
-
--- Iteration 18 --
-
-Warning: iconv_mime_decode_headers() expects parameter 2 to be int, string given in %s on line %d
-bool(false)
-
--- Iteration 19 --
-
-Warning: iconv_mime_decode_headers() expects parameter 2 to be int, string given in %s on line %d
-bool(false)
-
--- Iteration 20 --
-
-Warning: iconv_mime_decode_headers() expects parameter 2 to be int, string given in %s on line %d
-bool(false)
-
--- Iteration 21 --
-
-Warning: iconv_mime_decode_headers() expects parameter 2 to be int, object given in %s on line %d
-bool(false)
-
--- Iteration 22 --
-array(5) {
- ["Subject"]=>
- string(13) "A Sample Test"
- ["To"]=>
- string(19) "example@example.com"
- ["Date"]=>
- string(30) "Thu, 1 Jan 1970 00:00:00 +0000"
- ["Message-Id"]=>
- string(21) "<example@example.com>"
- ["Received"]=>
- array(2) {
- [0]=>
- string(204) "from localhost (localhost [127.0.0.1]) by localhost with SMTP id example for <example@example.com>; Thu, 1 Jan 1970 00:00:00 +0000 (UTC) (envelope-from example-return-0000-example=example.com@example.com)"
- [1]=>
- string(57) "(qmail 0 invoked by uid 65534); 1 Thu 2003 00:00:00 +0000"
- }
-}
-
--- Iteration 23 --
-array(5) {
- ["Subject"]=>
- string(13) "A Sample Test"
- ["To"]=>
- string(19) "example@example.com"
- ["Date"]=>
- string(30) "Thu, 1 Jan 1970 00:00:00 +0000"
- ["Message-Id"]=>
- string(21) "<example@example.com>"
- ["Received"]=>
- array(2) {
- [0]=>
- string(204) "from localhost (localhost [127.0.0.1]) by localhost with SMTP id example for <example@example.com>; Thu, 1 Jan 1970 00:00:00 +0000 (UTC) (envelope-from example-return-0000-example=example.com@example.com)"
- [1]=>
- string(57) "(qmail 0 invoked by uid 65534); 1 Thu 2003 00:00:00 +0000"
- }
-}
-
--- Iteration 24 --
-
-Warning: iconv_mime_decode_headers() expects parameter 2 to be int, resource given in %s on line %d
-bool(false)
-Done
diff --git a/ext/iconv/tests/iconv_mime_decode_variation1.phpt b/ext/iconv/tests/iconv_mime_decode_variation1.phpt
deleted file mode 100644
index e169b4ead5..0000000000
--- a/ext/iconv/tests/iconv_mime_decode_variation1.phpt
+++ /dev/null
@@ -1,183 +0,0 @@
---TEST--
-Test iconv_mime_decode() function : usage variations - Pass different data types to header arg
---SKIPIF--
-<?php
-extension_loaded('iconv') or die('skip');
-function_exists('iconv_mime_decode') or die("skip iconv_mime_decode() is not available in this build");
-?>
---FILE--
-<?php
-/* Prototype : string iconv_mime_decode(string encoded_string [, int mode, string charset])
- * Description: Decodes a mime header field
- * Source code: ext/iconv/iconv.c
- */
-
-/*
- * Pass different data types to $str argument to see how iconv_mime_decode() behaves
- */
-
-echo "*** Testing iconv_mime_decode() : usage variations ***\n";
-
-// Initialise function arguments not being substituted
-$header = 'Subject: =?UTF-8?B?UHLDvGZ1bmcgUHLDvGZ1bmc=?=';
-$mode = ICONV_MIME_DECODE_CONTINUE_ON_ERROR;
-$charset = 'ISO-8859-1';
-
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// get a class
-class classA
-{
- public function __toString() {
- return "Class A object";
- }
-}
-
-// heredoc string
-$heredoc = <<<EOT
-hello world
-EOT;
-
-// get a resource variable
-$fp = fopen(__FILE__, "r");
-
-// unexpected values to be passed to $str argument
-$inputs = array(
-
- // int data
-/*1*/ 0,
- 1,
- 12345,
- -2345,
-
- // float data
-/*5*/ 10.5,
- -10.5,
- 12.3456789000e10,
- 12.3456789000E-10,
- .5,
-
- // null data
-/*10*/ NULL,
- null,
-
- // boolean data
-/*12*/ true,
- false,
- TRUE,
- FALSE,
-
- // empty data
-/*16*/ "",
- '',
-
- // string data
-/*18*/ "string",
- 'string',
- $heredoc,
-
- // object data
-/*21*/ new classA(),
-
- // undefined data
-/*22*/ @$undefined_var,
-
- // unset data
-/*23*/ @$unset_var,
-
- // resource variable
-/*24*/ $fp
-);
-
-// loop through each element of $inputs to check the behavior of iconv_mime_decode()
-$iterator = 1;
-foreach($inputs as $input) {
- echo "\n-- Iteration $iterator --\n";
- var_dump( iconv_mime_decode($input, $mode, $charset));
- $iterator++;
-};
-
-fclose($fp);
-
-echo "Done";
-?>
---EXPECTF--
-*** Testing iconv_mime_decode() : usage variations ***
-
--- Iteration 1 --
-string(1) "0"
-
--- Iteration 2 --
-string(1) "1"
-
--- Iteration 3 --
-string(5) "12345"
-
--- Iteration 4 --
-string(5) "-2345"
-
--- Iteration 5 --
-string(4) "10.5"
-
--- Iteration 6 --
-string(5) "-10.5"
-
--- Iteration 7 --
-string(12) "123456789000"
-
--- Iteration 8 --
-string(13) "1.23456789E-9"
-
--- Iteration 9 --
-string(3) "0.5"
-
--- Iteration 10 --
-string(0) ""
-
--- Iteration 11 --
-string(0) ""
-
--- Iteration 12 --
-string(1) "1"
-
--- Iteration 13 --
-string(0) ""
-
--- Iteration 14 --
-string(1) "1"
-
--- Iteration 15 --
-string(0) ""
-
--- Iteration 16 --
-string(0) ""
-
--- Iteration 17 --
-string(0) ""
-
--- Iteration 18 --
-string(6) "string"
-
--- Iteration 19 --
-string(6) "string"
-
--- Iteration 20 --
-string(11) "hello world"
-
--- Iteration 21 --
-string(14) "Class A object"
-
--- Iteration 22 --
-string(0) ""
-
--- Iteration 23 --
-string(0) ""
-
--- Iteration 24 --
-
-Warning: iconv_mime_decode() expects parameter 1 to be string, resource given in %s on line %d
-bool(false)
-Done
diff --git a/ext/iconv/tests/iconv_mime_decode_variation2.phpt b/ext/iconv/tests/iconv_mime_decode_variation2.phpt
deleted file mode 100644
index 3e67d8aa28..0000000000
--- a/ext/iconv/tests/iconv_mime_decode_variation2.phpt
+++ /dev/null
@@ -1,198 +0,0 @@
---TEST--
-Test iconv_mime_decode() function : usage variations - Pass different data types to mode arg
---SKIPIF--
-<?php
-PHP_INT_SIZE == 4 or die('skip 32-bit only');
-extension_loaded('iconv') or die('skip iconv extension not loaded');
-function_exists('iconv_mime_decode') or die("skip iconv_mime_decode() is not available in this build");
-?>
---FILE--
-<?php
-/* Prototype : string iconv_mime_decode(string encoded_string [, int mode, string charset])
- * Description: Decodes a mime header field
- * Source code: ext/iconv/iconv.c
- */
-
-/*
- * Pass different data types to $str argument to see how iconv_mime_decode() behaves
- */
-
-echo "*** Testing iconv_mime_decode() : usage variations ***\n";
-
-// Initialise function arguments not being substituted
-$header = 'Subject: =?UTF-8?B?UHLDvGZ1bmcgUHLDvGZ1bmc=?=';
-$mode = ICONV_MIME_DECODE_CONTINUE_ON_ERROR;
-$charset = 'UTF-8';
-
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// get a class
-class classA
-{
- public function __toString() {
- return "Class A object";
- }
-}
-
-// heredoc string
-$heredoc = <<<EOT
-hello world
-EOT;
-
-// get a resource variable
-$fp = fopen(__FILE__, "r");
-
-// unexpected values to be passed to $str argument
-$inputs = array(
-
- // int data
-/*1*/ 0,
- 1,
- 12345,
- -2345,
-
- // float data
-/*5*/ 10.5,
- -10.5,
- 12.3456789000e10,
- 12.3456789000E-10,
- .5,
-
- // null data
-/*10*/ NULL,
- null,
-
- // boolean data
-/*12*/ true,
- false,
- TRUE,
- FALSE,
-
- // empty data
-/*16*/ "",
- '',
-
- // string data
-/*18*/ "string",
- 'string',
- $heredoc,
-
- // object data
-/*21*/ new classA(),
-
- // undefined data
-/*22*/ @$undefined_var,
-
- // unset data
-/*23*/ @$unset_var,
-
- // resource variable
-/*24*/ $fp
-);
-
-// loop through each element of $inputs to check the behavior of iconv_mime_decode()
-$iterator = 1;
-foreach($inputs as $input) {
- echo "\n-- Iteration $iterator --\n";
- var_dump( bin2hex(iconv_mime_decode($header, $input, $charset)));
- $iterator++;
-};
-
-fclose($fp);
-
-echo "Done";
-?>
---EXPECTF--
-*** Testing iconv_mime_decode() : usage variations ***
-
--- Iteration 1 --
-string(52) "5375626a6563743a205072c3bc66756e67205072c3bc66756e67"
-
--- Iteration 2 --
-string(52) "5375626a6563743a205072c3bc66756e67205072c3bc66756e67"
-
--- Iteration 3 --
-string(52) "5375626a6563743a205072c3bc66756e67205072c3bc66756e67"
-
--- Iteration 4 --
-string(52) "5375626a6563743a205072c3bc66756e67205072c3bc66756e67"
-
--- Iteration 5 --
-string(52) "5375626a6563743a205072c3bc66756e67205072c3bc66756e67"
-
--- Iteration 6 --
-string(52) "5375626a6563743a205072c3bc66756e67205072c3bc66756e67"
-
--- Iteration 7 --
-
-Warning: iconv_mime_decode() expects parameter 2 to be int, float given in %s on line %d
-string(0) ""
-
--- Iteration 8 --
-string(52) "5375626a6563743a205072c3bc66756e67205072c3bc66756e67"
-
--- Iteration 9 --
-string(52) "5375626a6563743a205072c3bc66756e67205072c3bc66756e67"
-
--- Iteration 10 --
-string(52) "5375626a6563743a205072c3bc66756e67205072c3bc66756e67"
-
--- Iteration 11 --
-string(52) "5375626a6563743a205072c3bc66756e67205072c3bc66756e67"
-
--- Iteration 12 --
-string(52) "5375626a6563743a205072c3bc66756e67205072c3bc66756e67"
-
--- Iteration 13 --
-string(52) "5375626a6563743a205072c3bc66756e67205072c3bc66756e67"
-
--- Iteration 14 --
-string(52) "5375626a6563743a205072c3bc66756e67205072c3bc66756e67"
-
--- Iteration 15 --
-string(52) "5375626a6563743a205072c3bc66756e67205072c3bc66756e67"
-
--- Iteration 16 --
-
-Warning: iconv_mime_decode() expects parameter 2 to be int, string given in %s on line %d
-string(0) ""
-
--- Iteration 17 --
-
-Warning: iconv_mime_decode() expects parameter 2 to be int, string given in %s on line %d
-string(0) ""
-
--- Iteration 18 --
-
-Warning: iconv_mime_decode() expects parameter 2 to be int, string given in %s on line %d
-string(0) ""
-
--- Iteration 19 --
-
-Warning: iconv_mime_decode() expects parameter 2 to be int, string given in %s on line %d
-string(0) ""
-
--- Iteration 20 --
-
-Warning: iconv_mime_decode() expects parameter 2 to be int, string given in %s on line %d
-string(0) ""
-
--- Iteration 21 --
-
-Warning: iconv_mime_decode() expects parameter 2 to be int, object given in %s on line %d
-string(0) ""
-
--- Iteration 22 --
-string(52) "5375626a6563743a205072c3bc66756e67205072c3bc66756e67"
-
--- Iteration 23 --
-string(52) "5375626a6563743a205072c3bc66756e67205072c3bc66756e67"
-
--- Iteration 24 --
-
-Warning: iconv_mime_decode() expects parameter 2 to be int, resource given in %s on line %d
-string(0) ""
-Done
diff --git a/ext/iconv/tests/iconv_mime_decode_variation3.phpt b/ext/iconv/tests/iconv_mime_decode_variation3.phpt
deleted file mode 100644
index 9d62320b03..0000000000
--- a/ext/iconv/tests/iconv_mime_decode_variation3.phpt
+++ /dev/null
@@ -1,222 +0,0 @@
---TEST--
-Test iconv_mime_decode() function : usage variations - Pass different data types to charset arg
---SKIPIF--
-<?php
-extension_loaded('iconv') or die('skip');
-function_exists('iconv_mime_decode') or die("skip iconv_mime_decode() is not available in this build");
-?>
---FILE--
-<?php
-/* Prototype : string iconv_mime_decode(string encoded_string [, int mode, string charset])
- * Description: Decodes a mime header field
- * Source code: ext/iconv/iconv.c
- */
-
-/*
- * Pass different data types to $str argument to see how iconv_mime_decode() behaves
- */
-
-echo "*** Testing iconv_mime_decode() : usage variations ***\n";
-
-// Initialise function arguments not being substituted
-// Some of the parameters actually passed to charset will request to use
-// a default charset determined by the platform. In order for this test to
-// run on both linux and windows, the subject will have to be ascii only.
-$header = 'Subject: =?UTF-8?B?QSBTYW1wbGUgVGVzdA==?=';
-$mode = ICONV_MIME_DECODE_CONTINUE_ON_ERROR;
-$charset = 'UTF-8';
-
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// get a class
-class classA
-{
- public function __toString() {
- return "Class A object";
- }
-}
-
-// heredoc string
-$heredoc = <<<EOT
-hello world
-EOT;
-
-// get a resource variable
-$fp = fopen(__FILE__, "r");
-
-// unexpected values to be passed to $str argument
-$inputs = array(
-
- // int data
-/*1*/ 0,
- 1,
- 12345,
- -2345,
-
- // float data
-/*5*/ 10.5,
- -10.5,
- 12.3456789000e10,
- 12.3456789000E-10,
- .5,
-
- // null data
-/*10*/ NULL,
- null,
-
- // boolean data
-/*12*/ true,
- false,
- TRUE,
- FALSE,
-
- // empty data
-/*16*/ "",
- '',
-
- // string data
-/*18*/ "string",
- 'string',
- $heredoc,
-
- // object data
-/*21*/ new classA(),
-
- // undefined data
-/*22*/ @$undefined_var,
-
- // unset data
-/*23*/ @$unset_var,
-
- // resource variable
-/*24*/ $fp
-);
-
-// loop through each element of $inputs to check the behavior of iconv_mime_decode()
-$iterator = 1;
-foreach($inputs as $input) {
- echo "\n-- Iteration $iterator --\n";
- $res = iconv_mime_decode($header, $mode, $input);
- if ($res !== false) {
- var_dump(bin2hex($res));
- }
- else {
- var_dump($res);
- }
- $iterator++;
-};
-
-fclose($fp);
-
-echo "Done";
-?>
---EXPECTF--
-*** Testing iconv_mime_decode() : usage variations ***
-
--- Iteration 1 --
-
-Notice: iconv_mime_decode(): Wrong charset, conversion from `???' to `0' is not allowed in %s on line %d
-bool(false)
-
--- Iteration 2 --
-
-Notice: iconv_mime_decode(): Wrong charset, conversion from `???' to `1' is not allowed in %s on line %d
-bool(false)
-
--- Iteration 3 --
-
-Notice: iconv_mime_decode(): Wrong charset, conversion from `???' to `12345' is not allowed in %s on line %d
-bool(false)
-
--- Iteration 4 --
-
-Notice: iconv_mime_decode(): Wrong charset, conversion from `???' to `-2345' is not allowed in %s on line %d
-bool(false)
-
--- Iteration 5 --
-
-Notice: iconv_mime_decode(): Wrong charset, conversion from `???' to `10.5' is not allowed in %s on line %d
-bool(false)
-
--- Iteration 6 --
-
-Notice: iconv_mime_decode(): Wrong charset, conversion from `???' to `-10.5' is not allowed in %s on line %d
-bool(false)
-
--- Iteration 7 --
-
-Notice: iconv_mime_decode(): Wrong charset, conversion from `???' to `123456789000' is not allowed in %s on line %d
-bool(false)
-
--- Iteration 8 --
-
-Notice: iconv_mime_decode(): Wrong charset, conversion from `???' to `1.23456789E-9' is not allowed in %s on line %d
-bool(false)
-
--- Iteration 9 --
-
-Notice: iconv_mime_decode(): Wrong charset, conversion from `???' to `0.5' is not allowed in %s on line %d
-bool(false)
-
--- Iteration 10 --
-string(44) "5375626a6563743a20412053616d706c652054657374"
-
--- Iteration 11 --
-string(44) "5375626a6563743a20412053616d706c652054657374"
-
--- Iteration 12 --
-
-Notice: iconv_mime_decode(): Wrong charset, conversion from `???' to `1' is not allowed in %s on line %d
-bool(false)
-
--- Iteration 13 --
-string(44) "5375626a6563743a20412053616d706c652054657374"
-
--- Iteration 14 --
-
-Notice: iconv_mime_decode(): Wrong charset, conversion from `???' to `1' is not allowed in %s on line %d
-bool(false)
-
--- Iteration 15 --
-string(44) "5375626a6563743a20412053616d706c652054657374"
-
--- Iteration 16 --
-string(44) "5375626a6563743a20412053616d706c652054657374"
-
--- Iteration 17 --
-string(44) "5375626a6563743a20412053616d706c652054657374"
-
--- Iteration 18 --
-
-Notice: iconv_mime_decode(): Wrong charset, conversion from `???' to `string' is not allowed in %s on line %d
-bool(false)
-
--- Iteration 19 --
-
-Notice: iconv_mime_decode(): Wrong charset, conversion from `???' to `string' is not allowed in %s on line %d
-bool(false)
-
--- Iteration 20 --
-
-Notice: iconv_mime_decode(): Wrong charset, conversion from `???' to `hello world' is not allowed in %s on line %d
-bool(false)
-
--- Iteration 21 --
-
-Notice: iconv_mime_decode(): Wrong charset, conversion from `???' to `Class A object' is not allowed in %s on line %d
-bool(false)
-
--- Iteration 22 --
-string(44) "5375626a6563743a20412053616d706c652054657374"
-
--- Iteration 23 --
-string(44) "5375626a6563743a20412053616d706c652054657374"
-
--- Iteration 24 --
-
-Warning: iconv_mime_decode() expects parameter 3 to be string, resource given in %s on line %d
-bool(false)
-Done
diff --git a/ext/iconv/tests/iconv_set_encoding_error.phpt b/ext/iconv/tests/iconv_set_encoding_error.phpt
deleted file mode 100644
index 1a3179afea..0000000000
--- a/ext/iconv/tests/iconv_set_encoding_error.phpt
+++ /dev/null
@@ -1,177 +0,0 @@
---TEST--
-Test iconv_set_encoding() function : basic functionality
---SKIPIF--
-<?php
-extension_loaded('iconv') or die('skip');
-function_exists('iconv_set_encoding') or die("skip iconv_set_encoding() is not available in this build");
-?>
---FILE--
-<?php
-/* Prototype : bool iconv_set_encoding(string type, string charset)
- * Description: Sets internal encoding and output encoding for ob_iconv_handler()
- * Source code: ext/iconv/iconv.c
- */
-
-/*
- * Test Error functionality of iconv_get_encoding
- */
-
-echo "*** Testing iconv_set_encoding() : error functionality ***\n";
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// get a class
-class classA
-{
- public function __toString() {
- return "UTF-8";
- }
-}
-
-// heredoc string
-$heredoc = <<<EOT
-Nothing
-EOT;
-
-// get a resource variable
-$fp = fopen(__FILE__, "r");
-
-// unexpected values to be passed to $encoding argument
-$inputs = array(
-
- // int data
-/*1*/ 0,
- 1,
- 12345,
- -2345,
-
- // float data
-/*5*/ 10.5,
- -10.5,
- 12.3456789000e10,
- 12.3456789000E-10,
- .5,
-
- // null data
-/*10*/ NULL,
- null,
-
- // boolean data
-/*12*/ true,
- false,
- TRUE,
- FALSE,
-
- // empty data
-/*16*/ "",
- '',
-
- // invalid string data
-/*18*/ "Nothing",
- 'Nothing',
- $heredoc,
-
- // object data
-/*21*/ new classA(),
-
- // undefined data
-/*22*/ @$undefined_var,
-
- // unset data
-/*23*/ @$unset_var,
-
- // resource variable
-/*24*/ $fp
-);
-
-// loop through each element of $inputs to check the behavior of mb_regex_encoding()
-$iterator = 1;
-foreach($inputs as $input) {
- echo "\n-- Iteration $iterator --\n";
- var_dump( iconv_set_encoding($input, "UTF-8") );
- $iterator++;
-};
-
-fclose($fp);
-
-echo "Done";
-?>
---EXPECTF--
-*** Testing iconv_set_encoding() : error functionality ***
-
--- Iteration 1 --
-bool(false)
-
--- Iteration 2 --
-bool(false)
-
--- Iteration 3 --
-bool(false)
-
--- Iteration 4 --
-bool(false)
-
--- Iteration 5 --
-bool(false)
-
--- Iteration 6 --
-bool(false)
-
--- Iteration 7 --
-bool(false)
-
--- Iteration 8 --
-bool(false)
-
--- Iteration 9 --
-bool(false)
-
--- Iteration 10 --
-bool(false)
-
--- Iteration 11 --
-bool(false)
-
--- Iteration 12 --
-bool(false)
-
--- Iteration 13 --
-bool(false)
-
--- Iteration 14 --
-bool(false)
-
--- Iteration 15 --
-bool(false)
-
--- Iteration 16 --
-bool(false)
-
--- Iteration 17 --
-bool(false)
-
--- Iteration 18 --
-bool(false)
-
--- Iteration 19 --
-bool(false)
-
--- Iteration 20 --
-bool(false)
-
--- Iteration 21 --
-bool(false)
-
--- Iteration 22 --
-bool(false)
-
--- Iteration 23 --
-bool(false)
-
--- Iteration 24 --
-
-Warning: iconv_set_encoding() expects parameter 1 to be string, resource given in %s on line %d
-NULL
-Done
diff --git a/ext/iconv/tests/iconv_set_encoding_variation.phpt b/ext/iconv/tests/iconv_set_encoding_variation.phpt
deleted file mode 100644
index 62020063d8..0000000000
--- a/ext/iconv/tests/iconv_set_encoding_variation.phpt
+++ /dev/null
@@ -1,309 +0,0 @@
---TEST--
-Test iconv_set_encoding() function : error functionality
---SKIPIF--
-<?php
-extension_loaded('iconv') or die('skip');
-function_exists('iconv_set_encoding') or die("skip iconv_set_encoding() is not available in this build");
-?>
---INI--
-error_reporting=E_ALL & ~E_DEPRECATED
---FILE--
-<?php
-/* Prototype : bool iconv_set_encoding(string type, string charset)
- * Description: Sets internal encoding and output encoding for ob_iconv_handler()
- * Source code: ext/iconv/iconv.c
- */
-
-/*
- * Test Error functionality of iconv_get_encoding
- */
-
-echo "*** Testing iconv_set_encoding() : error functionality ***\n";
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// get a class
-class classA
-{
- public function __toString() {
- return "UTF-8";
- }
-}
-
-// heredoc string
-$heredoc = <<<EOT
-Nothing
-EOT;
-
-// get a resource variable
-$fp = fopen(__FILE__, "r");
-
-// unexpected values to be passed to $encoding argument
-$inputs = array(
-
- // int data
-/*1*/ 0,
- 1,
- 12345,
- -2345,
-
- // float data
-/*5*/ 10.5,
- -10.5,
- 12.3456789000e10,
- 12.3456789000E-10,
- .5,
-
- // null data
-/*10*/ NULL,
- null,
-
- // boolean data
-/*12*/ true,
- false,
- TRUE,
- FALSE,
-
- // empty data
-/*16*/ "",
- '',
-
- // invalid string data
-/*18*/ "Nothing",
- 'Nothing',
- $heredoc,
-
- // object data
-/*21*/ new classA(),
-
- // undefined data
-/*22*/ @$undefined_var,
-
- // unset data
-/*23*/ @$unset_var,
-
- // resource variable
-/*24*/ $fp
-);
-
-// loop through each element of $inputs to check the behavior of mb_regex_encoding()
-$iterator = 1;
-foreach($inputs as $input) {
- echo "\n-- Iteration $iterator --\n";
- var_dump( iconv_set_encoding("internal_encoding", $input) );
- var_dump( iconv_set_encoding("input_encoding", $input) );
- var_dump( iconv_set_encoding("output_encoding", $input) );
- var_dump( iconv_get_encoding("internal_encoding") );
- var_dump( iconv_get_encoding("input_encoding") );
- var_dump( iconv_get_encoding("output_encoding") );
-
- $iterator++;
-};
-
-fclose($fp);
-
-echo "Done";
-?>
---EXPECTF--
-*** Testing iconv_set_encoding() : error functionality ***
-
--- Iteration 1 --
-bool(true)
-bool(true)
-bool(true)
-string(1) "0"
-string(1) "0"
-string(1) "0"
-
--- Iteration 2 --
-bool(true)
-bool(true)
-bool(true)
-string(1) "1"
-string(1) "1"
-string(1) "1"
-
--- Iteration 3 --
-bool(true)
-bool(true)
-bool(true)
-string(5) "12345"
-string(5) "12345"
-string(5) "12345"
-
--- Iteration 4 --
-bool(true)
-bool(true)
-bool(true)
-string(5) "-2345"
-string(5) "-2345"
-string(5) "-2345"
-
--- Iteration 5 --
-bool(true)
-bool(true)
-bool(true)
-string(4) "10.5"
-string(4) "10.5"
-string(4) "10.5"
-
--- Iteration 6 --
-bool(true)
-bool(true)
-bool(true)
-string(5) "-10.5"
-string(5) "-10.5"
-string(5) "-10.5"
-
--- Iteration 7 --
-bool(true)
-bool(true)
-bool(true)
-string(12) "123456789000"
-string(12) "123456789000"
-string(12) "123456789000"
-
--- Iteration 8 --
-bool(true)
-bool(true)
-bool(true)
-string(13) "1.23456789E-9"
-string(13) "1.23456789E-9"
-string(13) "1.23456789E-9"
-
--- Iteration 9 --
-bool(true)
-bool(true)
-bool(true)
-string(3) "0.5"
-string(3) "0.5"
-string(3) "0.5"
-
--- Iteration 10 --
-bool(true)
-bool(true)
-bool(true)
-string(5) "UTF-8"
-string(5) "UTF-8"
-string(5) "UTF-8"
-
--- Iteration 11 --
-bool(true)
-bool(true)
-bool(true)
-string(5) "UTF-8"
-string(5) "UTF-8"
-string(5) "UTF-8"
-
--- Iteration 12 --
-bool(true)
-bool(true)
-bool(true)
-string(1) "1"
-string(1) "1"
-string(1) "1"
-
--- Iteration 13 --
-bool(true)
-bool(true)
-bool(true)
-string(5) "UTF-8"
-string(5) "UTF-8"
-string(5) "UTF-8"
-
--- Iteration 14 --
-bool(true)
-bool(true)
-bool(true)
-string(1) "1"
-string(1) "1"
-string(1) "1"
-
--- Iteration 15 --
-bool(true)
-bool(true)
-bool(true)
-string(5) "UTF-8"
-string(5) "UTF-8"
-string(5) "UTF-8"
-
--- Iteration 16 --
-bool(true)
-bool(true)
-bool(true)
-string(5) "UTF-8"
-string(5) "UTF-8"
-string(5) "UTF-8"
-
--- Iteration 17 --
-bool(true)
-bool(true)
-bool(true)
-string(5) "UTF-8"
-string(5) "UTF-8"
-string(5) "UTF-8"
-
--- Iteration 18 --
-bool(true)
-bool(true)
-bool(true)
-string(7) "Nothing"
-string(7) "Nothing"
-string(7) "Nothing"
-
--- Iteration 19 --
-bool(true)
-bool(true)
-bool(true)
-string(7) "Nothing"
-string(7) "Nothing"
-string(7) "Nothing"
-
--- Iteration 20 --
-bool(true)
-bool(true)
-bool(true)
-string(7) "Nothing"
-string(7) "Nothing"
-string(7) "Nothing"
-
--- Iteration 21 --
-bool(true)
-bool(true)
-bool(true)
-string(5) "UTF-8"
-string(5) "UTF-8"
-string(5) "UTF-8"
-
--- Iteration 22 --
-bool(true)
-bool(true)
-bool(true)
-string(5) "UTF-8"
-string(5) "UTF-8"
-string(5) "UTF-8"
-
--- Iteration 23 --
-bool(true)
-bool(true)
-bool(true)
-string(5) "UTF-8"
-string(5) "UTF-8"
-string(5) "UTF-8"
-
--- Iteration 24 --
-
-Warning: iconv_set_encoding() expects parameter 2 to be string, resource given in %s on line %d
-NULL
-
-Warning: iconv_set_encoding() expects parameter 2 to be string, resource given in %s on line %d
-NULL
-
-Warning: iconv_set_encoding() expects parameter 2 to be string, resource given in %s on line %d
-NULL
-string(5) "UTF-8"
-string(5) "UTF-8"
-string(5) "UTF-8"
-Done
diff --git a/ext/iconv/tests/iconv_strlen_variation1.phpt b/ext/iconv/tests/iconv_strlen_variation1.phpt
deleted file mode 100644
index d6edf5b86d..0000000000
--- a/ext/iconv/tests/iconv_strlen_variation1.phpt
+++ /dev/null
@@ -1,193 +0,0 @@
---TEST--
-Test iconv_strlen() function : usage variations - Pass different data types as $str arg
---SKIPIF--
-<?php
-extension_loaded('iconv') or die('skip');
-function_exists('iconv_strlen') or die("skip iconv_strlen() is not available in this build");
-?>
---FILE--
-<?php
-/* Prototype : int iconv_strlen(string str [, string charset])
- * Description: Get character numbers of a string
- * Source code: ext/iconv/iconv.c
- */
-
-/*
- * Test iconv_strlen by passing different data types as $str argument
- */
-
-echo "*** Testing iconv_strlen() : usage variations ***\n";
-
-// Initialise function arguments not being substituted
-$encoding = 'utf-8';
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// get a class
-class classA
-{
- public function __toString() {
- return "Class A object";
- }
-}
-
-// heredoc string
-$heredoc = <<<EOT
-hello world
-EOT;
-
-// get a resource variable
-$fp = fopen(__FILE__, "r");
-
-// unexpected values to be passed to $str argument
-$inputs = array(
-
- // int data
-/*1*/
- 'int 0' => 0,
- 'int 1' => 1,
- 'int 12345' => 12345,
- 'int -12345' => -12345,
-
- // float data
-/*5*/
- 'float 10.5' => 10.5,
- 'float -10.5' => -10.5,
- 'float 12.3456789000e10' => 12.3456789000e10,
- 'float 12.3456789000e-10' => 12.3456789000e-10,
- 'float .5' => .5,
-
- // null data
-/*10*/
- 'uppercase NULL' => NULL,
- 'lowercase null' => null,
-
- // boolean data
-/*12*/
- 'lowercase true' => true,
- 'lowercase false' =>false,
- 'uppercase TRUE' =>TRUE,
- 'uppercase FALSE' =>FALSE,
-
- // empty data
-/*16*/
- 'empty string DQ' => "",
- 'empty string SQ' => '',
-
- // string data
-/*18*/
- 'string DQ' => "string",
- 'string SQ' => 'string',
- 'mixed case string' => "sTrInG",
- 'heredoc' => $heredoc,
-
- // object data
-/*21*/
- 'instance of class' => new classA(),
-
- // undefined data
-/*22*/
- 'undefined var' => @$undefined_var,
-
- // unset data
-/*23*/
- 'unset var' => @$unset_var,
-
- // resource variable
-/*24*/
- 'resource' => $fp
-);
-
-// loop through each element of $inputs to check the behavior of iconv_strlen()
-$iterator = 1;
-foreach($inputs as $key =>$value) {
- echo "\n--$key--\n";
- var_dump( iconv_strlen($value, $encoding));
- $iterator++;
-};
-
-fclose($fp);
-?>
-===DONE===
---EXPECTF--
-*** Testing iconv_strlen() : usage variations ***
-
---int 0--
-int(1)
-
---int 1--
-int(1)
-
---int 12345--
-int(5)
-
---int -12345--
-int(6)
-
---float 10.5--
-int(4)
-
---float -10.5--
-int(5)
-
---float 12.3456789000e10--
-int(12)
-
---float 12.3456789000e-10--
-int(13)
-
---float .5--
-int(3)
-
---uppercase NULL--
-int(0)
-
---lowercase null--
-int(0)
-
---lowercase true--
-int(1)
-
---lowercase false--
-int(0)
-
---uppercase TRUE--
-int(1)
-
---uppercase FALSE--
-int(0)
-
---empty string DQ--
-int(0)
-
---empty string SQ--
-int(0)
-
---string DQ--
-int(6)
-
---string SQ--
-int(6)
-
---mixed case string--
-int(6)
-
---heredoc--
-int(11)
-
---instance of class--
-int(14)
-
---undefined var--
-int(0)
-
---unset var--
-int(0)
-
---resource--
-
-Warning: iconv_strlen() expects parameter 1 to be string, resource given in %s on line %d
-bool(false)
-===DONE===
diff --git a/ext/iconv/tests/iconv_strlen_variation2.phpt b/ext/iconv/tests/iconv_strlen_variation2.phpt
deleted file mode 100644
index c8a736cfc0..0000000000
--- a/ext/iconv/tests/iconv_strlen_variation2.phpt
+++ /dev/null
@@ -1,203 +0,0 @@
---TEST--
-Test iconv_strlen() function : usage variations - Pass different data types as $encoding arg
---SKIPIF--
-<?php
-extension_loaded('iconv') or die('skip');
-function_exists('iconv_strlen') or die("skip iconv_strlen() is not available in this build");
-?>
---FILE--
-<?php
-/* Prototype : int iconv_strlen(string str [, string charset])
- * Description: Get character numbers of a string
- * Source code: ext/iconv/iconv.c
- */
-
-/*
- * Test iconv_strlen() by passing different data types as $encoding argument.
- * Where possible 'UTF-8' has been entered as a string value
- */
-
-echo "*** Testing iconv_strlen() : usage variations ***\n";
-
-// Initialise function arguments not being substituted
-$str = 'string value';
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// get a class
-class classA
-{
- public function __toString() {
- return "UTF-8";
- }
-}
-
-// heredoc string
-$heredoc = <<<EOT
-UTF-8
-EOT;
-
-// get a resource variable
-$fp = fopen(__FILE__, "r");
-
-// unexpected values to be passed to $input argument
-$inputs = array(
-
- // int data
-/*1*/ 0,
- 1,
- 12345,
- -2345,
-
- // float data
-/*5*/ 10.5,
- -10.5,
- 12.3456789000e10,
- 12.3456789000E-10,
- .5,
-
- // null data
-/*10*/ NULL,
- null,
-
- // boolean data
-/*12*/ true,
- false,
- TRUE,
- FALSE,
-
- // empty data
-/*16*/ "",
- '',
-
- // string data
-/*18*/ "UTF-8",
- 'UTF-8',
- $heredoc,
-
- // object data
-/*21*/ new classA(),
-
- // undefined data
-/*22*/ @$undefined_var,
-
- // unset data
-/*23*/ @$unset_var,
-
- // resource variable
-/*24*/ $fp
-);
-
-// loop through each element of $inputs to check the behavior of iconv_strlen()
-$iterator = 1;
-foreach($inputs as $input) {
- echo "\n-- Iteration $iterator --\n";
- var_dump( iconv_strlen($str, $input));
- $iterator++;
-};
-
-fclose($fp);
-
-echo "Done";
-?>
---EXPECTF--
-*** Testing iconv_strlen() : usage variations ***
-
--- Iteration 1 --
-
-Notice: iconv_strlen(): Wrong charset, conversion from `0' to `UCS-4LE' is not allowed in %s on line %d
-bool(false)
-
--- Iteration 2 --
-
-Notice: iconv_strlen(): Wrong charset, conversion from `1' to `UCS-4LE' is not allowed in %s on line %d
-bool(false)
-
--- Iteration 3 --
-
-Notice: iconv_strlen(): Wrong charset, conversion from `12345' to `UCS-4LE' is not allowed in %s on line %d
-bool(false)
-
--- Iteration 4 --
-
-Notice: iconv_strlen(): Wrong charset, conversion from `-2345' to `UCS-4LE' is not allowed in %s on line %d
-bool(false)
-
--- Iteration 5 --
-
-Notice: iconv_strlen(): Wrong charset, conversion from `10.5' to `UCS-4LE' is not allowed in %s on line %d
-bool(false)
-
--- Iteration 6 --
-
-Notice: iconv_strlen(): Wrong charset, conversion from `-10.5' to `UCS-4LE' is not allowed in %s on line %d
-bool(false)
-
--- Iteration 7 --
-
-Notice: iconv_strlen(): Wrong charset, conversion from `123456789000' to `UCS-4LE' is not allowed in %s on line %d
-bool(false)
-
--- Iteration 8 --
-
-Notice: iconv_strlen(): Wrong charset, conversion from `1.23456789E-9' to `UCS-4LE' is not allowed in %s on line %d
-bool(false)
-
--- Iteration 9 --
-
-Notice: iconv_strlen(): Wrong charset, conversion from `0.5' to `UCS-4LE' is not allowed in %s on line %d
-bool(false)
-
--- Iteration 10 --
-int(12)
-
--- Iteration 11 --
-int(12)
-
--- Iteration 12 --
-
-Notice: iconv_strlen(): Wrong charset, conversion from `1' to `UCS-4LE' is not allowed in %s on line %d
-bool(false)
-
--- Iteration 13 --
-int(12)
-
--- Iteration 14 --
-
-Notice: iconv_strlen(): Wrong charset, conversion from `1' to `UCS-4LE' is not allowed in %s on line %d
-bool(false)
-
--- Iteration 15 --
-int(12)
-
--- Iteration 16 --
-int(12)
-
--- Iteration 17 --
-int(12)
-
--- Iteration 18 --
-int(12)
-
--- Iteration 19 --
-int(12)
-
--- Iteration 20 --
-int(12)
-
--- Iteration 21 --
-int(12)
-
--- Iteration 22 --
-int(12)
-
--- Iteration 23 --
-int(12)
-
--- Iteration 24 --
-
-Warning: iconv_strlen() expects parameter 2 to be string, resource given in %s on line %d
-bool(false)
-Done
diff --git a/ext/iconv/tests/iconv_strpos_variation1.phpt b/ext/iconv/tests/iconv_strpos_variation1.phpt
deleted file mode 100644
index 0d395adcaa..0000000000
--- a/ext/iconv/tests/iconv_strpos_variation1.phpt
+++ /dev/null
@@ -1,182 +0,0 @@
---TEST--
-Test iconv_strpos() function : usage variations - pass different data types to $haystack arg
---SKIPIF--
-<?php
-extension_loaded('iconv') or die('skip');
-function_exists('iconv_strpos') or die("skip iconv_strpos() is not available in this build");
-?>
---FILE--
-<?php
-/* Prototype : int iconv_strpos(string haystack, string needle [, int offset [, string charset]])
- * Description: Find position of first occurrence of a string within another
- * Source code: ext/iconv/iconv.c
- */
-
-/*
- * Pass iconv_strpos different data types as $haystack arg to test behaviour
- */
-
-echo "*** Testing iconv_strpos() : usage variations ***\n";
-
-// Initialise function arguments not being substituted
-$needle = 'string_val';
-$offset = 0;
-$encoding = 'utf-8';
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// get a class
-class classA
-{
- public function __toString() {
- return "Class A object";
- }
-}
-
-// heredoc string
-$heredoc = <<<EOT
-hello world
-EOT;
-
-// get a resource variable
-$fp = fopen(__FILE__, "r");
-
-// unexpected values to be passed to $haystack argument
-$inputs = array(
-
- // int data
-/*1*/ 0,
- 1,
- 12345,
- -2345,
-
- // float data
-/*5*/ 10.5,
- -10.5,
- 12.3456789000e10,
- 12.3456789000E-10,
- .5,
-
- // null data
-/*10*/ NULL,
- null,
-
- // boolean data
-/*12*/ true,
- false,
- TRUE,
- FALSE,
-
- // empty data
-/*16*/ "",
- '',
-
- // string data
-/*18*/ "string",
- 'string',
- $heredoc,
-
- // object data
-/*21*/ new classA(),
-
- // undefined data
-/*22*/ @$undefined_var,
-
- // unset data
-/*23*/ @$unset_var,
-
- // resource variable
-/*24*/ $fp
-);
-
-// loop through each element of $inputs to check the behavior of iconv_strpos()
-$iterator = 1;
-foreach($inputs as $input) {
- echo "\n-- Iteration $iterator --\n";
- var_dump( iconv_strpos($input, $needle, $offset, $encoding));
- $iterator++;
-};
-
-fclose($fp);
-
-echo "Done";
-?>
---EXPECTF--
-*** Testing iconv_strpos() : usage variations ***
-
--- Iteration 1 --
-bool(false)
-
--- Iteration 2 --
-bool(false)
-
--- Iteration 3 --
-bool(false)
-
--- Iteration 4 --
-bool(false)
-
--- Iteration 5 --
-bool(false)
-
--- Iteration 6 --
-bool(false)
-
--- Iteration 7 --
-bool(false)
-
--- Iteration 8 --
-bool(false)
-
--- Iteration 9 --
-bool(false)
-
--- Iteration 10 --
-bool(false)
-
--- Iteration 11 --
-bool(false)
-
--- Iteration 12 --
-bool(false)
-
--- Iteration 13 --
-bool(false)
-
--- Iteration 14 --
-bool(false)
-
--- Iteration 15 --
-bool(false)
-
--- Iteration 16 --
-bool(false)
-
--- Iteration 17 --
-bool(false)
-
--- Iteration 18 --
-bool(false)
-
--- Iteration 19 --
-bool(false)
-
--- Iteration 20 --
-bool(false)
-
--- Iteration 21 --
-bool(false)
-
--- Iteration 22 --
-bool(false)
-
--- Iteration 23 --
-bool(false)
-
--- Iteration 24 --
-
-Warning: iconv_strpos() expects parameter 1 to be string, resource given in %s on line %d
-bool(false)
-Done
diff --git a/ext/iconv/tests/iconv_strpos_variation2.phpt b/ext/iconv/tests/iconv_strpos_variation2.phpt
deleted file mode 100644
index de7f52d22a..0000000000
--- a/ext/iconv/tests/iconv_strpos_variation2.phpt
+++ /dev/null
@@ -1,182 +0,0 @@
---TEST--
-Test iconv_strpos() function : usage variations - pass different data types as $needle arg
---SKIPIF--
-<?php
-extension_loaded('iconv') or die('skip');
-function_exists('iconv_strpos') or die("skip iconv_strpos() is not available in this build");
-?>
---FILE--
-<?php
-/* Prototype : int iconv_strpos(string haystack, string needle [, int offset [, string charset]])
- * Description: Find position of first occurrence of a string within another
- * Source code: ext/iconv/iconv.c
- */
-
-/*
- * Pass iconv_strpos different data types as $needle arg to test behaviour
- */
-
-echo "*** Testing iconv_strpos() : usage variations ***\n";
-
-// Initialise function arguments not being substituted
-$haystack = 'string_val';
-$offset = 0;
-$encoding = 'utf-8';
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// get a class
-class classA
-{
- public function __toString() {
- return "Class A object";
- }
-}
-
-// heredoc string
-$heredoc = <<<EOT
-hello world
-EOT;
-
-// get a resource variable
-$fp = fopen(__FILE__, "r");
-
-// unexpected values to be passed to $needle argument
-$inputs = array(
-
- // int data
-/*1*/ 0,
- 1,
- 12345,
- -2345,
-
- // float data
-/*5*/ 10.5,
- -10.5,
- 12.3456789000e10,
- 12.3456789000E-10,
- .5,
-
- // null data
-/*10*/ NULL,
- null,
-
- // boolean data
-/*12*/ true,
- false,
- TRUE,
- FALSE,
-
- // empty data
-/*16*/ "",
- '',
-
- // string data
-/*18*/ "string",
- 'string',
- $heredoc,
-
- // object data
-/*21*/ new classA(),
-
- // undefined data
-/*22*/ @$undefined_var,
-
- // unset data
-/*23*/ @$unset_var,
-
- // resource variable
-/*24*/ $fp
-);
-
-// loop through each element of $inputs to check the behavior of iconv_strpos()
-$iterator = 1;
-foreach($inputs as $input) {
- echo "\n-- Iteration $iterator --\n";
- var_dump( iconv_strpos($haystack, $input, $offset, $encoding));
- $iterator++;
-};
-
-fclose($fp);
-
-echo "Done";
-?>
---EXPECTF--
-*** Testing iconv_strpos() : usage variations ***
-
--- Iteration 1 --
-bool(false)
-
--- Iteration 2 --
-bool(false)
-
--- Iteration 3 --
-bool(false)
-
--- Iteration 4 --
-bool(false)
-
--- Iteration 5 --
-bool(false)
-
--- Iteration 6 --
-bool(false)
-
--- Iteration 7 --
-bool(false)
-
--- Iteration 8 --
-bool(false)
-
--- Iteration 9 --
-bool(false)
-
--- Iteration 10 --
-bool(false)
-
--- Iteration 11 --
-bool(false)
-
--- Iteration 12 --
-bool(false)
-
--- Iteration 13 --
-bool(false)
-
--- Iteration 14 --
-bool(false)
-
--- Iteration 15 --
-bool(false)
-
--- Iteration 16 --
-bool(false)
-
--- Iteration 17 --
-bool(false)
-
--- Iteration 18 --
-int(0)
-
--- Iteration 19 --
-int(0)
-
--- Iteration 20 --
-bool(false)
-
--- Iteration 21 --
-bool(false)
-
--- Iteration 22 --
-bool(false)
-
--- Iteration 23 --
-bool(false)
-
--- Iteration 24 --
-
-Warning: iconv_strpos() expects parameter 2 to be string, resource given in %s on line %d
-bool(false)
-Done
diff --git a/ext/iconv/tests/iconv_strpos_variation3.phpt b/ext/iconv/tests/iconv_strpos_variation3.phpt
deleted file mode 100644
index 0a3b343bfc..0000000000
--- a/ext/iconv/tests/iconv_strpos_variation3.phpt
+++ /dev/null
@@ -1,210 +0,0 @@
---TEST--
-Test iconv_strpos() function : usage variations - pass different data types as $offset arg
---SKIPIF--
-<?php
-extension_loaded('iconv') or die('skip');
-function_exists('iconv_strpos') or die("skip iconv_strpos() is not available in this build");
-if (PHP_INT_SIZE != 4) die("skip this test is for 32bit platform only");
-?>
---FILE--
-<?php
-/* Prototype : int iconv_strpos(string haystack, string needle [, int offset [, string charset]])
- * Description: Find position of first occurrence of a string within another
- * Source code: ext/iconv/iconv.c
- */
-
-/*
- * Pass iconv_strpos different data types as $offset arg to test behaviour
- */
-
-echo "*** Testing iconv_strpos() : usage variations ***\n";
-
-// Initialise function arguments not being substituted
-$needle = 'a';
-$haystack = 'string_val';
-$encoding = 'utf-8';
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// get a class
-class classA
-{
- public function __toString() {
- return "Class A object";
- }
-}
-
-// heredoc string
-$heredoc = <<<EOT
-hello world
-EOT;
-
-// get a resource variable
-$fp = fopen(__FILE__, "r");
-
-// unexpected values to be passed to $offest argument
-$inputs = array(
-
- // int data
- 0,
- 1,
- 12345,
- -5,
- -2345,
-
- // float data
- 10.5,
- -9.5,
- -100.3,
- 12.3456789000e10,
- 12.3456789000E-10,
- .5,
-
- // null data
- NULL,
- null,
-
- // boolean data
- true,
- false,
- TRUE,
- FALSE,
-
- // empty data
- "",
- '',
-
- // string data
- "string",
- 'string',
- $heredoc,
-
- // object data
- new classA(),
-
- // undefined data
- @$undefined_var,
-
- // unset data
- @$unset_var,
-
- // resource variable
- $fp
-);
-
-// loop through each element of $inputs to check the behavior of iconv_strpos()
-
-foreach($inputs as $input) {
- echo "--\n";
- var_dump($input);
- var_dump( iconv_strpos($haystack, $needle, $input, $encoding));
-};
-
-fclose($fp);
-
-echo "Done";
-?>
---EXPECTF--
-*** Testing iconv_strpos() : usage variations ***
---
-int(0)
-int(8)
---
-int(1)
-int(8)
---
-int(12345)
-bool(false)
---
-int(-5)
-int(8)
---
-int(-2345)
-
-Warning: iconv_strpos(): Offset not contained in string. in %s on line %d
-bool(false)
---
-float(10.5)
-bool(false)
---
-float(-9.5)
-int(8)
---
-float(-100.3)
-
-Warning: iconv_strpos(): Offset not contained in string. in %s on line %d
-bool(false)
---
-float(123456789000)
-
-Warning: iconv_strpos() expects parameter 3 to be int, float given in %s on line %d
-bool(false)
---
-float(1.23456789E-9)
-int(8)
---
-float(0.5)
-int(8)
---
-NULL
-int(8)
---
-NULL
-int(8)
---
-bool(true)
-int(8)
---
-bool(false)
-int(8)
---
-bool(true)
-int(8)
---
-bool(false)
-int(8)
---
-string(0) ""
-
-Warning: iconv_strpos() expects parameter 3 to be int, string given in %s on line %d
-bool(false)
---
-string(0) ""
-
-Warning: iconv_strpos() expects parameter 3 to be int, string given in %s on line %d
-bool(false)
---
-string(6) "string"
-
-Warning: iconv_strpos() expects parameter 3 to be int, string given in %s on line %d
-bool(false)
---
-string(6) "string"
-
-Warning: iconv_strpos() expects parameter 3 to be int, string given in %s on line %d
-bool(false)
---
-string(11) "hello world"
-
-Warning: iconv_strpos() expects parameter 3 to be int, string given in %s on line %d
-bool(false)
---
-object(classA)#%d (%d) {
-}
-
-Warning: iconv_strpos() expects parameter 3 to be int, object given in %s on line %d
-bool(false)
---
-NULL
-int(8)
---
-NULL
-int(8)
---
-resource(%d) of type (stream)
-
-Warning: iconv_strpos() expects parameter 3 to be int, resource given in %s on line %d
-bool(false)
-Done
diff --git a/ext/iconv/tests/iconv_strpos_variation3_64bit.phpt b/ext/iconv/tests/iconv_strpos_variation3_64bit.phpt
deleted file mode 100644
index 9389282f0a..0000000000
--- a/ext/iconv/tests/iconv_strpos_variation3_64bit.phpt
+++ /dev/null
@@ -1,208 +0,0 @@
---TEST--
-Test iconv_strpos() function : usage variations - pass different data types as $offset arg
---SKIPIF--
-<?php
-extension_loaded('iconv') or die('skip');
-function_exists('iconv_strpos') or die("skip iconv_strpos() is not available in this build");
-if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platform only");
-?>
---FILE--
-<?php
-/* Prototype : int iconv_strpos(string haystack, string needle [, int offset [, string charset]])
- * Description: Find position of first occurrence of a string within another
- * Source code: ext/iconv/iconv.c
- */
-
-/*
- * Pass iconv_strpos different data types as $offset arg to test behaviour
- */
-
-echo "*** Testing iconv_strpos() : usage variations ***\n";
-
-// Initialise function arguments not being substituted
-$needle = 'a';
-$haystack = 'string_val';
-$encoding = 'utf-8';
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// get a class
-class classA
-{
- public function __toString() {
- return "Class A object";
- }
-}
-
-// heredoc string
-$heredoc = <<<EOT
-hello world
-EOT;
-
-// get a resource variable
-$fp = fopen(__FILE__, "r");
-
-// unexpected values to be passed to $offest argument
-$inputs = array(
-
- // int data
- 0,
- 1,
- 12345,
- -5,
- -2345,
-
- // float data
- 10.5,
- -9.5,
- -100.3,
- 12.3456789000e10,
- 12.3456789000E-10,
- .5,
-
- // null data
- NULL,
- null,
-
- // boolean data
- true,
- false,
- TRUE,
- FALSE,
-
- // empty data
- "",
- '',
-
- // string data
- "string",
- 'string',
- $heredoc,
-
- // object data
- new classA(),
-
- // undefined data
- @$undefined_var,
-
- // unset data
- @$unset_var,
-
- // resource variable
- $fp
-);
-
-// loop through each element of $inputs to check the behavior of iconv_strpos()
-
-foreach($inputs as $input) {
- echo "--\n";
- var_dump($input);
- var_dump( iconv_strpos($haystack, $needle, $input, $encoding));
-};
-
-fclose($fp);
-
-echo "Done";
-?>
---EXPECTF--
-*** Testing iconv_strpos() : usage variations ***
---
-int(0)
-int(8)
---
-int(1)
-int(8)
---
-int(12345)
-bool(false)
---
-int(-5)
-int(8)
---
-int(-2345)
-
-Warning: iconv_strpos(): Offset not contained in string. in %s on line %d
-bool(false)
---
-float(10.5)
-bool(false)
---
-float(-9.5)
-int(8)
---
-float(-100.3)
-
-Warning: iconv_strpos(): Offset not contained in string. in %s on line %d
-bool(false)
---
-float(123456789000)
-bool(false)
---
-float(1.23456789E-9)
-int(8)
---
-float(0.5)
-int(8)
---
-NULL
-int(8)
---
-NULL
-int(8)
---
-bool(true)
-int(8)
---
-bool(false)
-int(8)
---
-bool(true)
-int(8)
---
-bool(false)
-int(8)
---
-string(0) ""
-
-Warning: iconv_strpos() expects parameter 3 to be int, string given in %s on line %d
-bool(false)
---
-string(0) ""
-
-Warning: iconv_strpos() expects parameter 3 to be int, string given in %s on line %d
-bool(false)
---
-string(6) "string"
-
-Warning: iconv_strpos() expects parameter 3 to be int, string given in %s on line %d
-bool(false)
---
-string(6) "string"
-
-Warning: iconv_strpos() expects parameter 3 to be int, string given in %s on line %d
-bool(false)
---
-string(11) "hello world"
-
-Warning: iconv_strpos() expects parameter 3 to be int, string given in %s on line %d
-bool(false)
---
-object(classA)#%d (%d) {
-}
-
-Warning: iconv_strpos() expects parameter 3 to be int, object given in %s on line %d
-bool(false)
---
-NULL
-int(8)
---
-NULL
-int(8)
---
-resource(%d) of type (stream)
-
-Warning: iconv_strpos() expects parameter 3 to be int, resource given in %s on line %d
-bool(false)
-Done
diff --git a/ext/iconv/tests/iconv_strpos_variation4.phpt b/ext/iconv/tests/iconv_strpos_variation4.phpt
deleted file mode 100644
index 55c3f62889..0000000000
--- a/ext/iconv/tests/iconv_strpos_variation4.phpt
+++ /dev/null
@@ -1,206 +0,0 @@
---TEST--
-Test iconv_strpos() function : usage variations - pass different data types as $charset arg
---SKIPIF--
-<?php
-extension_loaded('iconv') or die('skip');
-function_exists('iconv_strpos') or die("skip iconv_strpos() is not available in this build");
-?>
---FILE--
-<?php
-/* Prototype : int iconv_strpos(string haystack, string needle [, int offset [, string charset]])
- * Description: Find position of first occurrence of a string within another
- * Source code: ext/iconv/iconv.c
- */
-
-
-/*
- * Pass iconv_strpos different data types as $encoding arg to test behaviour
- * Where possible 'UTF-8' has been entered as a string value
- */
-
-echo "*** Testing iconv_strpos() : usage variations ***\n";
-
-// Initialise function arguments not being substituted
-$haystack = 'string_val';
-$needle = 'val';
-$offset = 0;
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// get a class
-class classA
-{
- public function __toString() {
- return "UTF-8";
- }
-}
-
-// heredoc string
-$heredoc = <<<EOT
-UTF-8
-EOT;
-
-// get a resource variable
-$fp = fopen(__FILE__, "r");
-
-// unexpected values to be passed to $input argument
-$inputs = array(
-
- // int data
-/*1*/ 0,
- 1,
- 12345,
- -2345,
-
- // float data
-/*5*/ 10.5,
- -10.5,
- 12.3456789000e10,
- 12.3456789000E-10,
- .5,
-
- // null data
-/*10*/ NULL,
- null,
-
- // boolean data
-/*12*/ true,
- false,
- TRUE,
- FALSE,
-
- // empty data
-/*16*/ "",
- '',
-
- // string data
-/*18*/ "UTF-8",
- 'UTF-8',
- $heredoc,
-
- // object data
-/*21*/ new classA(),
-
- // undefined data
-/*22*/ @$undefined_var,
-
- // unset data
-/*23*/ @$unset_var,
-
- // resource variable
-/*24*/ $fp
-);
-
-// loop through each element of $inputs to check the behavior of iconv_strpos()
-$iterator = 1;
-foreach($inputs as $input) {
- echo "\n-- Iteration $iterator --\n";
- var_dump( iconv_strpos($haystack, $needle, $offset, $input));
- $iterator++;
-};
-
-fclose($fp);
-
-echo "Done";
-?>
---EXPECTF--
-*** Testing iconv_strpos() : usage variations ***
-
--- Iteration 1 --
-
-Notice: iconv_strpos(): Wrong charset, conversion from `0' to `UCS-4LE' is not allowed in %s on line %d
-bool(false)
-
--- Iteration 2 --
-
-Notice: iconv_strpos(): Wrong charset, conversion from `1' to `UCS-4LE' is not allowed in %s on line %d
-bool(false)
-
--- Iteration 3 --
-
-Notice: iconv_strpos(): Wrong charset, conversion from `12345' to `UCS-4LE' is not allowed in %s on line %d
-bool(false)
-
--- Iteration 4 --
-
-Notice: iconv_strpos(): Wrong charset, conversion from `-2345' to `UCS-4LE' is not allowed in %s on line %d
-bool(false)
-
--- Iteration 5 --
-
-Notice: iconv_strpos(): Wrong charset, conversion from `10.5' to `UCS-4LE' is not allowed in %s on line %d
-bool(false)
-
--- Iteration 6 --
-
-Notice: iconv_strpos(): Wrong charset, conversion from `-10.5' to `UCS-4LE' is not allowed in %s on line %d
-bool(false)
-
--- Iteration 7 --
-
-Notice: iconv_strpos(): Wrong charset, conversion from `123456789000' to `UCS-4LE' is not allowed in %s on line %d
-bool(false)
-
--- Iteration 8 --
-
-Notice: iconv_strpos(): Wrong charset, conversion from `1.23456789E-9' to `UCS-4LE' is not allowed in %s on line %d
-bool(false)
-
--- Iteration 9 --
-
-Notice: iconv_strpos(): Wrong charset, conversion from `0.5' to `UCS-4LE' is not allowed in %s on line %d
-bool(false)
-
--- Iteration 10 --
-int(7)
-
--- Iteration 11 --
-int(7)
-
--- Iteration 12 --
-
-Notice: iconv_strpos(): Wrong charset, conversion from `1' to `UCS-4LE' is not allowed in %s on line %d
-bool(false)
-
--- Iteration 13 --
-int(7)
-
--- Iteration 14 --
-
-Notice: iconv_strpos(): Wrong charset, conversion from `1' to `UCS-4LE' is not allowed in %s on line %d
-bool(false)
-
--- Iteration 15 --
-int(7)
-
--- Iteration 16 --
-int(7)
-
--- Iteration 17 --
-int(7)
-
--- Iteration 18 --
-int(7)
-
--- Iteration 19 --
-int(7)
-
--- Iteration 20 --
-int(7)
-
--- Iteration 21 --
-int(7)
-
--- Iteration 22 --
-int(7)
-
--- Iteration 23 --
-int(7)
-
--- Iteration 24 --
-
-Warning: iconv_strpos() expects parameter 4 to be string, resource given in %s on line %d
-bool(false)
-Done
diff --git a/ext/iconv/tests/iconv_strrpos_variation1.phpt b/ext/iconv/tests/iconv_strrpos_variation1.phpt
deleted file mode 100644
index 51d99ddca6..0000000000
--- a/ext/iconv/tests/iconv_strrpos_variation1.phpt
+++ /dev/null
@@ -1,179 +0,0 @@
---TEST--
-Test iconv_strrpos() function : usage variations - pass different data types to $haystack arg
---SKIPIF--
-<?php
-extension_loaded('iconv') or die('skip');
-function_exists('iconv_strrpos') or die("skip iconv_strrpos() is not available in this build");
-?>
---FILE--
-<?php
-/* Prototype : proto int iconv_strrpos(string haystack, string needle [, string charset])
- * Description: Find position of last occurrence of a string within another
- * Source code: ext/iconv/iconv.c
- */
-
-/*
- * Pass iconv_strrpos() different data types as $haystack argument to test behaviour
- */
-
-echo "*** Testing iconv_strrpos() : usage variations ***\n";
-
-// Initialise function arguments not being substituted
-$needle = 'world';
-$encoding = 'utf-8';
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// get a class
-class classA
-{
- public function __toString() {
- return "hello, world";
- }
-}
-
-// heredoc string
-$heredoc = <<<EOT
-hello, world
-EOT;
-
-// get a resource variable
-$fp = fopen(__FILE__, "r");
-
-// unexpected values to be passed to $haystack argument
-$inputs = array(
-
- // int data
-/*1*/ 0,
- 1,
- 12345,
- -2345,
-
- // float data
-/*5*/ 10.5,
- -10.5,
- 12.3456789000e10,
- 12.3456789000E-10,
- .5,
-
- // null data
-/*10*/ NULL,
- null,
-
- // boolean data
-/*12*/ true,
- false,
- TRUE,
- FALSE,
-
- // empty data
-/*16*/ "",
- '',
-
- // string data
-/*18*/ "hello, world",
- 'hello, world',
- $heredoc,
-
- // object data
-/*21*/ new classA(),
-
- // undefined data
-/*22*/ @$undefined_var,
-
- // unset data
-/*23*/ @$unset_var,
-
- // resource variable
-/*24*/ $fp
-);
-
-// loop through each element of $inputs to check the behavior of iconv_strrpos()
-$iterator = 1;
-foreach($inputs as $input) {
- echo "\n-- Iteration $iterator --\n";
- var_dump( iconv_strrpos($input, $needle, $encoding));
- $iterator++;
-};
-
-echo "Done";
-?>
---EXPECTF--
-*** Testing iconv_strrpos() : usage variations ***
-
--- Iteration 1 --
-bool(false)
-
--- Iteration 2 --
-bool(false)
-
--- Iteration 3 --
-bool(false)
-
--- Iteration 4 --
-bool(false)
-
--- Iteration 5 --
-bool(false)
-
--- Iteration 6 --
-bool(false)
-
--- Iteration 7 --
-bool(false)
-
--- Iteration 8 --
-bool(false)
-
--- Iteration 9 --
-bool(false)
-
--- Iteration 10 --
-bool(false)
-
--- Iteration 11 --
-bool(false)
-
--- Iteration 12 --
-bool(false)
-
--- Iteration 13 --
-bool(false)
-
--- Iteration 14 --
-bool(false)
-
--- Iteration 15 --
-bool(false)
-
--- Iteration 16 --
-bool(false)
-
--- Iteration 17 --
-bool(false)
-
--- Iteration 18 --
-int(7)
-
--- Iteration 19 --
-int(7)
-
--- Iteration 20 --
-int(7)
-
--- Iteration 21 --
-int(7)
-
--- Iteration 22 --
-bool(false)
-
--- Iteration 23 --
-bool(false)
-
--- Iteration 24 --
-
-Warning: iconv_strrpos() expects parameter 1 to be string, resource given in %s on line %d
-bool(false)
-Done
diff --git a/ext/iconv/tests/iconv_strrpos_variation2.phpt b/ext/iconv/tests/iconv_strrpos_variation2.phpt
deleted file mode 100644
index 59e26a4a18..0000000000
--- a/ext/iconv/tests/iconv_strrpos_variation2.phpt
+++ /dev/null
@@ -1,181 +0,0 @@
---TEST--
-Test iconv_strrpos() function : usage variations - Pass different data types to $needle arg
---SKIPIF--
-<?php
-extension_loaded('iconv') or die('skip');
-function_exists('iconv_strrpos') or die("skip iconv_strrpos() is not available in this build");
-?>
---FILE--
-<?php
-/* Prototype : proto int iconv_strrpos(string haystack, string needle [, string charset])
- * Description: Find position of last occurrence of a string within another
- * Source code: ext/iconv/iconv.c
- */
-
-/*
- * Pass iconv_strrpos() different data types as $needle argument to test behaviour
- */
-
-echo "*** Testing iconv_strrpos() : usage variations ***\n";
-
-// Initialise function arguments not being substituted
-$haystack = 'hello, world';
-$encoding = 'utf-8';
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// get a class
-class classA
-{
- public function __toString() {
- return "world";
- }
-}
-
-// heredoc string
-$heredoc = <<<EOT
-world
-EOT;
-
-// get a resource variable
-$fp = fopen(__FILE__, "r");
-
-// unexpected values to be passed to $needle argument
-$inputs = array(
-
- // int data
-/*1*/ 0,
- 1,
- 12345,
- -2345,
-
- // float data
-/*5*/ 10.5,
- -10.5,
- 12.3456789000e10,
- 12.3456789000E-10,
- .5,
-
- // null data
-/*10*/ NULL,
- null,
-
- // boolean data
-/*12*/ true,
- false,
- TRUE,
- FALSE,
-
- // empty data
-/*16*/ "",
- '',
-
- // string data
-/*18*/ "world",
- 'world',
- $heredoc,
-
- // object data
-/*21*/ new classA(),
-
- // undefined data
-/*22*/ @$undefined_var,
-
- // unset data
-/*23*/ @$unset_var,
-
- // resource variable
-/*24*/ $fp
-);
-
-// loop through each element of $inputs to check the behavior of iconv_strrpos()
-$iterator = 1;
-foreach($inputs as $input) {
- echo "\n-- Iteration $iterator --\n";
- var_dump( iconv_strrpos($haystack, $input, $encoding));
- $iterator++;
-};
-
-fclose($fp);
-
-echo "Done";
-?>
---EXPECTF--
-*** Testing iconv_strrpos() : usage variations ***
-
--- Iteration 1 --
-bool(false)
-
--- Iteration 2 --
-bool(false)
-
--- Iteration 3 --
-bool(false)
-
--- Iteration 4 --
-bool(false)
-
--- Iteration 5 --
-bool(false)
-
--- Iteration 6 --
-bool(false)
-
--- Iteration 7 --
-bool(false)
-
--- Iteration 8 --
-bool(false)
-
--- Iteration 9 --
-bool(false)
-
--- Iteration 10 --
-bool(false)
-
--- Iteration 11 --
-bool(false)
-
--- Iteration 12 --
-bool(false)
-
--- Iteration 13 --
-bool(false)
-
--- Iteration 14 --
-bool(false)
-
--- Iteration 15 --
-bool(false)
-
--- Iteration 16 --
-bool(false)
-
--- Iteration 17 --
-bool(false)
-
--- Iteration 18 --
-int(7)
-
--- Iteration 19 --
-int(7)
-
--- Iteration 20 --
-int(7)
-
--- Iteration 21 --
-int(7)
-
--- Iteration 22 --
-bool(false)
-
--- Iteration 23 --
-bool(false)
-
--- Iteration 24 --
-
-Warning: iconv_strrpos() expects parameter 2 to be string, resource given in %s on line %d
-bool(false)
-Done
diff --git a/ext/iconv/tests/iconv_strrpos_variation3.phpt b/ext/iconv/tests/iconv_strrpos_variation3.phpt
deleted file mode 100644
index 86af94ae59..0000000000
--- a/ext/iconv/tests/iconv_strrpos_variation3.phpt
+++ /dev/null
@@ -1,204 +0,0 @@
---TEST--
-Test iconv_strrpos() function : usage variations - pass different data types as $encoding arg
---SKIPIF--
-<?php
-extension_loaded('iconv') or die('skip');
-function_exists('iconv_strrpos') or die("skip iconv_strrpos() is not available in this build");
-?>
---FILE--
-<?php
-/* Prototype : proto int iconv_strrpos(string haystack, string needle [, string charset])
- * Description: Find position of last occurrence of a string within another
- * Source code: ext/iconv/iconv.c
- */
-
-/*
- * Pass iconv_strrpos() different data types as $encoding argument to test behaviour
- * Where possible 'UTF-8' has been entered as a string value
- */
-
-echo "*** Testing iconv_strrpos() : usage variations ***\n";
-
-// Initialise function arguments not being substituted
-$haystack = 'hello, world';
-$needle = 'world';
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// get a class
-class classA
-{
- public function __toString() {
- return "UTF-8";
- }
-}
-
-// heredoc string
-$heredoc = <<<EOT
-UTF-8
-EOT;
-
-// get a resource variable
-$fp = fopen(__FILE__, "r");
-
-// unexpected values to be passed to $encoding argument
-$inputs = array(
-
- // int data
-/*1*/ 0,
- 1,
- 12345,
- -2345,
-
- // float data
-/*5*/ 10.5,
- -10.5,
- 12.3456789000e10,
- 12.3456789000E-10,
- .5,
-
- // null data
-/*10*/ NULL,
- null,
-
- // boolean data
-/*12*/ true,
- false,
- TRUE,
- FALSE,
-
- // empty data
-/*16*/ "",
- '',
-
- // string data
-/*18*/ "UTF-8",
- 'UTF-8',
- $heredoc,
-
- // object data
-/*21*/ new classA(),
-
- // undefined data
-/*22*/ @$undefined_var,
-
- // unset data
-/*23*/ @$unset_var,
-
- // resource variable
-/*24*/ $fp
-);
-
-// loop through each element of $inputs to check the behavior of iconv_strrpos()
-$iterator = 1;
-foreach($inputs as $input) {
- echo "\n-- Iteration $iterator --\n";
- var_dump( iconv_strrpos($haystack, $needle, $input));
- $iterator++;
-};
-
-fclose($fp);
-
-echo "Done";
-?>
---EXPECTF--
-*** Testing iconv_strrpos() : usage variations ***
-
--- Iteration 1 --
-
-Notice: iconv_strrpos(): Wrong charset, conversion from `0' to `UCS-4LE' is not allowed in %s on line %d
-bool(false)
-
--- Iteration 2 --
-
-Notice: iconv_strrpos(): Wrong charset, conversion from `1' to `UCS-4LE' is not allowed in %s on line %d
-bool(false)
-
--- Iteration 3 --
-
-Notice: iconv_strrpos(): Wrong charset, conversion from `12345' to `UCS-4LE' is not allowed in %s on line %d
-bool(false)
-
--- Iteration 4 --
-
-Notice: iconv_strrpos(): Wrong charset, conversion from `-2345' to `UCS-4LE' is not allowed in %s on line %d
-bool(false)
-
--- Iteration 5 --
-
-Notice: iconv_strrpos(): Wrong charset, conversion from `10.5' to `UCS-4LE' is not allowed in %s on line %d
-bool(false)
-
--- Iteration 6 --
-
-Notice: iconv_strrpos(): Wrong charset, conversion from `-10.5' to `UCS-4LE' is not allowed in %s on line %d
-bool(false)
-
--- Iteration 7 --
-
-Notice: iconv_strrpos(): Wrong charset, conversion from `123456789000' to `UCS-4LE' is not allowed in %s on line %d
-bool(false)
-
--- Iteration 8 --
-
-Notice: iconv_strrpos(): Wrong charset, conversion from `1.23456789E-9' to `UCS-4LE' is not allowed in %s on line %d
-bool(false)
-
--- Iteration 9 --
-
-Notice: iconv_strrpos(): Wrong charset, conversion from `0.5' to `UCS-4LE' is not allowed in %s on line %d
-bool(false)
-
--- Iteration 10 --
-int(7)
-
--- Iteration 11 --
-int(7)
-
--- Iteration 12 --
-
-Notice: iconv_strrpos(): Wrong charset, conversion from `1' to `UCS-4LE' is not allowed in %s on line %d
-bool(false)
-
--- Iteration 13 --
-int(7)
-
--- Iteration 14 --
-
-Notice: iconv_strrpos(): Wrong charset, conversion from `1' to `UCS-4LE' is not allowed in %s on line %d
-bool(false)
-
--- Iteration 15 --
-int(7)
-
--- Iteration 16 --
-int(7)
-
--- Iteration 17 --
-int(7)
-
--- Iteration 18 --
-int(7)
-
--- Iteration 19 --
-int(7)
-
--- Iteration 20 --
-int(7)
-
--- Iteration 21 --
-int(7)
-
--- Iteration 22 --
-int(7)
-
--- Iteration 23 --
-int(7)
-
--- Iteration 24 --
-
-Warning: iconv_strrpos() expects parameter 3 to be string, resource given in %s on line %d
-bool(false)
-Done
diff --git a/ext/iconv/tests/ob_iconv_handler.phpt b/ext/iconv/tests/ob_iconv_handler.phpt
index 20f916935a..6caa4106f9 100644
--- a/ext/iconv/tests/ob_iconv_handler.phpt
+++ b/ext/iconv/tests/ob_iconv_handler.phpt
@@ -6,7 +6,6 @@ ob_iconv_handler()
error_reporting=2039
--FILE--
<?php
-/* include('test.inc'); */
iconv_set_encoding('internal_encoding', 'EUC-JP');
iconv_set_encoding('output_encoding', 'Shift_JIS');
ob_start('ob_iconv_handler');
diff --git a/ext/iconv/tests/test.inc b/ext/iconv/tests/test.inc
deleted file mode 100644
index 68d2a3e10c..0000000000
--- a/ext/iconv/tests/test.inc
+++ /dev/null
@@ -1,7 +0,0 @@
-<?php
-// Do not dl load extension
-//if (!extension_loaded("iconv") && ini_get("enable_dl")) {
-// $dlext = (substr(PHP_OS, 0, 3) == "WIN") ? ".dll" : ".so";
-// @dl("iconv$dlext");
-//}
-?>
diff --git a/ext/iconv/tests/translit-failure.phpt b/ext/iconv/tests/translit-failure.phpt
index 2132e7e130..1571a316c1 100644
--- a/ext/iconv/tests/translit-failure.phpt
+++ b/ext/iconv/tests/translit-failure.phpt
@@ -9,7 +9,6 @@ include('skipif.inc');
error_reporting=2039
--FILE--
<?php
-/* include('test.inc'); */
// Should be ok.
// Content from file is from libiconv testkit. Tested both
// with a string as an implode, no difference.
diff --git a/ext/iconv/tests/translit-utf8.phpt b/ext/iconv/tests/translit-utf8.phpt
index c363eeeab6..68b1982779 100644
--- a/ext/iconv/tests/translit-utf8.phpt
+++ b/ext/iconv/tests/translit-utf8.phpt
@@ -8,8 +8,7 @@ include('skipif.inc');
--INI--
error_reporting=2047
--FILE--
-<?php // vim600: syn=php
-/* include('test.inc'); */
+<?php
//error_reporting(E_ALL);
$utf = implode('', file(dirname(__FILE__).'/Quotes.UTF-8'));