Input/Output

Zend PHP 7 Certification – Input/Output – Reading and Writing

This post covers the Reading and Writing section of the Input/Output chapter when studying for the Zend PHP 7 Certification.
PHP contains many functions that help read and write files and file resources. The functions return the read data or FALSE on failure.
The file_get_contents() reads the contents of the file into string.
The file() …

Zend PHP 7 Certification – Input/Output – Streams

This post covers the Streams section of the Input/Output chapter when studying for the Zend PHP 7 Certification.
Streams are a way of generalising file, network, data compression, and other operations which share a common set of functions and uses.
A stream is usually referenced as scheme://target where scheme is the wrapper or protocol …

Zend PHP 7 Certification – Input/Output – Filesystem Functions

This post covers the Filesystem Functions section of the Input/Output chapter when studying for the Zend PHP 7 Certification.
PHP provides a number of filesystem functions that help read and write file data. Some of those functions can be seen and described in more details below.
The fopen() function opens a file or a URL. …

Zend PHP 7 Certification – Input/Output – Files

This post covers the Files section of the Input/Output chapter when studying for the Zend PHP 7 Certification.
PHP has several functions for creating, reading, uploading, and editing files.
The two main types of functions that PHP use are listed below.

f* – Functions that work with a file resource. For example, fopen().
file* …