[git] presentations.git branch master updated. 4ffa5a6
| From: | rasmus@php.net | Date: | Thu, 02 Feb 2012 18:45:47 +0000 |
| Subject: | [git] presentations.git branch master updated. 4ffa5a6 | ||
| Groups: | php.pres | ||
| Request: | Send a blank email to pres+get-1769@lists.php.net to get a copy of this message | ||
The branch, master on presentations.git has been updated
via 4ffa5a655b34b86fcdb388087c2691f0d75e2dca (commit)
from e927586d1e215c4b964972cae9b6286fe1caef07 (commit)
http://git.php.net/?p=presentations.git;a=log;h=4ffa5a655b34b86fcdb388087c2691f0d75e2dca;hp=e927586d1e215c4b964972cae9b6286fe1caef07
Summary of changes:
soflo2011.xml => etsy2012.xml | 23 +++++++-----
slides/fowa/hist1.xml | 2 +-
slides/fowa/hist2.xml | 2 +-
slides/fowa/hist3.xml | 2 +-
slides/fowa/hist4.xml | 2 +-
slides/fowa/hist5.xml | 2 +-
slides/intro/{2011.xml => 2012.xml} | 11 +++---
slides/intro/contribute.xml | 11 ++++++
slides/intro/key_ref2012.xml | 20 +++++++++++
slides/intro/php53_closures.xml | 36 ++++++++++++++++++++
.../{php53_closures.xml => php53_closures1.xml} | 12 ------
slides/intro/php53_closures2.xml | 16 +++++++++
slides/intro/php53_closures3.xml | 21 +++++++++++
slides/intro/php53_closures4.xml | 21 +++++++++++
slides/intro/php54_clstatic.xml | 20 +++++++++++
slides/intro/php54_misc.xml | 10 ++++-
slides/intro/php54_tfcs.xml | 21 ++++++++++--
17 files changed, 194 insertions(+), 38 deletions(-)
copy soflo2011.xml => etsy2012.xml (83%)
copy slides/intro/{2011.xml => 2012.xml} (58%)
create mode 100644 slides/intro/contribute.xml
create mode 100644 slides/intro/key_ref2012.xml
copy slides/intro/{php53_closures.xml => php53_closures1.xml} (62%)
create mode 100644 slides/intro/php53_closures2.xml
create mode 100644 slides/intro/php53_closures3.xml
create mode 100644 slides/intro/php53_closures4.xml
create mode 100644 slides/intro/php54_clstatic.xml
-- Log ----------------------------------------
commit 4ffa5a655b34b86fcdb388087c2691f0d75e2dca
Author: Rasmus Lerdorf <rasmus@php.net>
Date: Thu Feb 2 10:27:50 2012 -0500
2012 slides
diff --git a/etsy2012.xml b/etsy2012.xml
new file mode 100644
index 0000000..92d5c1a
--- /dev/null
+++ b/etsy2012.xml
@@ -0,0 +1,92 @@
+<presentation
+ template="simple"
+ navmode="html"
+ titlecolor="#000000"
+ navbarbackground="#bbbbbb"
+ navbartopiclinks="0"
+ logo1="images/php-med-trans.png"
+ titlesize="6em"
+ navbarheight="3.5em"
+ examplebackground="#ffffff"
+ outputbackground="#ffffff"
+ exampleclass="noshadow"
+ exampleoutputclass="noshadow"
+>
+<!--
+Performance
+-->
+
+<topic>PHP</topic>
+<title>PHP in 2012</title>
+<event>Etsy Code as Craft</event>
+<location>Brooklyn, NY</location>
+<date>Feb.2, 2012</date>
+<speaker>Rasmus Lerdorf</speaker>
+<url>http://talks.php.net/show/etsy2012</url>
+<twitter>@rasmus or find me on G+</twitter>
+
+<slide>slides/intro/titlepage.xml</slide>
+
+<!-- Intro -->
+
+<slide>slides/fowa/hist1.xml</slide>
+<slide>slides/fowa/hist2.xml</slide>
+<slide>slides/fowa/hist3.xml</slide>
+<slide>slides/fowa/hist4.xml</slide>
+<slide>slides/fowa/hist5.xml</slide>
+<slide>slides/intro/howwon.xml</slide>
+<slide>slides/intro/rss_flickr.xml</slide>
+<slide>slides/intro/api_flickr.xml</slide>
+<slide>slides/intro/api_flickr2.xml</slide>
+<slide>slides/intro/api_yql1.xml</slide>
+<slide>slides/intro/api_yql2.xml</slide>
+
+<slide>slides/intro/2012.xml</slide>
+<slide>slides/intro/eventmq.xml</slide>
+
+<slide>slides/intro/performance_title.xml</slide>
+<slide>slides/intro/dev_tips1.xml</slide>
+<slide>slides/intro/dev_tips2.xml</slide>
+<slide>slides/intro/dev_tips3.xml</slide>
+<slide>slides/intro/dev_tips4.xml</slide>
+<slide>slides/intro/dev_tips5.xml</slide>
+<slide>slides/intro/arch_tips.xml</slide>
+
+<slide>slides/intro/php53_title.xml</slide>
+<slide>slides/intro/php53_perf.xml</slide>
+<slide>slides/intro/php53_closures1.xml</slide>
+<slide>slides/intro/php53_closures2.xml</slide>
+<slide>slides/intro/php53_closures3.xml</slide>
+<slide>slides/intro/php53_closures4.xml</slide>
+<slide>slides/intro/php53_namespaces.xml</slide>
+<slide>slides/intro/php53_lsb.xml</slide>
+<slide>slides/intro/php53_gc.xml</slide>
+<slide>slides/intro/php53_nowdoc.xml</slide>
+<slide>slides/intro/php53_goto.xml</slide>
+<slide>slides/intro/php53_tern.xml</slide>
+<slide>slides/intro/php53_dir.xml</slide>
+<slide>slides/intro/php53_callstatic.xml</slide>
+<slide>slides/intro/php53_dynamicstatic.xml</slide>
+<slide>slides/intro/php53_date.xml</slide>
+<slide>slides/intro/php53_spl.xml</slide>
+<slide>slides/intro/php53_fpm.xml</slide>
+<slide>slides/intro/php54_title.xml</slide>
+<slide>slides/intro/php54_perf.xml</slide>
+<slide>slides/intro/php54_removed.xml</slide>
+<slide>slides/intro/php54_traits.xml</slide>
+<slide>slides/intro/php54_sarrays.xml</slide>
+<slide>slides/intro/php54_fad.xml</slide>
+<slide>slides/intro/php54_imc.xml</slide>
+<slide>slides/intro/php54_tfcs.xml</slide>
+<slide>slides/intro/php54_clstatic.xml</slide>
+<slide>slides/intro/php54_callable.xml</slide>
+<slide>slides/intro/php54_server.xml</slide>
+<slide>slides/intro/php54_binary.xml</slide>
+<slide>slides/intro/php54_emsgs.xml</slide>
+<slide>slides/intro/php54_arraywarn.xml</slide>
+<slide>slides/intro/php54_json.xml</slide>
+<slide>slides/intro/php54_misc.xml</slide>
+<slide>slides/intro/contribute.xml</slide>
+<slide>slides/intro/key_ref2012.xml</slide>
+
+</presentation>
diff --git a/slides/fowa/hist1.xml b/slides/fowa/hist1.xml
index de5a908..142d9a6 100644
--- a/slides/fowa/hist1.xml
+++ b/slides/fowa/hist1.xml
@@ -1,4 +1,4 @@
-<slide title="History">
+<slide title="">
<blurb fontsize="16em" align="center">1993</blurb>
<image align="center" filename="mosaic.jpg"/>
</slide>
diff --git a/slides/fowa/hist2.xml b/slides/fowa/hist2.xml
index de9fdda..41e9ce3 100644
--- a/slides/fowa/hist2.xml
+++ b/slides/fowa/hist2.xml
@@ -1,4 +1,4 @@
-<slide title="History">
+<slide title="">
<blurb fontsize="16em" align="center">1993</blurb>
<example fontsize="2.5em"><![CDATA[<HTML>
<HEAD>
diff --git a/slides/fowa/hist3.xml b/slides/fowa/hist3.xml
index cf854e8..5dc65b7 100644
--- a/slides/fowa/hist3.xml
+++ b/slides/fowa/hist3.xml
@@ -1,4 +1,4 @@
-<slide title="History">
+<slide title="">
<blurb fontsize="16em" align="center">1994</blurb>
<example fontsize="1.7em"><![CDATA[<!--getenv HTTP_USER_AGENT-->
<!--ifsubstr $exec_result Mozilla-->
diff --git a/slides/fowa/hist4.xml b/slides/fowa/hist4.xml
index 2911d6c..b6dfe1c 100644
--- a/slides/fowa/hist4.xml
+++ b/slides/fowa/hist4.xml
@@ -1,4 +1,4 @@
-<slide title="History">
+<slide title="">
<blurb fontsize="16em" align="center">1995</blurb>
<example fontsize="1.5em"><![CDATA[<?
$name = "bob";
diff --git a/slides/fowa/hist5.xml b/slides/fowa/hist5.xml
index ba0ee3e..671656d 100644
--- a/slides/fowa/hist5.xml
+++ b/slides/fowa/hist5.xml
@@ -1,4 +1,4 @@
-<slide title="History">
+<slide title="">
<blurb fontsize="16em" align="center">2005</blurb>
<example fontsize="1.2em"><![CDATA[<?php
class db {
diff --git a/slides/intro/2012.xml b/slides/intro/2012.xml
new file mode 100644
index 0000000..5e3d57f
--- /dev/null
+++ b/slides/intro/2012.xml
@@ -0,0 +1,15 @@
+<slide title="2012">
+
+<blurb fontsize="5em">Things on my mind in 2012</blurb>
+<list>
+<item fontsize="2.5em">HashDoS sucks!</item>
+<item fontsize="2.5em">PHP 5.4</item>
+<item fontsize="2.5em">0 Failed tests</item>
+<item fontsize="2.5em">Gearman worker management support in PHP-FPM</item>
+<item fontsize="2.5em">SVM</item>
+<item fontsize="2.5em">PHP libevent</item>
+<item fontsize="2.5em">ZeroMQ</item>
+<item fontsize="2.5em">I should get an actual job</item>
+</list>
+
+</slide>
diff --git a/slides/intro/contribute.xml b/slides/intro/contribute.xml
new file mode 100644
index 0000000..939994c
--- /dev/null
+++ b/slides/intro/contribute.xml
@@ -0,0 +1,11 @@
+<slide title="Contribute">
+
+<break lines="3" />
+<link fontsize="2.8em" marginleft="1.5em" leader="Test release
candidates: " href="http://qa.php.net"/>
+<link fontsize="2.8em" marginleft="1.5em" leader="Track down a failed
test: " href="http://qa.php.net"/>
+<link fontsize="2.8em" marginleft="1.5em" leader="File constructive bug
reports: " href="http://bugs.php.net"/>
+<link fontsize="2.8em" marginleft="1.5em" leader="Help us process bug
reports: " href="http://bugs.php.net"/>
+<link fontsize="2.8em" marginleft="1.5em" leader="Help document: "
href="http://edit.php.net"/>
+<link fontsize="2.8em" marginleft="1.5em" leader="Submit a feature RFC:
" href="http://wiki.php.net"/>
+
+</slide>
diff --git a/slides/intro/key_ref2012.xml b/slides/intro/key_ref2012.xml
new file mode 100644
index 0000000..cf3ac59
--- /dev/null
+++ b/slides/intro/key_ref2012.xml
@@ -0,0 +1,20 @@
+<slide title="Conclusion">
+<break lines="2"/>
+<list fontsize="4em">
+<bullet>Make sure you are on PHP 5.3</bullet>
+<bullet>Help us test PHP 5.4 now</bullet>
+<bullet>Contribute!</bullet>
+</list>
+<break lines="2"/>
+<link fontsize="2.5em" marginleft="2em" leader="Slides: "
href=":-:url:-:"/>
+<link fontsize="2.5em" marginleft="2em" leader="5.2->5.3: "
href="http://php.net/migration53"/>
+<link fontsize="2.5em" marginleft="2em" leader="5.3->5.4: "
href="http://php.net/migration54"/>
+<link fontsize="2.5em" marginleft="2em" leader="Wiki: "
href="http://wiki.php.net"/>
+<link fontsize="2.5em" marginleft="2em" leader="Bugs: "
href="http://bugs.php.net"/>
+<link fontsize="2.5em" marginleft="2em" leader="SVM: "
href="http://pecl.php.net/package/svm"/>
+<link fontsize="2.5em" marginleft="2em" leader="LibEvent: "
href="http://pecl.php.net/package/libevent"/>
+<link fontsize="2.5em" marginleft="2em" leader="ZeroMQ: "
href="http://php.zero.mq"/>
+<link fontsize="2.5em" marginleft="2em" leader="xhprof: "
href="http://pecl.php.net/package/xhprof"/>
+<link fontsize="2.5em" marginleft="2em" leader="Xdebug: "
href="http://xdebug.org/docs/profiler"/>
+<link fontsize="2.5em" marginleft="2em" leader="HipHop: "
href="https://github.com/facebook/hiphop-php"/>
+</slide>
diff --git a/slides/intro/php53_closures.xml b/slides/intro/php53_closures.xml
index ff740c4..8fb4b96 100644
--- a/slides/intro/php53_closures.xml
+++ b/slides/intro/php53_closures.xml
@@ -26,4 +26,40 @@ $getClosure = function($v) {
$closure = $getClosure(2);
$closure();]]></example>
+<break lines="1" />
+
+<blurb fontsize="4em">Remember closures are early-binding</blurb>
+<example fontsize="1.4em" result='1'
title=""><![CDATA[<?php
+function getMsgFnc() {
+ global $msg;
+ return function() use ($msg) {
+ echo "Msg: {$msg}!<br/>\n";
+ };
+}
+
+$GLOBALS['msg'] = "Hello";
+$fnc = getMsgFnc();
+$fnc();
+$GLOBALS['msg'] = "World";
+$fnc();
+]]></example>
+
+<break lines="1" />
+
+<blurb fontsize="4em">However, you can do this:</blurb>
+<example fontsize="1.4em" result='1'
title=""><![CDATA[<?php
+function getMsgFnc2() {
+ global $msg;
+ return function() use (&$msg) {
+ echo "Msg: {$msg}!<br/>\n";
+ };
+}
+
+$GLOBALS['msg'] = "Hello";
+$fnc = getMsgFnc2();
+$fnc();
+$GLOBALS['msg'] = "World";
+$fnc();
+]]></example>
+
</slide>
diff --git a/slides/intro/php53_closures.xml b/slides/intro/php53_closures1.xml
similarity index 62%
copy from slides/intro/php53_closures.xml
copy to slides/intro/php53_closures1.xml
index ff740c4..7bad3e0 100644
--- a/slides/intro/php53_closures.xml
+++ b/slides/intro/php53_closures1.xml
@@ -14,16 +14,4 @@ usort($data,
);
foreach($data as $v) echo "$v ";]]></example>
-<break lines="1" />
-
-<example fontsize="1.4em" result='1'
title=""><![CDATA[<?php
-$getClosure = function($v) {
- return function() use($v) {
- echo "Hello World: $v!\n";
- };
-};
-
-$closure = $getClosure(2);
-$closure();]]></example>
-
</slide>
diff --git a/slides/intro/php53_closures2.xml b/slides/intro/php53_closures2.xml
new file mode 100644
index 0000000..44b51f2
--- /dev/null
+++ b/slides/intro/php53_closures2.xml
@@ -0,0 +1,16 @@
+<slide title="Closures">
+
+<break lines="1" />
+
+<blurb fontsize="4em">You can nest them</blurb>
+<example fontsize="1.4em" result='1'
title=""><![CDATA[<?php
+$getClosure = function($v) {
+ return function() use($v) {
+ echo "Hello World: $v!\n";
+ };
+};
+
+$closure = $getClosure(2);
+$closure();]]></example>
+
+</slide>
diff --git a/slides/intro/php53_closures3.xml b/slides/intro/php53_closures3.xml
new file mode 100644
index 0000000..6d19319
--- /dev/null
+++ b/slides/intro/php53_closures3.xml
@@ -0,0 +1,21 @@
+<slide title="Closures">
+
+<break lines="1" />
+
+<blurb fontsize="4em">Remember closures are early-binding</blurb>
+<example fontsize="1.4em" result='1'
title=""><![CDATA[<?php
+function getMsgFnc() {
+ global $msg;
+ return function() use ($msg) {
+ echo "Msg: {$msg}!<br/>\n";
+ };
+}
+
+$GLOBALS['msg'] = "Hello";
+$fnc = getMsgFnc();
+$fnc();
+$GLOBALS['msg'] = "World";
+$fnc();
+]]></example>
+
+</slide>
diff --git a/slides/intro/php53_closures4.xml b/slides/intro/php53_closures4.xml
new file mode 100644
index 0000000..23959d0
--- /dev/null
+++ b/slides/intro/php53_closures4.xml
@@ -0,0 +1,21 @@
+<slide title="Closures">
+
+<break lines="1" />
+
+<blurb fontsize="4em">However, you can do this:</blurb>
+<example fontsize="1.4em" result='1'
title=""><![CDATA[<?php
+function getMsgFnc2() {
+ global $msg;
+ return function() use (&$msg) {
+ echo "Msg: {$msg}!<br/>\n";
+ };
+}
+
+$GLOBALS['msg'] = "Hello";
+$fnc = getMsgFnc2();
+$fnc();
+$GLOBALS['msg'] = "World";
+$fnc();
+]]></example>
+
+</slide>
diff --git a/slides/intro/php54_clstatic.xml b/slides/intro/php54_clstatic.xml
new file mode 100644
index 0000000..0994bf6
--- /dev/null
+++ b/slides/intro/php54_clstatic.xml
@@ -0,0 +1,20 @@
+<slide title="Static Closures">
+
+<blurb fontsize="4em">If you declare a closure static it won't have access to
$this</blurb>
+<example fontsize="2em" result='0'
title=""><![CDATA[<?php
+class Foo {
+ private $prop;
+ function __construct($prop) {
+ $this->prop = $prop;
+ }
+ public static function getPrinter() {
+ return function() { echo ucfirst($this->prop); };
+ }
+}
+
+$a = new Foo('bar');;
+$func = $a->getPrinter();
+$func(); // Fatal error: Using $this when not in object context
+?>]]></example>
+
+</slide>
diff --git a/slides/intro/php54_misc.xml b/slides/intro/php54_misc.xml
index 7999c8a..88e3c08 100644
--- a/slides/intro/php54_misc.xml
+++ b/slides/intro/php54_misc.xml
@@ -40,12 +40,18 @@
<blurb fontsize="4em">TZ env var is ignored - UTC if not otherwise
set</blurb>
<break lines="1" />
-<blurb fontsize="4em">REQUEST_TIME has microsecond precision and is a double
now</blurb>
+<blurb fontsize="4em">REQUEST_TIME_FLOAT has microsecond precision and is a double
now</blurb>
<break lines="1" />
-<blurb fontsize="4em">readline support for php -a</blurb>
+<blurb fontsize="4em">proper readline support for php -a</blurb>
<break lines="1" />
<blurb fontsize="4em">Add E_STRICT to E_ALL</blurb>
+<break lines="1" />
+<blurb fontsize="4em">crypt() in Blowfish mode now supports hashes marked $2a$,
$2x$, $2y$ and $2z$</blurb>
+
+<break lines="1" />
+<blurb fontsize="4em">Added support for SORT_NATURAL and SORT_FLAG_CASE in all
array sort functions</blurb>
+
</slide>
diff --git a/slides/intro/php54_tfcs.xml b/slides/intro/php54_tfcs.xml
index 53669a8..8c9c9d3 100644
--- a/slides/intro/php54_tfcs.xml
+++ b/slides/intro/php54_tfcs.xml
@@ -1,17 +1,32 @@
-<slide title="Closures">
+<slide title="Closures inside Objects">
<blurb fontsize="4em">$this from current scope supported in Closures</blurb>
<example fontsize="2em" result='0'
title=""><![CDATA[<?php
class Foo {
- private $prop = "bar";
+ private $prop;
+ function __construct($prop) {
+ $this->prop = $prop;
+ }
public function getPrinter() {
return function() { echo ucfirst($this->prop); };
}
}
-$a = new Foo;
+$a = new Foo('bar');;
+$func = $a->getPrinter();
+$func(); // Outputs: Bar
+?>]]></example>
+
+<break lines="1" />
+
+<blurb fontsize="4em">You can also re-bind a closure to a new object
instance</blurb>
+<example fontsize="2em" result='0'
title=""><![CDATA[<?php
+$a = new Foo('bar');
+$b = new Foo('pickle');
$func = $a->getPrinter();
$func(); // Outputs: Bar
+$func = $func->bindTo($b);
+$func(); // Outputs: Pickle
?>]]></example>
</slide>
Thank you for your contribution.