
Master PHP 7 basics and practical development through hands-on examples, database interaction, design patterns, security, and testing, while exploring high performance, functional, and object-oriented programming to build portfolio-ready apps.
Install php 7 using source, pre-compiled binaries, or amp packages on the lamp stack across Windows, Mac, and Linux, with guidance on configuration, testing, and environment considerations.
Activate the built-in PHP web server, define a MySQL database, and import sample data; then install PHPUnit for unit testing and run tests from the command line.
Explore PHP 7's performance gains and memory efficiency, compare it with PHP 5.6, and learn about scalar type hints, return types, the spaceship operator, and null coalesce operator.
Explore basic PHP syntax, including opening and closing tags, statements, and comments, and assemble a hello world script to see how PHP parses and outputs content.
Identify how variables store data in php 7, including boolean, integer, double, and string types, with naming rules, case sensitivity, constants, type juggling, and operators.
Explore how PHP arrays store key-value pairs, including multi-dimensional arrays, and learn common manipulation techniques such as adding, deleting, checking values, retrieving keys, counting, and sorting.
Explore PHP 7 conditional statements, including if, else if, and switch, with examples like cinema ticket routing; learn when to use else branches, default cases, and break or continue.
Learn how PHP 7 loops work, including for, while, do while, and foreach, using counters and break to control execution and iterate arrays.
Learn to implement PHP class autoloading using SPL autoload register, a loader class, and directory mapping to load files on demand with namespaces and error handling.
Learn to hoover a website by loading HTML with a DOMDocument, extracting tags with getElementsByTagName and attributes with getAttribute, and returning a domain-limited array via a Hoover class after autoloading.
Build a deep web scanner in PHP 7 by scanning a target site, hoovering tags and attributes, and streaming results with yield from and a delegating generator.
Learn to convert php 5 code to php 7 using a code converter that scans files, applies preg_replace_callback based transformations, and adds slash slash warnings for incompatible changes.
Explore the abstract syntax tree in PHP 7, using autoloading and a data filtering and validating class. Learn how to call return values, access arrays, and map filters with __call.
Explore how parsing differs between PHP 5 and PHP 7, with left-to-right evaluation in PHP 7, right-to-left in PHP 5, and the behavior of variable variables and callbacks.
Learn how foreach handling differs between PHP 5 and PHP 7, with faster performance and changes to current, unset, and array push, pop, and shift inside loops.
Explains how PHP 7 enhancements boost performance using anonymous functions and fast parameter passing, with a generator scanning a log file for IP addresses.
Learn to iterate through massive files in PHP 7 using the SPL FileObject and line- or length-based iterators. Avoid memory-heavy file_get_contents and use yield to stream output in one pass.
Learn to upload a csv spreadsheet into a database by iterating a large file, extracting each row into a PHP array, and inserting via prepared statements.
Learn to traverse a PHP directory tree with the recursive directory iterator wrapped by the recursive iterator iterator, filter with rejects iterator, and yield results as SPL file info.
Define PHP functions with the function keyword, name them, and declare required and optional parameters with defaults. Explore recursion, static variables, namespaces with use, and variadic parameters in directory scans.
Explore how to enforce function usage with type hints in PHP 7, enable strict types, and manage type errors using scalar, iterable, and date time parameters.
Explore PHP 7 return value data typing, including nullable types and class returns, and see how type juggling, scalar hints, and runtime type errors shape function outputs.
Explore how PHP 7 implements iterators to traverse arrays and directories, using array, directory, filter, limit, and recursive iterators, with pagination and deep iteration examples.
Learn to write your own iterator in PHP 7 using generators and yield to produce values progressively, enabling a filtered, paginated results generator from an array.
Develop PHP classes by defining properties and methods, creating test classes, and using autoloading, with file names matching class names and guidance on single versus multiple classes per file.
Extend classes with the extends keyword to inherit visible methods and properties from a parent to a child class, and explore abstract classes with abstract methods.
Learn how to access properties and methods without instantiating a class using static, differentiate self vs static, and explore late static binding and the factory design pattern in PHP 7.
Explore defining classes in namespaces, prevent class duplication, and enable autoloading through directory-structured namespaces and group use in PHP 7.
Define visibility levels in PHP 7 by using public, protected, and private for properties and methods, and manage access with getters and setters, including the visibility of class constants.
Learn how interfaces define public method signatures and enable type hints, use implements and a factory method to instantiate classes, prototype an api, and resolve collisions.
Learn how PHP 7 traits copy code into classes to avoid duplication, override methods, and resolve conflicts with instead of and alias. See practical examples with id and name traits.
Explore anonymous classes in PHP 7, defining properties, methods, and magic methods, with constructor arguments. Learn to extend, implement interfaces, use traits, and create on-the-fly objects in expressions.
Learn to connect to a database with the PDO extension using a DSN, manage errors with exception mode, and safely execute statements with placeholders and fetch results.
Build an object oriented SQL query builder in PHP 7 using methods that map to SQL operations, a context sensitive lexer, and a fluent interface to render the query.
PHP 7 simplified demonstrates implementing pagination with limit and offset, calculating the offset from the current page, and using an application database paginate class with a connection.
Define entity classes that map to database tables, using a base entity with hydration and array conversion, and dollar mapping for column-to-property translation, plus getters and setters.
Design a repository to tie rdbms query results to entity instances by fetching by id or email, hydrating entities via array data and implementing save, insert, update, and remove operations.
Embed a secondary lookup into query results in PHP 7 by using an anonymous function in the view to fetch a customer's purchases, improving performance and avoiding large joins.
Learn to implement secondary lookups in jQuery DataTables using PHP by moving lookup logic to a separate script, configuring Ajax data sources, and ensuring zero-configuration data tables.
Create a generic form element generator in PHP 7 by defining autoloading, wrappers, and an email element, then add a submit button, labels, error handling, and security-conscious attribute assembly.
Create an HTML radio element generator in PHP 7 by extending the generic form element, defining options and a selected key, and ensuring unique id attributes and proper labeling.
Learn to generate an html select element with options using PHP 7, including single and multiple selections, a dedicated select class, and option rendering.
Create a form factory in PHP 7 that builds a form object from a configuration array, populating elements for output rendering.
Learn to securely process user submissions by chaining post data filters and validators through a configurable array of callbacks, using a result object to capture filtered values and merge messages.
Validate data with chained validators in PHP 7, applying an array of validating callbacks, including global filters, and merging results to reveal missing fields.
link validation messages to form elements and render them beside fields after submission, while filtering data and re-displaying validated results through a factory class with validators and filters.
Learn to convert between PHP and XML by building XML-to-PHP array and PHP-to-XML conversion methods, using simple XML element and iterator classes and a WSDL-based SOAP service.
Learn to build a simple REST client in PHP 7 by defining request and response classes, using streams or curl, and implementing get and post with JSON handling.
Create a simple rest server in PHP 7 by building an API class and a server class that handle JSON requests and HTTP status codes, with token authentication.
Explore how to create a simple SOAP client in PHP 7, using a WSDL to call a weather service and parse XML to populate a city dropdown.
create a simple soap server in php using the soap extension, define a prospect API class with CRUD methods, and generate a WSDL from the API.
Do you want to know all about PHP 7? Are you looking at learning a language that you can use to create robust web applications? If so, welcome to PHP 7 Simplified!
PHP 7 is a popular choice for web-based application development. It is lightweight, no-frills, and powerful. In a nutshell, PHP 7 lets us address the common requirements of current and future web and mobile application development.
PHP 7 Simplified exists as a blend of text, videos, code examples, and assessments, which together makes your learning and creating journey all the more effective.
We’ll start off by getting the basics right. Once your foundational knowledge is firmly established, we’ll put it to practical use by working on a small example application. Then, we’ll move on to learning advanced programming methodologies such as high performance programming, functional programming, and object-oriented programming. The course is structured to ensure that you’re learning about all the industry-standards along the way.
Further on, you’ll build a user profile system, simple shopping cart, and social newsletter service.
Midway through, we’ll learn how to interact with a database. Having done that, you’ll be equipped to build even more complex applications.
We are not done yet. This course wouldn’t be complete without us learning how to implement software design patterns, improve web security, and perform testing and debugging.
The goal of this course is to transform you into a complete PHP 7 developer.
This course is authored by some of the best in the fields.
We combine the best of the following Packt products:
Meet your expert instructors:
Doug Bierer has been hooked on computers since his first program, written in Dartmouth BASIC on a DEC PDP-8, in 1971. His own company is unlikelysource.com, which specializes in consulting, PHP programming, website development, and training.
Jose Palala has been working professionally with PHP for at least 8 years. He has experience working with PHP frameworks such as Eden PHP, CodeIgniter, Laravel and Zend.
Martin Helmich holds a Master's degree in Computer Science from the University of Applied Sciences in Osnabrück. He works as a software architect.
Nicola Pietroluongo is a software engineer with many years of experience. His development background covers over a decade of working in a wide area of development stack building web applications for large companies across Europe.