Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Intro to PHP 7

Intro to PHP 7

Nedeljko Damnjanovic

October 22, 2015
Tweet

More Decks by Nedeljko Damnjanovic

Other Decks in Programming

Transcript

  1. 2015. • 2004. PHP 5.0
 • PHP 6
 • Important

    year for the PHP community
 • End of November
  2. What’s there to know? • Impact on current codebase
 •

    Is it safe to update
 • What’s really changed

  3. Backward compatibility • Deprecated methods are removed 
 (ASP tags

    (<% %>, <%=), split, mysql extension) • Uniform Variable Syntax 
 force normal expression evaluation order
  4. Engine exceptions • Facilitate handling errors
 • Fatal and recoverable

    fatal errors -> exceptions
 • We should catch those exceptions and handle
  5. New features • New operators
 • spaceship 
 • null

    coalesce
 • scalar type hint
 • return type hint
  6. Scalar type hints • Integers, floats, strings and booleans as

    type hints
 • non restrictive (float to int)
 • it’s possible to enable strict mode