explode_variation7.phpt 465 B

123456789101112131415161718
  1. --TEST--
  2. Test explode() function : usage variations - when $string length is greater than
  3. EXPLODE_ALLOC_STEP (64) and the $limit is negative
  4. --CREDITS--
  5. edgarsandi - <edgar.r.sandi@gmail.com>
  6. --FILE--
  7. <?php
  8. /* Prototype : array explode ( string $delimiter , string $string [, int $limit ] )
  9. * Description: Split a string by string.
  10. * Source code: ext/standard/string.c
  11. */
  12. var_dump(count(explode('|', implode(range(1,65),'|'), -1)));
  13. ?>
  14. --EXPECT--
  15. int(64)