I was reading in a WordPress textbook where I found a quick description for the following function:
function is_super_admin( $user_id = false ) {...
This function determines if the user is a site admin.
However, my question is about the how PHP deals with the parameters.
The above function receives an integer parameter, and if you pass nothing to it then it will assign a default value of FALSE
.
Here is my question:
FALSE
is a BOOLEAN
data type, and this function should accept an INTEGER
data type.
So how can it be allowed to provide a boolean value, when we should provide an integer value?