@@ -50,6 +50,8 @@ for($count = 0; $count < count($values); $count++) {
50
50
var_dump ( chunk_split ($ heredoc_str , $ values [$ count ], $ ending ) );
51
51
} catch (TypeError $ e ) {
52
52
echo $ e ->getMessage (), "\n" ;
53
+ } catch (\Error $ e ) {
54
+ echo $ e ->getMessage () . "\n" ;
53
55
}
54
56
}
55
57
@@ -58,18 +60,14 @@ echo "Done"
58
60
--EXPECTF--
59
61
*** Testing chunk_split() : different 'chunklen' with heredoc 'str' ***
60
62
-- Iteration 1 --
61
-
62
- Warning: chunk_split(): Chunk length should be greater than zero in %s on line %d
63
- bool(false)
63
+ Chunk length should be greater than zero
64
64
-- Iteration 2 --
65
65
string(504) "T:::h:::i:::s:::':::s::: :::h:::e:::r:::e:::d:::o:::c::: :::s:::t:::r:::i:::n:::g::: :::w:::i:::t:::h::: ::: ::: :::a:::n:::d::: :::
66
66
::: :::w:::h:::i:::t:::e::: :::s:::p:::a:::c:::e::: :::c:::h:::a:::r:::.:::
67
67
:::I:::t::: :::h:::a:::s::: :::_:::s:::p:::e:::c:::i:::@:::l::: :::c:::h:::@:::r:::$::: :::2:::2:::2:::2::: :::!:::!:::!:::N:::o:::w::: :::\:::k::: :::a:::s::: :::e:::s:::c:::a:::p:::e::: :::c:::h:::a:::r::: :::t:::o::: :::t:::e:::s:::t:::
68
68
:::c:::h:::u:::n:::k:::_:::s:::p:::l:::i:::t:::(:::):::"
69
69
-- Iteration 3 --
70
-
71
- Warning: chunk_split(): Chunk length should be greater than zero in %s on line %d
72
- bool(false)
70
+ Chunk length should be greater than zero
73
71
-- Iteration 4 --
74
72
string(129) "This's heredoc string with and
75
73
white space char.
@@ -88,7 +86,5 @@ chunk_split():::"
88
86
-- Iteration 7 --
89
87
chunk_split() expects parameter 2 to be int, float given
90
88
-- Iteration 8 --
91
-
92
- Warning: chunk_split(): Chunk length should be greater than zero in %s on line %d
93
- bool(false)
89
+ Chunk length should be greater than zero
94
90
Done
0 commit comments