Skip to Content
PHP 7: Real World Application Development
book

PHP 7: Real World Application Development

by Doug Bierer, Altaf Hussain, Branko Ajzele
September 2016
Intermediate to advanced
1091 pages
21h 41m
English
Packt Publishing
Content preview from PHP 7: Real World Application Development

Chapter 3. Working with PHP Functions

In this chapter we will cover the following topics:

  • Developing functions
  • Hinting at data types
  • Using return value data typing
  • Using iterators
  • Writing your own iterator using generators

Introduction

In this chapter we will consider recipes that take advantage of PHP's functional programming capabilities. Functional, or procedural, programming is the traditional way PHP code was written prior to the introduction of the first implementation of object-oriented programming (OOP) in PHP version 4. Functional programming is a programming paradigm—a style of building the structure and elements of computer programs—that treats computation as the evaluation of mathematical functions and avoids changing-state and mutable data. ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Pro PHP Programming

Pro PHP Programming

Peter MacIntyre, Brian Danchilla, Mladen Gogala
Learning PHP 7

Learning PHP 7

Antonio L Zapata (GBP)
Intermediate PHP

Intermediate PHP

Lorna Jane Mitchell
Mastering PHP 7

Mastering PHP 7

Branko Ajzele

Publisher Resources

ISBN: 9781787129009