Skip to content Skip to footer
-70%

Programming PHP: Creating Dynamic Web Pages 4th Edition by Kevin Tatroe, ISBN-13: 978-1492054139

Original price was: $50.00.Current price is: $14.99.

 Safe & secure checkout

Description

Description

Programming PHP: Creating Dynamic Web Pages 4th Edition by Kevin Tatroe, ISBN-13: 978-1492054139

[PDF eBook eTextbook] – Available Instantly

  • Publisher: ‎ O’Reilly Media; 4th edition (April 21, 2020)
  • Language: ‎ English
  • 544 pages
  • ISBN-10: ‎ 1492054135
  • ISBN-13: ‎ 978-1492054139

Why is PHP the most widely used programming language on the web? This updated edition teaches everything you need to know to create effective web applications using the latest features in PHP 7.4. You’ll start with the big picture and then dive into language syntax, programming techniques, and other details, using examples that illustrate both correct usage and common idioms.

If you have a working knowledge of HTML, authors Kevin Tatroe and Peter MacIntyre provide many style tips and practical programming advice in a clear and concise manner to help you become a top-notch PHP programmer.

  • Understand what’s possible when you use PHP programs
  • Learn language fundamentals, including data types, variables, operators, and flow control statements
  • Explore functions, strings, arrays, and objects
  • Apply common web application techniques, such as form processing, data validation, session tracking, and cookies
  • Interact with relational databases like MySQL or NoSQL databases such as MongoDB
  • Generate dynamic images, create PDF files, and parse XML files
  • Learn secure scripts, error handling, performance tuning, and other advanced topics
  • Get a quick reference to PHP core functions and standard extensions

Table of Contents:

Foreword

Preface

Audience

Assumptions This Book Makes

Contents of This Book

Conventions Used in This Book

O’Reilly Online Learning

How to Contact Us

Acknowledgments

Kevin Tatroe

Peter MacIntyre

1. Introduction to PHP

What Does PHP Do?

A Brief History of PHP

The Evolution of PHP

The Widespread Use of PHP

Installing PHP

A Walk Through PHP

Configuration Page

Forms

Databases

Graphics

What’s Next

2. Language Basics

Lexical Structure

Case Sensitivity

Statements and Semicolons

Whitespace and Line Breaks

Comments

Literals

Identifiers

Keywords

Data Types

Integers

Floating-Point Numbers

Strings

Booleans

Arrays

Objects

Resources

Callbacks

NULL

Variables

Variable Variables

Variable References

Variable Scope

Garbage Collection

Expressions and Operators

Number of Operands

Operator Precedence

Operator Associativity

Implicit Casting

Arithmetic Operators

String Concatenation Operator

Auto-Increment and Auto-Decrement Operators

Comparison Operators

Bitwise Operators

Logical Operators

Casting Operators

Assignment Operators

Miscellaneous Operators

Flow-Control Statements

if

switch

while

for

foreach

try…catch

declare

exit and return

goto

Including Code

Embedding PHP in Web Pages

Standard (XML) Style

SGML Style

Echoing Content Directly

What’s Next

3. Functions

Calling a Function

Defining a Function

Variable Scope

Global Variables

Static Variables

Function Parameters

Passing Parameters by Value

Passing Parameters by Reference

Default Parameters

Variable Parameters

Missing Parameters

Type Hinting

Return Values

Variable Functions

Anonymous Functions

What’s Next

4. Strings

Quoting String Constants

Variable Interpolation

Single-Quoted Strings

Double-Quoted Strings

Here Documents

Printing Strings

echo

print()

printf()

print_r() and var_dump()

Accessing Individual Characters

Cleaning Strings

Removing Whitespace

Changing Case

Encoding and Escaping

HTML

URLs

SQL

C-String Encoding

Comparing Strings

Exact Comparisons

Approximate Equality

Manipulating and Searching Strings

Substrings

Miscellaneous String Functions

Decomposing a String

String-Searching Functions

Regular Expressions

The Basics

Character Classes

Alternatives

Repeating Sequences

Subpatterns

Delimiters

Match Behavior

Character Classes

Anchors

Quantifiers and Greed

Noncapturing Groups

Backreferences

Trailing Options

Inline Options

Lookahead and Lookbehind

Cut

Conditional Expressions

Functions

Differences from Perl Regular Expressions

What’s Next

5. Arrays

Indexed Versus Associative Arrays

Identifying Elements of an Array

Storing Data in Arrays

Appending Values to an Array

Assigning a Range of Values

Getting the Size of an Array

Padding an Array

Multidimensional Arrays

Extracting Multiple Values

Slicing an Array

Splitting an Array into Chunks

Keys and Values

Checking Whether an Element Exists

Removing and Inserting Elements in an Array

Converting Between Arrays and Variables

Creating Variables from an Array

Creating an Array from Variables

Traversing Arrays

The foreach Construct

The Iterator Functions

Using a for Loop

Calling a Function for Each Array Element

Reducing an Array

Searching for Values

Sorting

Sorting One Array at a Time

Natural-Order Sorting

Sorting Multiple Arrays at Once

Reversing Arrays

Randomizing Order

Acting on Entire Arrays

Calculating the Sum of an Array

Merging Two Arrays

Calculating the Difference Between Two Arrays

Filtering Elements from an Array

Using Arrays to Implement Data Types

Sets

Stacks

Implementing the Iterator Interface

What’s Next

6. Objects

Objects

Terminology

Creating an Object

Accessing Properties and Methods

Declaring a Class

Declaring Methods

Declaring Properties

Declaring Constants

Inheritance

Interfaces

Traits

Abstract Methods

Constructors

Destructors

Anonymous Classes

Introspection

Examining Classes

Examining an Object

Sample Introspection Program

Serialization

What’s Next

7. Dates and Times

What’s Next

8. Web Techniques

HTTP Basics

Variables

Server Information

Processing Forms

Methods

Parameters

Self-Processing Pages

Sticky Forms

Multivalued Parameters

Sticky Multivalued Parameters

File Uploads

Form Validation

Setting Response Headers

Different Content Types

Redirections

Expiration

Authentication

Maintaining State

Cookies

Sessions

Combining Cookies and Sessions

SSL

What’s Next

9. Databases

Using PHP to Access a Database

Relational Databases and SQL

PHP Data Objects

MySQLi Object Interface

Retrieving Data for Display

SQLite

Direct File-Level Manipulation

MongoDB

Retrieving Data

Inserting More Complex Data

What’s Next

10. Graphics

Embedding an Image in a Page

Basic Graphics Concepts

Creating and Drawing Images

The Structure of a Graphics Program

Changing the Output Format

Testing for Supported Image Formats

Reading an Existing File

Basic Drawing Functions

Images with Text

Fonts

TrueType Fonts

Dynamically Generated Buttons

Caching the Dynamically Generated Buttons

A Faster Cache

Scaling Images

Color Handling

Using the Alpha Channel

Identifying Colors

True Color Indexes

Text Representation of an Image

What’s Next

11. PDF

PDF Extensions

Documents and Pages

A Simple Example

Initializing the Document

Outputting Basic Text Cells

Text

Coordinates

Text Attributes

Page Headers, Footers, and Class Extension

Images and Links

Tables and Data

What’s Next

12. XML

Lightning Guide to XML

Generating XML

Parsing XML

Element Handlers

Character Data Handler

Processing Instructions

Entity Handlers

Default Handler

Options

Using the Parser

Errors

Methods as Handlers

Sample Parsing Application

Parsing XML with the DOM

Parsing XML with SimpleXML

Transforming XML with XSLT

What’s Next

13. JSON

Using JSON

Serializing PHP Objects

Options

What’s Next

14. Security

Safeguards

Filtering Input

Escaping Output Data

Security Vulnerabilities

Cross-Site Scripting

SQL Injection

Filename Vulnerabilities

Session Fixation

File Upload Traps

Unauthorized File Access

PHP Code Issues

Shell Command Weaknesses

Data Encryption Concerns

Further Resources

Security Recap

What’s Next

15. Application Techniques

Code Libraries

Templating Systems

Handling Output

Output Buffering

Output Compression

Performance Tuning

Benchmarking

Profiling

Optimizing Execution Time

Optimizing Memory Requirements

Reverse Proxies and Replication

What’s Next

16. Web Services

REST Clients

Responses

Retrieving Resources

Updating Resources

Creating Resources

Deleting Resources

XML-RPC

Servers

Clients

What’s Next

17. Debugging PHP

The Development Environment

The Staging Environment

The Production Environment

php.ini Settings

Error Handling

Error Reporting

Exceptions

Error Suppression

Triggering Errors

Defining Error Handlers

Manual Debugging

Error Logs

IDE Debugging

Additional Debugging Techniques

What’s Next

18. PHP on Disparate Platforms

Writing Portable Code for Windows and Unix

Determining the Platform

Handling Paths Across Platforms

Navigating the Server Environment

Sending Mail

End-of-Line Handling

End-of-File Handling

Using External Commands

Accessing Platform-Specific Extensions

Interfacing with COM

Background

PHP Functions

API Specifications

Function Reference

PHP Functions by Category

Arrays

Classes and Objects

Data Filtering

Date and Time

Directories

Errors and Logging

Filesystem

Functions

Mail

Math

Miscellaneous Functions

Network

Output Buffering

PHP Language Tokenizer

PHP Options/Info

Program Execution

Session Handling

Streams

Strings

URLs

Variables

Zlib

Alphabetical Listing of PHP Functions

Index

Kevin Tatroe has been an Apple Platforms and web stack engineer for almost 30 years, developing websites and mobile, desktop, and TV apps both small and enormous. He’s attracted to technologies that allow for rapid iteration, experimentation, and highly opinionated architecture. Kevin, his wife Jenn, his son Hadden, and their two cats are recent transplants to Los Angeles, trading the quiet farmland of Colorado for the bustle of Hollywood. Their house remains filled with LEGO creations, board games, books, and numerous other distractions.

Peter MacIntyre has over 28 years of experience in the information technology industry, primarily in the area of PHP and Web Technologies. He has contributed writing material for many IT industry publications: Author of PHP: The Good Parts (O’Reilly); co-author: Pro PHP Programming (APress), Programming PHP (3rd Edition – O’Reilly), Using Visual Objects, Using PowerBuilder 5, ASP.NET Bible, Web Warrior Survey on Web Development Languages, and Zend Studio for Eclipse Developer’s Guide.Peter is a co-founder and past co-chair and past board member for the Northeast PHP Developer’s Conference held in Boston, MA and Charlottetown, PE Canada for the last 6 years (northeastphp.org). As well, Peter has spoken several times at North American and International computer conferences including PHPCE 2017 in Warsaw, Poland; PHP[World] 2016 in Washington, DC; ZendCon 2016 in Las Vegas, NortheastPHP 2017 & 2016 (Charlottetown, PE, Canada), Prairie Dev Con 2016 in Winnipeg, MB, Canada, CA-World in New Orleans, USA; CA-TechniCon in Cologne, Germany; and CA-Expo in Melbourne, Australia. He is a Zend Certified Engineer in PHP 5.3 and PHP 4.0.

What makes us different?

• Instant Download

• Always Competitive Pricing

• 100% Privacy

• FREE Sample Available

• 24-7 LIVE Customer Support

Delivery Info

Reviews (0)