Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

PHP Native Function

PHP defines its own native functions. They are part of the core extensions, which are always compiled, or extensions.

PHP native functions do not have a definition available, unlike component or custom functions. They are handled by the PHP engine, and documented.

For example, strlen is a PHP native function, which measures the length of a string, in bytes. There are a lot of PHP functions available.

PHP native functions may be disabled at startup, with the disabled_functions directive.

It is possible to reach PHP native function definitions on the php.net website by adding their name in the URL. For example: https://www.php.net/strlen.

<?php

    print_r(get_defined_functions());

?>

Documentation

See Also