There are two kinds of PHP functions: (i) built-in functions and (ii) user-defined functions.
There are more than 700 PHP built-in functions available, e.g.,
The following program returns the number of keywords matched between a string and a query by using the built-in functions:
strtok(string,split),
which breaks the query into an array of keywords.
It is only the first call to strtok( ) that uses the string argument.
After the first call, this function only needs the split argument.
stripos(string,find),
which returns the position of the first occurrence of a keyword inside the string case-insensitively.
If not found, returns the Boolean value false, which may or may not be equal to the value 0.
is_numeric(variable), which finds whether a variable is a number.
It is used because the function stripos may return a position 0, which is not equal to the value false.