by Example
ドロップダウンリストを表示
Configuration of array_walk()
このページは英語でのみ提供されています。
<?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
*
* Changes to this class may affect other classes.
*
* @see docs/function-configuration.txt
*/
class array_walk extends function_core
{
public $examples = [
[
'__array' => [
"d" => "lemon",
"a" => "orange",
"b" => "banana",
"c" => "apple"
],
'$array',
'test_print'
],
[
'__array' => [
"d" => "lemon",
"a" => "orange",
"b" => "banana",
"c" => "apple"
],
'$array',
'test_alter',
'fruit'
],
];
public $helper_callbacks = ['index_in_example' => 1];
public $input_args = '__array';
public $source_code = '
// custom callback functions
function test_alter(&$item1, $key, $prefix) { $item1 = "$prefix: $item1"; };
function test_print(&$item, $key) { $item = "$key holds $item\n"; };
$_array =
$__array; // array $__array
inject_function_call
';
public $synopsis = 'bool array_walk ( array &$array , callable $callback [, mixed $userdata = NULL ] )';
function pre_exec_function()
{
$this->_filter->filter_callback('callback');
}
}
ヘルプ
その他
設定
この関数のテスト
単体テスト
Powered by
PHP 7.1.33 (0.002 s)
2014-2017 Michel Corne