I am a new learner of php. I found a piece of code:
if($x < time()){ return [false,'error']; }
The logic or variables don't matter, but I don't understand how [false,'error'] works. Is it a boolean, an array, or...?
This is an array. It has two elements of two different types. The first element type is Boolean. The second element is a string.
Arrays in PHP can contain elements of different types.
This is an array. It has two elements of two different types. The first element type is Boolean. The second element is a string.
Arrays in PHP can contain elements of different types.