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

Last 6 Months in PHP - April 2014

Last 6 Months in PHP - April 2014

Kansas City PHP User Group
April 4, 2014

John Kary

April 02, 2014
Tweet

More Decks by John Kary

Other Decks in Technology

Transcript

  1. Last Month in PHP April 2, 2014
 Kansas City PHP

    User Group Slides: http://johnkary.net/talks John Kary @johnkary 6 months
  2. 2.3.0 2.2.6 2.1.6 1.12.4 2.4.2 2.3.11 2.2.11 2.1.13 2.0.25 3.8.1

    7.26 6.30 = Contains at least 1 major security fix in the last 6 months = New major version in the last 6 months Upgrade NOW!
  3. 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
  4. 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,