
Druckansicht von http://www.php-homepage.de/manual/language.pseudo-types.php
Pseudo-types and variables used in this documentationmixedmixed indicates that a parameter may accept multiple (but not necessarily all) types. gettype() for example will accept all PHP types, while str_replace() will accept strings and arrays. callbackSome functions like call_user_func() or usort() accept user-defined callback functions as a parameter. Callback functions can not only be simple functions, but also object methods, including static class methods. A PHP function is passed by its name as a string. Any built-in or user-defined function can be used, except language constructs such as: array(), echo, empty(), eval(), exit(), isset(), list(), print or unset(). A method of an instantiated object is passed as an array containing an object at index 0 and the method name at index 1. Static class methods can also be passed without instantiating an object of that class by passing the class name instead of an object at index 0. Apart from common user-defined function, create_function() can also be used to create an anonymous callback function. Beispiel #1 Callback function examples
<?php
voidvoid as a return type means that the return value is useless. void in a parameter list means that the function doesn't accept any parameters. ...
|