Lines Matching refs:strstr

2 Test strstr() function
5 echo "*** Testing basic functionality of strstr() ***\n";
6 var_dump( strstr("test string", "test") );
7 var_dump( strstr("test string", "string") );
8 var_dump( strstr("test string", "strin") );
9 var_dump( strstr("test string", "t s") );
10 var_dump( strstr("test string", "g") );
11 var_dump( md5(strstr("te".chr(0)."st", chr(0))) );
12 var_dump( strstr("tEst", "test") );
13 var_dump( strstr("teSt", "test") );
14 var_dump( strstr("", "") );
15 var_dump( strstr("a", "") );
16 var_dump( strstr("", "a") );
19 echo "\n*** Testing strstr() with various needles ***";
61 var_dump( strstr($string, $needles[$i]) );
88 var_dump(strstr("$obj_string", "$obj_needle"));
92 var_dump( strstr("", NULL) );
93 var_dump( strstr(NULL, NULL) );
94 var_dump( strstr("a", NULL) );
95 var_dump( strstr("/x0", "0") ); // Hexadecimal NUL
110 var_dump( strstr($string, "abcd") );
111 var_dump( strstr($string, "1234") );
116 var_dump( strstr($str, "\0") );
117 var_dump( strstr($str, NULL) );
118 var_dump( strstr($str, "0") );
125 var_dump( strstr("Hello, world", "$needle") ); // works
126 var_dump( strstr("Hello, world'S", "$needle'S") ); // works
127 var_dump( strstr("Hello, worldS", "$needleS") ); // won't work
130 var_dump( strstr("Hello, worldS", "${needle}S") ); // works
131 var_dump( strstr("Hello, worldS", "{$needle}S") ); // works
134 var_dump( strstr($string, ""));
135 var_dump( strstr("a", "b", "c") ); // args > expected
136 var_dump( strstr(NULL, "") );
142 *** Testing basic functionality of strstr() ***
155 *** Testing strstr() with various needles ***