Lokang 

PHP and MySQL

built-in functions

PHP has a number of built-in functions that you can use in your code. These functions are available to you automatically, and you don't need to define them yourself. Here are a few examples of built-in functions in PHP:

  • strlen(): This function returns the length of a string.
  • count(): This function counts the number of elements in an array.
  • time(): This function returns the current Unix timestamp.
  • rand(): This function returns a random number.

To use a built-in function, you can simply call it by name and pass it the required arguments. For example:

$str = 'Hello, world!';
echo strlen($str);  // Outputs: 13
$arr = [1, 2, 3, 4];
echo count($arr);  // Outputs: 4
echo time();  // Outputs: 1623456789
echo rand();  // Outputs a random number