Practice: Type hinting
In the "Type hinting" tutorial, we learned about type hinting for the array and object data types. Before we move on to learning about type hinting for interfaces, let's practice what we learned.
In the "Type hinting" tutorial, we learned about type hinting for the array and object data types. Before we move on to learning about type hinting for interfaces, let's practice what we learned.
* Press on the "solution button" to see our suggested solution.
Which data types can be declared with type hinting?
C Type hinting for arrays and objects is supported in both PHP5 and 7, while scalar type hinting (for integers, floats, strings, and booleans) is only supported in PHP7.
Scratchpad to practice your coding *This will not be saved nor submitted to us.*
If so, the eBook"The essentials of object oriented PHP" can further help you.
"The essentials..." is an in-depth guide to help you quickly and easily increase your productivity and become a hot commodity in the job market.
Don't waste time!
Click on the green button to buy the eBook and start achieving your potential today!