Annotation of embedaddon/php/ext/standard/tests/strings/bug24281.phpt, revision 1.1.1.1

1.1       misho       1: --TEST--
                      2: Bug #24281 (str_replace count not returned if variable wasn't initialized)
                      3: --SKIPIF--
                      4: <?php 
                      5:         if (version_compare(zend_version(), '2.0.0-dev', '<')) die('SKIP PHP5 functionality'); 
                      6: ?>
                      7: --FILE--
                      8: <?php
                      9: $string = "He had had to have had it";
                     10: $newstring = str_replace("had", "foo", $string, $count);
                     11: print "$count changes were made.\n";
                     12: $count = "foo";
                     13: $newstring = str_replace("had", "foo", $string, $count);
                     14: print "$count changes were made.\n";
                     15: ?>
                     16: --EXPECT--
                     17: 3 changes were made.
                     18: 3 changes were made.

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>