1--TEST--
2Test 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
15echo "*** 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);
23var_dump( join($glues[0], $pieces) );
24var_dump( join($glues[1], $pieces) );
25
26echo "Done\n";
27?>
28--EXPECTF--
29*** Testing join() : usage variationsi - binary safe ***
30string(23) "Red,� Green,� White,� 1"
31string(20) "Red, Green, White, 1"
32Done
33