显示下拉菜单

Configuration of str_replace() 本页面仅提供英文版本。

<?php
/**
 * PHP By Example
 *
 * @copyright 2014 Michel Corne 
 * @license   http://www.opensource.org/licenses/gpl-3.0.html GNU GPL v3
 */

require_once 'models/function_core.php';

/**
 * Function configuration
 *
 * @see docs/function-configuration.txt
 */

class str_replace extends function_core
{
    public 
$examples = [
        [
            
"%body%",
            
"black",
            
"<body text='%body%'>"
        
],
        [
            [
                
=> "a",
                
=> "e",
                
=> "i",
                
=> "o",
                
=> "u",
                
=> "A",
                
=> "E",
                
=> "I",
                
=> "O",
                
=> "U",
            ],
            
"",
            
"Hello World of PHP"
        
],
        [
            [
                
=> "fruits",
                
=> "vegetables",
                
=> "fiber",
            ],
            [
                
=> "pizza",
                
=> "beer",
                
=> "ice cream",
            ],
            
"You should eat fruits, vegetables, and fiber every day."
        
],
        [
            
"ll",
            
"",
            
"good golly miss molly!"
        
],
        [
            [
                
=> '_DOUBLE_QUOTES_\r\n_DOUBLE_QUOTES_',
                
=> '_DOUBLE_QUOTES_\n_DOUBLE_QUOTES_',
                
=> '_DOUBLE_QUOTES_\r_DOUBLE_QUOTES_',
            ],
            [
                
=> "B",
                
=> "C",
                
=> "D",
                
=> "E",
                
=> "F",
            ],
            
'_DOUBLE_QUOTES_Line 1\nLine 2\rLine 3\r\nLine 4\n_DOUBLE_QUOTES_'
        
],
        [
            [
                
=> "A",
                
=> "B",
                
=> "C",
                
=> "D",
                
=> "E",
            ],
            [
                
=> "B",
                
=> "C",
                
=> "D",
                
=> "E",
                
=> "F",
            ],
            
"A"
        
],
        [
            [
                
=> "a",
                
=> "p",
            ],
            [
                
=> "apple",
                
=> "pear",
            ],
            
"a p"
        
]
    ];

    public 
$synopsis 'mixed str_replace ( mixed $search , mixed $replace , mixed $subject [, int &$count ] )';
}