1--TEST--
2Test explode() function : usage variations - match longer string
3--FILE--
4<?php
5
6/* Prototype  : array explode  ( string $delimiter  , string $string  [, int $limit  ] )
7 * Description: Split a string by string.
8 * Source code: ext/standard/string.c
9*/
10
11echo "*** Testing explode() function: match longer string ***\n";
12
13$pizza  = "piece1 piece2 piece3 piece4 piece5 piece6 p";
14$pieces = explode(" p", $pizza);
15var_dump($pieces);
16?>
17===DONE===
18--EXPECT--
19*** Testing explode() function: match longer string ***
20array(7) {
21  [0]=>
22  string(6) "piece1"
23  [1]=>
24  string(5) "iece2"
25  [2]=>
26  string(5) "iece3"
27  [3]=>
28  string(5) "iece4"
29  [4]=>
30  string(5) "iece5"
31  [5]=>
32  string(5) "iece6"
33  [6]=>
34  string(0) ""
35}
36===DONE===
37