What is the format of the variables in the return value?
P粉757556355
P粉757556355 2024-04-06 21:55:20
0
1
518

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...?

P粉757556355
P粉757556355

reply all(1)
P粉649990273

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.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!