Php collection: type constraints. Suddenly, I don't want to do anything, just like my uncle .. However, the habit of writing a blog every workday cannot be broken .. So let's have a try today. PHP has been in use for almost two years, but suddenly I don't want to do anything. it feels like an uncle .. However, the habit of writing a blog every workday cannot be broken .. So let's have a try today.
PHP has been in use for almost two years, but this was the first time I saw it. suddenly, I felt like I had gone back to the five dregs of the war.
Open the official document "type constraints" to explain it very clearly.
There are four types in total: class name, interface, array, callable (from PHP 5.4)
No int string can be used ..
The example and other PHP manuals have already been very detailed. I am also too lazy to write it. this is just a point of knowledge and I will take a look at it ..
In fact, I haven't written PHP for a long time. now I want to read all the major frameworks, but I doubt that I will actually use PHP ,,
Bytes .. However, the habit of writing a blog every workday cannot be broken .. So let's have a try today. PHP has been used for almost 2 years,...