© Andrew Beak 2017
Andrew BeakPHP 7 Zend Certification Study Guidehttps://doi.org/10.1007/978-1-4842-3246-0_8

8. Input-Output

Andrew Beak
Grafham, Cambridgeshire, UK
In this chapter, we’re going to be looking at how PHP manages input-output. We’ll be examining how we can read from or write to the file system as well as the network.


There are two main groups of functions to deal with files: those that work with file resources, and those that work with a filename.
Remember that a resource is a type of variable that can’t be stored directly in PHP. A file resource is an operating system file handle.
All the functions that deal with file resources begin with a single f letter and then have a verb describing their function. For example, fopen() ...

Get PHP 7 Zend Certification Study Guide: Ace the ZCE 2017-PHP Exam now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.