در این دوره آموزشی یاد می گیرید که چگونه در PHP 5 و یا PHP 7 حساسیت به نوع داده ( Strict Data Types ) را فعال کرده و از امکانات و مزایای آن استفاده کنید.  PHP به صورت پیشفرض به نسبت به نوع داده متغیرها ، توابع و غیره حساس نیست. اما برای تولید پروژه های بزرگ گاهی نیاز است که نوع داده متغیرها ، توابع و . . . به دقت محدود و چک شود.
این دوره آموزشی محصول موسسه Lynda است.

سرفصل های این دوره:

  • نوع ضمنی و صریح
  • استفاده از انواع داده ها
  • اعلام انواع بازگشت در PHP 7
  • نکات نوع عددی در PHP 7
  • تغییرات خطا در PHP 7
  • ایجاد اظهارات پارامتر عددی و نوع اظهارات بازگشت اسکالر
  • بررسی محاسن انواع داده ها سخت
  • و …

عنوان دوره: Lynda Strict Data Types in PHP

مدت دوره: 1 ساعت و 10 دقیقه

نویسنده: David Powers


توضیحات:

https://www.lynda.com/PHP-tutorials/Strict-Data-Types-PHP/480959-2.html
Lynda Strict Data Types in PHP

David Powers
1h 10m
Intermediate



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.
Topics include:
Implicit and explicit type casting
Using strict data types
Declaring return types in PHP 7
Creating scalar parameter declarations and scalar return type declarations
Assessing the merits of strict data types


Introduction
3m 15s
Welcome
1m 5s
What you should know before watching this course
1m 8s
Using the exercise files
1m 2s
1. Loose vs. Strict Types
16m 50s
How PHP handles data types
4m 9s
Implicit type casting
6m 32s
Explicit type casting
3m 40s
Using strict data types
2m 29s
2. Strict Typing with Objects, Arrays, and Callbacks
19m 36s
Specifying data types for parameters
6m 21s
Return type declarations in PHP 7
2m 40s
Return type declarations with an interface
4m 40s
Changes to error handling in PHP 7
5m 55s
3. Scalar Type Hints in PHP 7
27m 6s
Overview of scalar type declarations
3m 30s
Scalar parameter declarations
6m 2s
Scalar return type declarations
5m 3s
Using parameter and return type declarations together
6m 25s
Unexpected side effects of strict mode
6m 6s
Conclusion
3m 37s
Assessing the merits of strict data types
3m 8s
Goodbye
29s