Da traduttori professionisti, imprese, pagine web e archivi di traduzione disponibili gratuitamente al pubblico.
the callback should return the replacement string.
the behavior of this function is almost identical to preg_replace(), except for the fact that instead of replacement parameter, one should specify a callback that will be called and passed an array of matched elements in the subject string. the callback should return the replacement string.
name of user-defined callback function to be called whenever a stream triggers a notification.
params should be an associative array of the structure: $params['paramname'] = "paramvalue";.
if the optional userdata parameter is supplied, it will be passed as the third parameter to the callback function.
함수 func 을 arr 의 각각의 원소에 적용한다. func 에 배열 값이 첫번째 인자로, 배열 키다 두번째 인자로 전달된다. userdata 가 주어지면 이는 함수의 세번째 인자로 전달된다.
an interesting use of this function is to construct an array of arrays, which can be easily performed by using null as the name of the callback function
usually when using two or more arrays, they should be of equal length because the callback function is applied in parallel to the corresponding elements. if the arrays are of unequal length, the shortest one will be extended with empty elements.
the number of parameters that the callback function accepts should match the number of arrays passed to the array_map()
array_map() returns an array containing all the elements of arr1 after applying the callback function to each one. the number of parameters that the callback function accepts should match the number of arrays passed to the array_map()
all callback functions could be set with xml_set_element_handler() etc and assumed to be methods of object.
this function allows to use parser inside object. all callback functions could be set with xml_set_element_handler() etc and assumed to be methods of object.
the assert_options() function and / or assert_callback configuration directive allow a callback function to be set to handle failed assertions.
if the assertion is given as a string it will be evaluated as php code by assert(). the advantages of a string assertion are less overhead when assertion checking is off and messages containing the assertion expression when an assertion failes.
among other things, this can be used to implement callbacks, function tables, and so forth.
php는 가변 함수(variable functions) 개념을 지원한다. 이것은 변수명 뒤에 괄호가 왔을 때, php는 그 이름을 가진 함수를 찾아 실행한다는 것을 의미한다. 이 기능은 callbacks, function table 등의 기능에 사용하면 매우 유용하게 사용할 수 있다