1--TEST-- 2Bug #24281 (str_replace count not returned if variable wasn't initialized) 3--FILE-- 4<?php 5$string = "He had had to have had it"; 6$newstring = str_replace("had", "foo", $string, $count); 7print "$count changes were made.\n"; 8$count = "foo"; 9$newstring = str_replace("had", "foo", $string, $count); 10print "$count changes were made.\n"; 11?> 12--EXPECT-- 133 changes were made. 143 changes were made. 15