Preface
Who is this book for
Contents
Other resources
Acknowledgements
- PHP Wiki and Documentation Content
- Getting Started with PHP 7
- PHP 5 Conflicts
Ubuntu 14.04 and 16.04+
Debian 8 & 9
Debian 6 & 7
CentOS / RHEL
Mac OS X
Windows
phpbrew
Docker
Vagrant Image
Build from Source
- Part 1 - New Features
Chapter 1: Scalar Type Hints
- Type Checking Modes
- Be careful where you place
declare - TypeError
- Mixing Modes
- Backwards Compatibility
- Further Reading
Chapter 2: Return Type Declarations
- Returning
null - Sub-Class Methods
- Further Reading
Chapter 3: Combined Comparison (Spaceship) Operator
- Comparing Values
- Sorting
- Sorting by multiple values
- Further Reading
Chapter 4: Null Coalesce Operator
- Differences From
?: - False Values
- Chaining
- Further Reading
Chapter 5: Unicode Codepoint Escape Syntax
- String encoding
- Why the
{}s? - Limitations
- Backwards Compatibility
- Further Reading:
Chapter 6: Anonymous Classes
- Nesting Classes
- Use Cases
- Differences from Named Classes
- Further Reading:
Chapter 7: Group Use Declarations
- Compound Namespaces
- Further Reading:
Chapter 8: Closure call Method
- Further Reading:
Chapter 9: Generator Return Expressions
- Wait, what are generators?
- Further Reading:
Chapter 10: Generator Delegation
- Yielding Values
- Sending Values
- Exceptions
- Return Values
- Further Reading:
Chapter 11: Reliable User-land CSPRNG
- Why not use
randormt_rand? - Backwards Compatibility
- Forwards Compatibility
- Further Reading
Chapter 12: Integer Division
- Backwards Compatibility
- Further Reading
Chapter 13: preg_replace_callback_array
- Backwards Compatibility
- Further Reading
Chapter 14: IntlChar Class
- Backwards Compatibility
- Further Reading
- Part 2 - Language Changes & Improvements
Chapter 15: Performance
- Further Reading
Chapter 16: Language Consistency
- Uniform Variable Syntax
- Abstract Syntax Tree
- Further Reading
Chapter 17: Semi-Reserved Words
- Further Reading
Chapter 18: Error Handling and Exceptions
- Exceptions in the Engine
- Catching
ErrorObjects - Reclassification of
E_STRICTNotices - Backwards Compatibility
- Further Reading
Chapter 19: Expectations
- Don’t rely on assertion behavior
assert()as a statement- Custom errors
- Avoid catching AssertionErrors
- Configuration
- Backwards Compatibility
- Further Reading
Chapter 20: Array Constants in define()
- Further Reading
Chapter 21: Filtered unserialize()
- Secure filtering
- Examples
- Further Reading
Chapter 22: session_start Options
- New options
- Further Reading
Chapter 23: Reflection Enhancements
- ReflectionGenerator
- ReflectionType
- ReflectionParameter
- ReflectionFunctionAbstract
- Backwards Compatibility
- Further Reading
Chapter 24: Integer Semantics
- Casting NaN and Infinity
- Negative bitwise shifting
- Bitwise shifting too far
- Backwards Compatibility
- Further Reading
Chapter 25: Division By Zero Semantics
- Backwards Compatibility
- Further Reading
Chapter 26: JSON Library
- Fractional float values
- Backwards Compatibility
- Further Reading
Chapter 27: Behavior Changes to foreach
- Changes
- Backwards Compatibility
- Further Reading
Chapter 28: Behavior Changes to list
- String Handling
- Empty List Assignment
- Variable Assignment Order
- Backwards Compatibility
- Further Reading
Chapter 29: Parameter Handling Changes
- Duplicate Parameter Names
func_get_arg()andfunc_get_args()- Backwards Compatibility
- Further Reading
Chapter 30: Custom Session Handler Return Values
- Backwards Compatibility
- Further Reading
Chapter 31: Errors on Invalid Octal Literals
- Backwards Compatibility
- Further Reading
- Part 3 - Deprecations & Removals
Chapter 32: Deprecation of PHP 4 Constructors
- Backwards Compatibility
- Further Reading
Chapter 33: Deprecation of Salt Option for password_hash()
- Further Reading
Chapter 34: Removal of Previously-Deprecated Features
- Removed Extensions
- Removed Language Features
- Removed Functions
- Removed INI Options
- Miscellaneous Removed Functionality
- Backwards Compatibility
- Tip: Check For Deprecation Warnings
- Further Reading
Chapter 35: Removal of Alternative PHP Tags
- Migrating From Alternative Tags
- Backwards Compatibility
- Further Reading
Chapter 36: Reclassification and Removal of E_STRICT Notices
- Examples
- Same (compatible) property in two used traits
- Accessing static property non-statically
- Only variables should be assigned by reference
- Only variables should be passed by reference
- Calling non-static methods statically
- Backwards Compatibility
- Further Reading
Chapter 37: Removal of Multiple Defaults in Switches
- Backwards Compatibility
- Further Reading
Chapter 38: Removal of Numeric Hexadecimal String Support
- Backwards Compatibility
- Further Reading
Chapter 39: Removal of Dead SAPIs and Extensions
- Dead SAPIs
- Dead Extensions
- Backwards Compatibility
- Further Reading
Chapter 40: Removal of the date.timezone Warning
- Further Reading
- Appendix - Backward Compatibility Breaks
Language Changes
- Variable handling
list()behaviorforeachbehavior- Parameter handling
- Integer handling
- String handling
- Error handling
- Other language changes
Standard Library Changes
Other Changes
- Curl
- Date
- DBA
- GMP
- Intl
- libxml
- Mcrypt
- Session
- Opcache
- OpenSSL
- PCRE:
- PDO_pgsql:
- Standard:
- JSON:
- Stream:
- XSL:
