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

Last Month in PHP - September 2013

John Kary
September 21, 2013

Last Month in PHP - September 2013

Kansas City PHP User Group
September 21, 2013

John Kary

September 21, 2013
Tweet

More Decks by John Kary

Other Decks in Programming

Transcript

  1. Last Month in PHP September 21, 2013 Kansas City PHP

    User Group Slides: http://johnkary.net/talks John Kary @johnkary
  2. 3.6.1 Maintenance & Security fixes Upgrade NOW! • Block unsafe

    PHP unserialization that could lead to remote code execution. • Prevent a user with an Author role, using a specially crafted request, from being able to create a post “written by” another user. • Fix insufficient input validation that could result in redirecting or leading a user to another website.
  3. namespace John\Say { function hello() { return 'Hello World!'; }

    } Define it namespace { use John\Say; echo Say\hello(); // Hello World! } Use it Using namespaced functions as of PHP <= 5.5
  4. namespace John\Say { function hello() { return 'Hello World!'; }

    } Define it namespace { use function John\Say\hello; echo hello(); // Hello World! } Use it Using namespaced functions as of PHP >= 5.6
  5. Variadic Functions 5.5 function sum() { return array_sum(func_get_args()); } echo

    sum(2, 4, 6, 8); // 20 5.6 function sum(...$args) { return array_sum($args); } echo sum(2, 4, 6, 8); // 20
  6. Variadic Functions - Type Hinting 5.6 function weekends(\DateTime ...$weekends) {

    foreach ($weekends as $date) { echo $date->format('Y-m-d') . ", "; } } $sat1 = new \DateTime('September 21, 2013'); $sun1 = new \DateTime('September 22, 2013'); $sat2 = new \DateTime('September 28, 2013'); $sun2 = new \DateTime('September 29, 2013'); echo weekends($sat1, $sun1, $sat2, $sun2); // 2013-09-21, 2013-09-22, 2013-09-28, 2013-09-29,
  7. ZendCon.com 1-day Workshops 2.5 Days of Sessions • Migrating ZF1

    to ZF2 • Testing Legacy PHP Applications • JS Communication APIs (for mobile) • User Acceptance Testing with Selenium • Intro to using Composer • RESTful APIs with ZF2 • DOs and DONTs of MongoDB • MANY MORE!
  8. Introduction to PHP workshop by php[architect] $250 9am - 4pm

    March 14, 2014 Minneapolis, MN March 15-16, 2014 midwestphp.org