PHPC2 | Mastering Object Oriented Progamming in PHP 8

  • Learn how to master object oriented programming with PHP with practical examples and expert trainers.
  • Prerequisites

    Mastering the basics of the PHP language
  • Goals

    In three days you will learn all the basic concepts of object-oriented programming in PHP to become operational on frameworks like Symfony, Silex, Laravel, Drupal and Zend. You'll also learn how to develop with the object-oriented philosophy with the latest PHP versions including PHP 8.

Full program

Introduction to Object Oriented Programming

  • Introduction to the OOP main concepts
  • Understanding the benefits of using OOP
  • Discovering the main principles of OOP
  • Learning how to think and design code with the object approach
  • Discovering all new object oriented features introduced since PHP 5.3

Fundamentals of Object Oriented Programming

  • Understanding the concepts of classes and objects
  • Setting the state of an object with its properties
  • Reading and changing the state of an object thanks to its methods
  • Instanciating and initializing an object with its constructor
  • Destroying an object the right way with its destructor
  • Ensuring object state encapsulation thanks to attributes and methods scopes
  • Understanding the difference between instance and class scope
  • Specializing classes thanks to the inheritance principle
  • Leveraging classes to define new advanced data structures and types

Advanced Object Oriented Programming Concepts

  • Generalizing data structures types with abstract classes and methods
  • Preventing class and methods specialization
  • Overriding and overloading the behavior of a parent class' method
  • Handling errors properly with the exception mechanism
  • Design implementation contracts thanks to interfaces
  • Overriding implicit default objects behaviors with « magic methods »
  • Setting up mechanisms to automatically load class definitions files
  • Organizing data structures thanks to namespaces
  • Refactoring reusable chunks of object oriented code into « traits »

Leveraging the PHP 8 SPL

  • Discovering the « Standard PHP Library » aka SPL
  • Raising and throwing SPL specific exceptions types
  • Using the new SPL built-in data structures
  • Creating objects iterators thanks to the « Iterator » interface
  • Counting objects in a collection thanks to the « Countable » interface
  • Converting a PHP object into a PHP regular array with the « ArrayAccess » interface

Practicing the PHP 8 Native Object Oriented Tools

  • Manipulating relational databases with PHP Data Objects aka PDO
  • Traversing the data of an XML file thanks to the SimpleXML objects
  • Manipulating and formatting dates with the DateTime objects
  • Accessing files informations thanks to the SplFileInfo objects

Acquire Object Oriented Development Best Practices

  • Commenting and annotating code thanks to the « phpdoc » syntax
  • Mastering the SOLID main principles
  • Programming against interfaces
  • Promoting composition over inheritance
  • Discovering the main GoF design patterns
  • Introducing automated code unit testing with PHPUnit

Time program

Day 1

Appreciation of the training

Global average : 4.5/5

  1. Educational rating : 4.5/5
  2. Content rating : 4.7/5
  3. Pace rating : 4.4/5
The ratings are the synthesis of the cumulative assessments of our trainees from 01/01/2023 to 12/31/2023.

Evaluative methods

  • A control of knowledge in the form of multiple choice questions is carried out during and at the end of the training. It allows to validate and take back the points not assimilated.
  • A certificate of successful completion of a training action is sent to the learner.
  • A copy of the attendance sheet is transmitted.

Terms of registration

  • Registration can only be made using the registration form available on our website or via the training team e-mail.
  • Registration will be completed only after receiving the signed aggreement and the full payment before the start of the training.
  • Duration

    3 day(s)
  • Level

  • Available languages

    French, English
  • Available countries

    France, Worldwide
From €1,590.00
No session scheduled

No session is scheduled for this course. However we organize tailored training courses: contact us for more informations!