hiphop-php /hphp/test/zend/bad/ext/standard/tests/strings/stristr_basic.php

Language PHP Lines 20
MD5 Hash 52d015f05b8061b0d33cc9708386fa4d Estimated Cost $237 (why?)
Repository git://github.com/facebook/hiphop-php.git View Raw File View Project SPDX
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
<?php
/* Prototype:  string stristr  ( string $haystack  , mixed $needle  [, bool $before_needle  ] )
   Description: Case-insensitive strstr().
*/

echo "*** Testing stristr() : basic functionality ***\n";

var_dump( stristr("Test string", "teSt") );
var_dump( stristr("test stRIng", "striNG") );
var_dump( stristr("teST StrinG", "stRIn") );
var_dump( stristr("tesT string", "t S") );
var_dump( stristr("test strinG", "g") );
var_dump( bin2hex(stristr(b"te".chr(0).b"St", chr(0))) );
var_dump( stristr("tEst", "test") );
var_dump( stristr("teSt", "test") );

var_dump( stristr("Test String", "String", false) );
var_dump( stristr("Test String", "String", true) );
?>
===DONE===
Back to Top