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

Valgrind Report for ext/pcre/tests/preg_split_basic.phpt ('Test preg_split() function : basic functionality')

Script

1: <?php
2:
/*
3: * proto array preg_split(string pattern, string subject [, int limit [, int flags]])
4: * Function is implemented in ext/pcre/php_pcre.c
5: */
6:
$string 'this is a_list: value1, Test__, string; Hello, world!_(parentheses)';
7:
var_dump(preg_split('/[:,;\(\)]/'$string, -1PREG_SPLIT_NO_EMPTY)); //parts of $string separated by : , ; ( or ) are put into an array.
8:
var_dump(preg_split('/:\s*(\w*,*\s*)+;/'$string)); //all text between : and ; is removed
9:
var_dump(preg_split('/(\(|\))/'$string, -1PREG_SPLIT_DELIM_CAPTURE|PREG_SPLIT_NO_EMPTY)); //all text before (parentheses) is put into first element, ( into second, "parentheses" into third and ) into fourth.
10:
var_dump(preg_split('/NAME/i'$string)); //tries to find NAME regardless of case in $string (can't split it so just returns how string as first element)
11:
var_dump(preg_split('/\w/'$string, -1PREG_SPLIT_NO_EMPTY)); //every character (including whitespace) is put into an array element
12:
13:
?>
14:

Report

==29359== Conditional jump or move depends on uninitialised value(s)
==29359==    at 0x414097E: ???
==29359==    by 0x14F2B32E: ???
==29359==    by 0x14F2B307: ???
==29359==    by 0x14F2B34A: ???
==29359==    by 0x1FFEFFBF9F: ???
==29359==    by 0x140614F3426F: ???
==29359== 

 

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

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