Posts

Zend PHP 7 Certification – OOP – Static Methods and Properties

This post covers the Static Methods and Properties section of the OOP chapter when studying for the Zend PHP 7 Certification.
Declaring class properties or methods as static, using the static keyword, makes them accessible without needing an instantiation of the class.
A property declared as static cannot be accessed with an instantiated class ...

Zend PHP 7 Certification – OOP – Exceptions

This post covers the Exceptions section of the OOP chapter when studying for the Zend PHP 7 Certification.
An exception can be thrown and caught within PHP like many other programming languages. In PHP, the throw keyword is used to throw an exception.
When wrapping code within a try block, the catch part of the ...

Zend PHP 7 Certification – OOP – Interfaces

This post covers the Interfaces section of the OOP chapter when studying for the Zend PHP 7 Certification.
Object interfaces allow you to create code which specifies which methods a class must implement, without having to define how these methods are handled.
Interfaces are defined using the interface keyword, in the same way as a ...

Zend PHP 7 Certification – OOP – Inheritance

This post covers the Inheritance section of the OOP chapter when studying for the Zend PHP 7 Certification.
When you extend a class in most programming languages, the subclass inherits all of the public and protected methods from the parent class. Unless a class overrides those methods, they will retain their original functionality.
In PHP, ...

Zend PHP 7 Certification – OOP – Instance Methods and Properties

This post covers the Instance Methods and Properties section of the OOP chapter when studying for the Zend PHP 7 Certification.
Class member variables are called properties. You may also see them referred to using other terms such as attributes or fields, but properties are the given name to describe variables belonging to a class.

Zend PHP 7 Certification – OOP – Instantiation

This post covers the Instantiation section of the OOP chapter when studying for the Zend PHP 7 Certification.
Object-oriented programming is a style of coding that allows developers to group similar tasks into classes. This allows code to be easily maintained and you can re-use code from classes without the need of duplication.
Objects can ...

Zend PHP 7 Certification – Security – Secure Socket Layer

This post covers the Secure Socket Layer section of the PHP Security chapter when studying for the Zend PHP 7 Certification.
Secure Socket Layer (SSL) encryption protects data as it is transmitted between client and server.
SSL allows sensitive information such as login credentials to be transmitted securely without being sent in plain text which ...

Zend PHP 7 Certification – Security – File Uploads

This post covers the File Uploads section of the PHP Security chapter when studying for the Zend PHP 7 Certification.
File uploads made via the $_FILES superglobal is filled with user-supplied data and therefore can pose a security risk as the user-supplied data can never be trusted.
The first security risk is that file names ...

Zend PHP 7 Certification – Security – Password Hashing API

This post covers the Password Hashing section of the PHP Security chapter when studying for the Zend PHP 7 Certification.
It is common knowledge that you should never store passwords in plain text. This leads onto discussions about what is the best form of password hashing making them difficult to crack.
PHP hashing algorithms such ...

Zend PHP 7 Certification – Security – Escape Output

This post covers the Escape Output section of the PHP Security chapter when studying for the Zend PHP 7 Certification.
One of the fundamentals rules of security in any programming language is escaping output. Consider the following script that is vulnerable to a Cross-Site Scripting (XSS) attack.
<?php
$name = $_GET['name'];
echo "Hi ...