summaryrefslogtreecommitdiff
path: root/ext/standard/tests/strings/str_split_variation7_64bit.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'ext/standard/tests/strings/str_split_variation7_64bit.phpt')
-rw-r--r--ext/standard/tests/strings/str_split_variation7_64bit.phpt26
1 files changed, 12 insertions, 14 deletions
diff --git a/ext/standard/tests/strings/str_split_variation7_64bit.phpt b/ext/standard/tests/strings/str_split_variation7_64bit.phpt
index bff61adb30..1a1980028a 100644
--- a/ext/standard/tests/strings/str_split_variation7_64bit.phpt
+++ b/ext/standard/tests/strings/str_split_variation7_64bit.phpt
@@ -18,7 +18,7 @@ if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platform only");
* passing different integer values for 'split_length' and heredoc string as 'str' argument to str_split()
*/
-echo "*** Testing str_split() : different intger values for 'split_length' with heredoc 'str' ***\n";
+echo "*** Testing str_split() : different integer values for 'split_length' with heredoc 'str' ***\n";
//Initialise variables
$str = <<<EOT
string with 123,escape char \t.
@@ -38,17 +38,19 @@ $values = array (
//loop through each element of $values for 'split_length'
for($count = 0; $count < count($values); $count++) {
- echo "-- Iteration ".($count + 1)." --\n";
- var_dump( str_split($str, $values[$count]) );
+ echo "-- Iteration ".($count + 1)." --\n";
+ try {
+ var_dump( str_split($str, $values[$count]) );
+ } catch (\Error $e) {
+ echo $e->getMessage() . "\n";
+ }
}
echo "Done"
?>
---EXPECTF--
-*** Testing str_split() : different intger values for 'split_length' with heredoc 'str' ***
+--EXPECT--
+*** Testing str_split() : different integer values for 'split_length' with heredoc 'str' ***
-- Iteration 1 --
-
-Warning: str_split(): The length of each segment must be greater than zero in %s on line %d
-bool(false)
+The length of each segment must be greater than zero
-- Iteration 2 --
array(30) {
[0]=>
@@ -113,9 +115,7 @@ array(30) {
string(1) "."
}
-- Iteration 3 --
-
-Warning: str_split(): The length of each segment must be greater than zero in %s on line %d
-bool(false)
+The length of each segment must be greater than zero
-- Iteration 4 --
array(1) {
[0]=>
@@ -139,7 +139,5 @@ array(1) {
string(30) "string with 123,escape char ."
}
-- Iteration 8 --
-
-Warning: str_split(): The length of each segment must be greater than zero in %s on line %d
-bool(false)
+The length of each segment must be greater than zero
Done