Skip to content

Commit 1b1a86c

Browse files
edgarsandicmb69
authored andcommitted
Improved code coverage of explode function
1 parent d2bc45f commit 1b1a86c

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
--TEST--
2+
Test explode() function : usage variations - when $string length is greater than
3+
EXPLODE_ALLOC_STEP (64) and the $limit is negative
4+
--CREDITS--
5+
edgarsandi - <edgar.r.sandi@gmail.com>
6+
--FILE--
7+
<?php
8+
9+
/* Prototype : array explode ( string $delimiter , string $string [, int $limit ] )
10+
* Description: Split a string by string.
11+
* Source code: ext/standard/string.c
12+
*/
13+
14+
var_dump(count(explode('|', implode(range(1,65),'|'), -1)));
15+
16+
?>
17+
--EXPECT--
18+
int(64)

0 commit comments

Comments
 (0)