com presentations: SunshinePHP 2014 Keynote: slides/intro/php56.xml sunshinephp14.xml
| From: | Rasmus Lerdorf | Date: | Fri, 07 Feb 2014 04:28:51 +0000 |
| Subject: | com presentations: SunshinePHP 2014 Keynote: slides/intro/php56.xml sunshinephp14.xml | ||
| Groups: | php.pres | ||
| Request: | Send a blank email to pres+get-1939@lists.php.net to get a copy of this message | ||
Commit: 430c626eaa62ceb9662f0523931caa639a96bd99
Author: Rasmus Lerdorf <rasmus@php.net> Thu, 6 Feb 2014 20:28:51 -0800
Parents: 3e9ff56fa57bf2c0298067e3df1ea08db45dc4a7
Branches: master
Link: http://git.php.net/?p=presentations.git;a=commitdiff;h=430c626eaa62ceb9662f0523931caa639a96bd99
Log:
SunshinePHP 2014 Keynote
Changed paths:
M slides/intro/php56.xml
A sunshinephp14.xml
Diff:
diff --git a/slides/intro/php56.xml b/slides/intro/php56.xml
index 7b8ce58..caf44f8 100644
--- a/slides/intro/php56.xml
+++ b/slides/intro/php56.xml
@@ -1,7 +1,17 @@
<slide title="PHP 5.6">
<break lines="1" />
-<blurb fontsize="4em">✔ Internal operator overloading for internal features like
GMP and BCMath</blurb>
+<blurb fontsize="4em">✔ Internal operator overloading for internal features like
GMP</blurb>
+<example fontsize="2em" marginleft="7em" result='0'
title=""><![CDATA[<?php
+echo 2**256;
+echo "\n";
+$n = gmp_init(2);
+echo $n**256;
+]]></example>
+<example fontsize="2em" marginleft="7em" hide='1'
result='1' title=""><![CDATA[
+1.1579208923732E+77
+115792089237316195423570985008687907853269984665640564039457584007913129639936
+]]></example>
<break lines="1" />
<blurb fontsize="4em">✔ Variadic functions</blurb>
@@ -12,26 +22,59 @@ class MySQL implements DB {
$stmt->execute($params);
return $stmt;
}
+}
+
+$res = $db->query('SELECT * FROM users WHERE id = ?',
$userID)->fetch();]]></example>
+
+<break lines="1" />
+<blurb fontsize="4em">✔ Argument Unpacking</blurb>
+<example fontsize="2em" marginleft="7em" result='0'
title=""><![CDATA[<?php
+// A better call_user_func_args
+$args1 = [1, 2, 3];
+$args2 = [4, 5, 6];
+test(...$args1, ...$args2); // [1, 2, 3, 4, 5, 6]
+test(1, 2, 3, ...$args2); // [1, 2, 3, 4, 5, 6]
+test(...$args1, 4, 5, 6); // [1, 2, 3, 4, 5, 6]]]></example>
+
+<break lines="1" />
+<blurb fontsize="4em">✔ Constant scalar expressions</blurb>
+<example fontsize="2em" marginleft="7em" result='0'
title=""><![CDATA[<?php
+class Foo {
+ const FOO = 1 + 1;
+ const BAR = 1 << 1;
+ const GREETING = "HELLO";
+ const BAZ = self::GREETING." WORLD!"
}]]></example>
<break lines="1" />
-<blurb fontsize="4em">✔ Named parameters?</blurb>
+<blurb fontsize="4em">✔ Add right-associative power operator **</blurb>
<example fontsize="2em" marginleft="7em" result='0'
title=""><![CDATA[<?php
-// leading option
-test(foo => "oof", bar => "rab");
-test("foo" => "oof", "bar" => "rab");
-
-// others (these can use keywords)
-test($foo => "oof", $bar => "rab");
-test(:foo => "oof", :bar => "rab");
-test($foo: "oof", $bar: "rab");
-
-// others (these can't use keywords
-test(foo = "oof", bar = "rab");
-test(foo: "oof", bar: "rab");
-
-// not possible because already valid code
-test($foo = "oof", $bar = "rab");
-]]></example>
+echo 2 ** 3 ** 2; // 512 (not 64)
+echo -3 ** 2; // -9 (not 9)
+echo 1 - 3 ** 2; // -8
+echo ~3 ** 2; // -10 (not 16)]]></example>
+
+<break lines="1" />
+<blurb fontsize="4em">✔ use function and use const namespace
imports</blurb>
+<example fontsize="2em" marginleft="7em" result='0'
title=""><![CDATA[<?php
+include 'template.inc';
+include 'db.inc';
+use function template\header, template\footer, db\query;
+
+header('My Page');
+query('select * from stuff');
+footer(); ]]></example>
+
+<break lines="1" />
+<blurb fontsize="4em">✔ SSL Peer verification by default</blurb>
+
+<break lines="1" />
+<blurb fontsize="4em">✔ New phpdbg SAPI</blurb>
+
+<break lines="1" />
+<blurb fontsize="4em">✔ Support for > 2GB file uploads</blurb>
+
+<break lines="1" />
+<blurb fontsize="4em">✔ OCI8 Improvements</blurb>
</slide>
diff --git a/sunshinephp14.xml b/sunshinephp14.xml
new file mode 100644
index 0000000..7ad628a
--- /dev/null
+++ b/sunshinephp14.xml
@@ -0,0 +1,49 @@
+<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"
+>
+
+<topic>PHP</topic>
+<title>PHP</title>
+<event>SunshinePHP</event>
+<location>Miami</location>
+<date>Feb.7, 2014</date>
+<speaker>Rasmus Lerdorf</speaker>
+<url>http://talks.php.net/show/sunshinephp14</url>
+<twitter>@rasmus</twitter>
+
+<slide>slides/intro/titlepage.xml</slide>
+
+<slide>slides/intro/lovehack.xml</slide>
+<slide>slides/intro/php55.xml</slide>
+<slide>slides/intro/php56.xml</slide>
+
+<slide>slides/intro/atomic1.xml</slide>
+<slide>slides/intro/atomic3a.xml</slide>
+<slide>slides/intro/atomic2.xml</slide>
+<slide>slides/intro/atomic3b.xml</slide>
+<slide>slides/intro/atomic3c.xml</slide>
+<slide>slides/intro/atomic3..xml</slide>
+<slide>slides/intro/atomic4.xml</slide>
+
+<slide>slides/intro/lovehack.xml</slide>
+<slide>slides/intro/greenland0.xml</slide>
+<slide>slides/intro/greenland1.xml</slide>
+<slide>slides/intro/greenland2.xml</slide>
+<slide>slides/intro/greenland3.xml</slide>
+
+<slide>slides/intro/matter.xml</slide>
+<slide>slides/intro/matter2.xml</slide>
+<slide>slides/intro/etsy_access.xml</slide>
+
+</presentation>