1
0
mirror of https://github.com/php/php-src.git synced 2026-04-18 05:21:02 +02:00
Files
archived-php-src/ext/standard/tests/strings/join_variation6.phpt
Nikita Popov ea256a218b Add %0 format to run-tests.php
This format matches against null bytes, and prevents the test
expectation from being interpreted as binary data.

bless_tests.php will automatically replace \0 with %0 as well.
2021-05-29 11:33:13 +02:00

27 lines
547 B
PHP

--TEST--
Test join() function : usage variations - binary safe
--FILE--
<?php
/*
* check the working of join() when given binary input given
*/
echo "*** Testing join() : usage variationsi - binary safe ***\n";
$glues = array(
",".chr(0)." ",
", "
);
$pieces = array("Red", "Green", "White", 1);
var_dump( join($glues[0], $pieces) );
var_dump( join($glues[1], $pieces) );
echo "Done\n";
?>
--EXPECTF--
*** Testing join() : usage variationsi - binary safe ***
string(23) "Red,%0 Green,%0 White,%0 1"
string(20) "Red, Green, White, 1"
Done