PHP: Strict Data Types

PHP: Strict Data Types

Website or Online Data - 2016
Rate this:
Learn about strict data types and scalar type hints in PHP 7. Find out how to use this new and controversial feature consistently in your own code.
One of the most important (and controversial) new features in PHP 7 is the option to use strict data types, in the form of parameter and return type declarations. Strict typing helps eliminate errors in more complex applications. Its use remains optional though, as many consider it a betrayal of the fundamental principles of a loosely typed language like PHP. In this course, David Powers explores the pros and cons of strict data types in PHP 5 and PHP 7. First, he introduces the basics of type juggling and type casting in PHP. Then, he reviews strict typing with objects, arrays, and callback functions, which were introduced in PHP 5. He also reviews scalar type hints in PHP 7, which can have unexpected side effects for unwary developers. David concludes with a frank assessment of the practicalities of strict typing, and a simple recommendation that will help most developers use the new feature: define in strict and execute in weak.
Publisher: Carpenteria, CA, 2016
Additional Contributors: (Firm)

Related Resources


From the critics

Community Activity


Add a Comment

There are no comments for this title yet.

Age Suitability

Add Age Suitability

There are no age suitabilities for this title yet.


Add a Summary

There are no summaries for this title yet.


Add Notices

There are no notices for this title yet.


Add a Quote

There are no quotes for this title yet.

Explore Further


Subject Headings


Find it at GSPL

To Top