1
0
mirror of https://github.com/php/php-src.git synced 2026-04-21 23:18:13 +02:00
Files
archived-php-src/ext/standard/tests/strings/bug47546.phpt
T

25 lines
347 B
PHP

--TEST--
Bug #47546 (Default value for limit parameter in explode is 0, not -1)
--FILE--
<?php
$str = 'one|two|three|four';
print_r(explode('|', $str));
print_r(explode('|', $str, -1));
?>
--EXPECT--
Array
(
[0] => one
[1] => two
[2] => three
[3] => four
)
Array
(
[0] => one
[1] => two
[2] => three
[3] => four
)