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 lynda.com, 2016
Additional Contributors: lynda.com (Firm)

Related Resources


Opinion

From the critics


Community Activity

Comment

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.

Summary

Add a Summary

There are no summaries for this title yet.

Notices

Add Notices

There are no notices for this title yet.

Quotes

Add a Quote

There are no quotes for this title yet.

Explore Further

Recommendations

Subject Headings

  Loading...

Find it at GSPL

  Loading...
[]
[]
To Top