Annotation of embedaddon/php/ext/standard/tests/strings/str_replace_basic.phpt, revision 1.1.1.1

1.1       misho       1: --TEST--
                      2: Test str_replace() function basic function
                      3: --INI--
                      4: precision=14
                      5: --FILE--
                      6: <?php
                      7: /* 
                      8:   Prototype: mixed str_replace(mixed $search, mixed $replace, 
                      9:                                mixed $subject [, int &$count]);
                     10:   Description: Replace all occurrences of the search string with 
                     11:                the replacement string
                     12: */
                     13: 
                     14: echo "\n*** Testing str_replace() on basic operations ***\n";
                     15: 
                     16: var_dump( str_replace("", "", "") );
                     17: 
                     18: var_dump( str_replace("e", "b", "test") );
                     19: 
                     20: var_dump( str_replace("", "", "", $count) );
                     21: var_dump( $count );
                     22: 
                     23: var_dump( str_replace("q", "q", "q", $count) );
                     24: var_dump( $count );
                     25: 
                     26: var_dump( str_replace("long string here", "", "", $count) );
                     27: var_dump( $count );
                     28: 
                     29: $fp = fopen( __FILE__, "r" );
                     30: $fp_copy = $fp; 
                     31: var_dump( str_replace($fp_copy, $fp_copy, $fp_copy, $fp_copy) );
                     32: var_dump( $fp_copy );
                     33: fclose($fp);
                     34: 
                     35: ?>
                     36: ===DONE===
                     37: --EXPECTF--    
                     38: *** Testing str_replace() on basic operations ***
                     39: string(0) ""
                     40: string(4) "tbst"
                     41: string(0) ""
                     42: int(0)
                     43: string(1) "q"
                     44: int(1)
                     45: string(0) ""
                     46: int(0)
                     47: string(%d) "Resource id #%d"
                     48: int(1)
                     49: ===DONE===

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>