PHP  
 PHP_HEAD
downloads | QA | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | my php.net 
 

Valgrind Report for Zend/tests/closure_008.phpt ('Closure 008: Use in preg_replace_callback()')

Script

1: <?php
2:
3:
function replace_spaces($text) {
4:     
$lambda = function ($matches) {
5:         return 
str_replace(' ''&nbsp;'$matches[1]).' ';
6:     };
7:     return 
preg_replace_callback('/( +) /'$lambda$text);
8: }
9:
10: echo 
replace_spaces("1 2 3\n");
11: echo 
replace_spaces("1  2  3\n");
12: echo 
replace_spaces("1   2   3\n");
13: echo 
"Done\n";
14:
?>
15:

Report

==1111== Conditional jump or move depends on uninitialised value(s)
==1111==    at 0x413109F: ???
==1111==    by 0x14F2B97F: ???
==1111==    by 0x14F2B977: ???
==1111==    by 0x14F2B981: ???
==1111==    by 0x1FFEFFBB9F: ???
==1111==    by 0x4540FF: ??? (in /var/php_gcov/PHP_HEAD/sapi/cli/php)
==1111== 

 

Generated at Sat, 09 Sep 2017 03:10:54 +0000 (14 days ago)

Copyright © 2005-2017 The PHP Group
All rights reserved.