Download PHP 7 Zend Certification Study Guide: Ace the ZCE 2017-PHP Exam PDF

TitlePHP 7 Zend Certification Study Guide: Ace the ZCE 2017-PHP Exam
File Size2.7 MB
Total Pages311
Table of Contents
                            Contents
About the Author
About the Technical Reviewer
Introduction
Chapter 1: PHP Basics
	Introduction
	Basic Language Features
	Inserting PHP into Web Pages
	Language Constructs
	Comments
	Representing Numbers
	Variables
		Variable Types
			Scalar Types
			Composite Types
			Casting Variables
			Floats and Integers
		Naming Variables
		Checking If a Variable Has Been Set
	Constants
	Superglobals
	Magic Constants
	Operators
		Arithmetic
		Logic Operators
		Ternary Operator
		Null Coalescing Operator
		Spaceship
		Bitwise
		Bit Shifting
		Bitwise NOT
		Assignment Operators
		Reference Operator
		Comparison Operators
		Two More Operators
	Control Structures
		Conditional Structures
		Loops
		Breaking Out of Loops
		Namespaces
		Fully Qualified Namespace Names
	Configuration
		Where Settings May Be Set or Changed
		Php.ini
		User INI Files
		Apache Version of INI Files
	Performance
		Memory Management
		Symbols Are Pointed to zval Containers
		Arrays and Objects
		Memory Leaks in Arrays and Objects
		Garbage Collection
		The Opcode Cache
		Extensions
			Installing an Extension
			Checking for Installed Extensions
Chapter 2: Functions
	Arguments
		Argument Type Declarations
			Alternate Null Type Syntax
		Optional Arguments
		Overloading Functions
		Variadics
	References
	Variable Functions
	Returns
		Return Type Declarations
		Return Void
		Return by Reference
	Variable Scope in Functions
	Lambda and Closure
		Early and Late Binding
		Binding Closures to Scopes
		Self-Executing Closures
	Callables
Chapter 3: Strings and Patterns
	Declaring Strings
		Embedding Variables
		Control Characters
		Heredoc and Nowdoc
	Referencing Characters in Strings
	PHP and Multibyte Strings
		Unicode
		Telling Clients How a String Is Encoded
		Changing Between Encoding Schemes
		Practical Example
		Matching Strings
	Extracting Strings
	Searching Strings
		Useful Tips
		Quick Overview of Search Functions
		Replacing Strings
	Formatting Strings
	Formatting Numbers
	String Patterns: Regular Expressions
		Delimiters
		Meta-Characters
		Generic Character Types
		Boundaries
		Character Classes
		Matching More Than Once
		Capturing Groups
		Greed and Laziness
		Getting All Matches
		Naming Groups
		Pattern Modifiers
Chapter 4: Arrays
	Declaring and Referencing Arrays
	Functions That Create an Array
	Array Operators
	Proper ties of PHP Array Keys
		Filling Up Arrays
		Push, Pop, Shift, and Unshift (Oh My!)
	Comparing Arrays
		array_diff()
		array_intersect()
		User-Defined Matching Functions
		Quick List of Comparison Functions
	Combining Arrays
	Splitting Arrays
	Destructuring Arrays
	Calculating with Arrays
	Iterating Through Arrays
		Looping Through Arrays
		Using Array Cursors
		Walking Through Arrays
	Sorting Arrays
		Natural Order Sorting
	Standard PHP Library (SPL): ArrayObject Class
Chapter 5: Object-Oriented PHP
	Declaring Classes and Instantiating Objects
	Autoloading Classes
	Visibility or Access Modifiers
	Instance Properties and Methods
		Properties
		Methods
	Static Methods and Properties
		Static Properties
	Working with Objects
		Copying Objects
		Serializing Objects
		Casting Between Arrays and Objects
		Casting Objects to String
		Class Aliases
	Constructors and Destructors
		Constructor Precedence
		Constructor Parameters
	Inheritance
		The final Keyword
		Overriding
	Interfaces
	Abstract Classes
	Anonymous Classes
	Reflection
	Type Hinting
	Class Constants
	Late Static Binding
		Forwarding calls
			The Call to A::foo()
			The Call to parent::foo()
			The Call to self::foo()
	Magic (__*) Methods
		__get and __set
		__isset and __unset
		__call and __callStatic
		__invoke
		__debugInfo
		More Magic Functions
	Standard PHP Library (SPL)
		Data Structures
		Iterators
		Exceptions
			Logic Exceptions
		File Handling
		ArrayObject
		Observer Pattern
	Generators
		Yield Keyword
		Yielding with Keys
		Yielding NULL
		Yielding by Reference
		Returning from a Generator
		Generator Delegation
	Traits
		Declaring and Using Traits
		Namespacing Traits
		Inheritance and Precedence
		Conflict Resolution
		Visibility
Chapter 6: Security
	Configuration
		Errors and Warnings
			How the Flags Work
		Disabling Functions and Classes
		PHP as an Apache Module
		PHP as a CGI Binary
			Malicious CGI Parameters
			Bypassing Permission Checking
		Running PHP-FPM
	Session Security
		Session Hijacking
		Session Fixation
		Improving Session Security
	Cross-Site Scripting
		Mitigating XSS Attacks
	Cross-Site Request Forgeries
	SQL Injection
		Prepared Statements
		Escaping
		General Principles
	Remote Code Injection
		Functions That Evaluate Strings as Code
		Gaming include and require
	Email Injection
	Filter Input
	Escape Output
		Avoid Log Poisoning
	Encryption and Hashing Algorithms
		Encryption in PHP
		Hash Functions
		Secure Random Strings and Integers
		Salting Passwords
		Checking a Password
		A Quick Note on Error Messages
	File Uploads
	Database Storage
	Avoid Publishing Your Password Online
Chapter 7: Data Formats and Types
	XML
		The Basics of XML
		Well-Formed and Valid
		XML Processing Instructions
		XML Transformations with PHP XSL
		Parsing XML in PHP
			Tree Parsers
			Event-Based Parsers
			Error Codes
			Character Encoding
			The XML Extension
		DOM
			DOM Nodes
		SimpleXML
			Creating SimpleXML Objects
			Iterating Over SimpleXML Objects
			Retrieving Information
			xpath
			Exchanging Data Between DOM and SimpleXML
	SOAP
		What SOAP Does
		Using a SOAP Service
		Offering a SOAP Service
	REST Web Services
		Application and Resource States
		REST Verbs
		HATEOAS
		Request Headers
		Response Headers and Codes
		Sending Requests
	JSON
	Date and Time
		Formatting Dates
		Date Calculations
		Manual Date Calculations
		Comparing Dates
	PHP SPL Data Structures
		Interfaces Related to Data Structures
			Iterator
			Traversable
			ArrayAccess
			Countable
		Lists
		Heaps
		Arrays
		Maps
		Summary of SPL Data Structures
Chapter 8: Input-Output
	Files
		Opening Files
		File Modes
		File Mode Flags
		Reading Files
		Writing to Files
	File System Functions
		Directories
		File Information
		Managing Files
		Determining the Type of a File System Object
		Magic File Constants
	Streams
		Stream Wrappers
		Filters
		Stream Contexts
Chapter 9: Web Features
	Request Types
	Request Data
		The Request Superglobal
		POST
			Receiving POST Data
			Sending POST Data
		GET
			Receiving GET Data
			Sending GET Data
		PUT
			Receiving PUT Data
			Sending PUT Data
	Sessions
		Starting a Session
		Session Identifier and Session Variables
		Ending a Session
		Session Handlers
	File Uploads
		Limiting the Size of Uploads
		Temporary Files
	Forms
		Form Elements
		Arrays in HTML Forms
		Selecting Multiple Items from a List
	Cookies
		Setting Cookies
		Retrieving Cookies
	HTTP Headers
		Sending Headers
		Tracking Headers
	HTTP Authentication
	HTTP Status Codes
	Output Control Functions
Chapter 10: Databases and SQL
	Database Basics
		Keys
		Indexes
		Relationships
		SQL Data Types
		Numeric Types
		Character Types
	Working with SQL
		Creating a Database and Table
		Dropping Database and Tables
		Retrieving Data
		Inserting New Data
		Updating Data
		Aggregating Data
		Grouping Data
	Joins
		Join Types
	Prepared Statements
	Transactions
	PHP Data Object (PDO)
		Connecting to PDO
		Transactions in PDO
		Fetching PDO Results
		Prepared Statements in PDO
		Repeated Calls to PDO Prepared Statements
Chapter 11: Error Handling
	Throwables
		The Throwable Interface
	Errors
		Error Constants
		Using an Error-Handler Function
		Displaying or Suppressing Non-Fatal Error Messages
		Error-Handling Functions
	Exceptions
		Extending Exception Classes
		The Exception Hierarchy
	Handling Exceptions
		Catching Exceptions
		The finally Block
		Setting the Default Exception Handler
Chapter 12: Exercises
Appendix: Quiz Answers
	Chapter 1: PHP Basics
	Chapter 2: Functions
	Chapter 3: Strings and Patterns
	Chapter 4: Arrays
	Chapter 5: Object-Oriented PHP
	Chapter 6: Security
	Chapter 7: Data Structures
	Chapter 8: Input-Output
	Chapter 9: Web Features
	Chapter 10: Databases and SQL
	Chapter 11: Error Handling
	Chapter 12: Exercises
Index
                        

Similer Documents