Highlights
- Introduction to PHP, Understand PHP Basics
- Initialize, Populate and Accessing arrays
- Use PHP in web applications
- Learn the Control structures
- Declare Functions and arguments
- The filesystem: Write and read files
- Learn to Create Clean Code with OOP
- Properties and methods visibility
- Inheritance and Interfaces
- How to Handle exceptions
- Use and learn Design patterns and Databases
- Understand Keys and constraints
- Learn Inserting, Updating, Deleting, Querying data
- Learn how to Adapt to MVC
- How to Work with requests
- Test: Learn to test Web Applications
- Learn Integrating PHPUnit
- Writing unit tests
- Use Existing PHP Frameworks
- Learn more features of frameworks
- Types of frameworks
- An overview of famous frameworks
- The Laravel framework: Install and setup project
Course Details
Introduction to PHP
Setting up the environment – Installing LAMP / WAMP / MAMP which includes PHP MySQL and Apache server for Windows, Linux, and Mac
Web servers - how they work, putting it all together
The built-in PHP testing server
Understanding PHP Basics
PHP Variables and Data Types
Operators – math, assignment, comparison, logical
Incrementing / Decrementing
Operator precedence
Working with strings
Arrays
Initializing arrays
Populating arrays
Accessing arrays
The empty and isset functions
Searching for elements in an array
Ordering arrays
Other array functions
PHP in web applications
Processing
Display
Formatting
Tokenising
Regular expressions
Control structures
Conditionals
Switch…case
Loops – While, Do While, For, Foreach
Functions
Function declaration
Function arguments
The return statement
Type hinting and return types
The filesystem
Reading files
Writing files
Other filesystem functions
Creating Clean Code with OOP
Classes and objects
Class properties
Class methods
Class constructors
Magic methods
Properties and methods visibility
Encapsulation
Static properties and methods
Namespaces
Autoloading classes
Using the __autoload function
Inheritance
Introducing inheritance
Overriding methods
Abstract classes
Interfaces
Polymorphism
Traits
Handling exceptions
The try…catch block
The finally block
Catching different types of exceptions
Design patterns
Factory
Singleton
Anonymous functions
Using Databases
MySQL
Schemas and tables
Understanding schemas
Database data types – Numeric, String, DateTime, List of Values
Managing tables
Keys and constraints
Primary keys
Foreign keys
Unique keys
Indexes
Inserting, Deleting, Querying data
Using PDO
Connecting to the database
Performing queries with Prepared statements
Updating and deleting data
Updating data
Foreign key behaviours
Deleting data
Adapting to MVC
The MVC pattern
Using Composer
Managing dependencies
Autoloader with PSR-4
Adding metadata
The index.php file
Working with requests
The request object
Filtering parameters from requests
Mapping routes to controllers
The router
M for model
The customer model
The book model
The sales model
V for view 207
Introduction to Twig
The book view
Layouts and blocks
Paginated book list
The sales view
The error template
The login template
C for controller 215
The error controller
The login controller
The book controller
Borrowing books
The sales controller
Dependency injection
Why is dependency injection necessary?
Implementing our own dependency injector
Testing Web Applications
Types of tests
Unit tests and code coverage
Integrating PHPUnit
The phpunit.xml file
Your first test
Running test
Writing unit tests
The start and end of a test
Assertions
Expecting exceptions
Data providers
Using Existing PHP Frameworks
The purpose of frameworks
The main parts of a framework
Other features of frameworks
Authentication and roles
ORM
Cache
Internationalization
Types of frameworks
Complete and robust frameworks
Lightweight and flexible frameworks
An overview of famous frameworks
Symfony 4
Zend Framework 2
Other frameworks
The Laravel framework
Installation
Project setup
Adding the first endpoint
Managing users
Setting up relationships in models
Creating complex controllers
Adding tests
Who should attend
Feedback
4.8 out of 5 average
"Our tailored course provided a well rounded introduction and also covered some intermediate level topics that we needed to know. Clive gave us some best practice ideas and tips to take away. Fast paced but the instructor never lost any of the delegates"
Brian Leek, Data Analyst, May 2022
“JBI did a great job of customizing their syllabus to suit our business needs and also bringing our team up to speed on the current best practices. Our teams varied widely in terms of experience and the Instructor handled this particularly well - very impressive”
Brian F, Team Lead, RBS, Data Analysis Course, 20 April 2022