bug28800.phpt 616 B

123456789101112131415161718192021222324252627
  1. --TEST--
  2. Bug #28800 (Incorrect string to number conversion for strings starting with 'inf')
  3. --FILE--
  4. <?php
  5. $strings = array('into', 'info', 'inf', 'infinity', 'infin', 'inflammable');
  6. foreach ($strings as $v) {
  7. echo ($v+0)."\n";
  8. }
  9. ?>
  10. --EXPECTF--
  11. Warning: A non-numeric value encountered in %s on line %d
  12. 0
  13. Warning: A non-numeric value encountered in %s on line %d
  14. 0
  15. Warning: A non-numeric value encountered in %s on line %d
  16. 0
  17. Warning: A non-numeric value encountered in %s on line %d
  18. 0
  19. Warning: A non-numeric value encountered in %s on line %d
  20. 0
  21. Warning: A non-numeric value encountered in %s on line %d
  22. 0