Issue
I am a new learner in php. I found that there is a code:
if($x < time()){
return [false,'error'];
}
The logic or variable is not matter, but I don't understand how [false,'error'] works. Is it a boolean or array or ..... ?
Solution
It's an array. It has two elements of different two types. The first element type is boolean. The second element is a string.
Arrays can have elements of different types in PHP.
Answered By - Martín Lehoczky Answer Checked By - Gilberto Lyons (PHPFixing Admin)
0 Comments:
Post a Comment
Note: Only a member of this blog may post a comment.