Annotation of embedaddon/php/ext/standard/tests/strings/join_variation6.phpt, revision 1.1.1.1
1.1 misho 1: --TEST--
2: Test join() function : usage variations - binary safe
3: --FILE--
4: <?php
5: /* Prototype : string join( string $glue, array $pieces )
6: * Description: Join array elements with a string
7: * Source code: ext/standard/string.c
8: * Alias of function: implode()
9: */
10:
11: /*
12: * check the working of join() when given binary input given
13: */
14:
15: echo "*** Testing join() : usage variationsi - binary safe ***\n";
16:
17: $glues = array(
18: ",".chr(0)." ",
19: b", "
20: );
21:
22: $pieces = array("Red", "Green", "White", 1);
23: var_dump( join($glues[0], $pieces) );
24: var_dump( join($glues[1], $pieces) );
25:
26: echo "Done\n";
27: ?>
28: --EXPECTF--
29: *** Testing join() : usage variationsi - binary safe ***
30: string(23) "Red, Green, White, 1"
31: string(20) "Red, Green, White, 1"
32: Done
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>