com presentations: .: mx14.html slides/intro/php7.xml
| From: | Rasmus Lerdorf | Date: | Wed, 24 Sep 2014 04:56:22 +0000 |
| Subject: | com presentations: .: mx14.html slides/intro/php7.xml | ||
| Groups: | php.pres | ||
| Request: | Send a blank email to pres+get-2002@lists.php.net to get a copy of this message | ||
Commit: 02b9a62a928ec6d3989a213abc3f74353bc29e21
Author: Rasmus Lerdorf <rasmus@php.net> Tue, 23 Sep 2014 21:56:22 -0700
Parents: 8f30bba609b637c12bcdfb2b8b48541af8ad5baa
Branches: master
Link: http://git.php.net/?p=presentations.git;a=commitdiff;h=02b9a62a928ec6d3989a213abc3f74353bc29e21
Log:
.
Changed paths:
M mx14..html
M slides/intro/php7.xml
Diff:
diff --git a/mx14.html b/mx14.html
index bf99a7b..430ef95 100644
--- a/mx14.html
+++ b/mx14.html
@@ -448,8 +448,44 @@ footer();</code></pre>
<h4 class="p">✔ Abstract Syntax Tree</h4>
<h4 class="p">✔ 64-bit integer support on Windows</h4>
<h4 class="p">✔ Catchable "call to member function of
non-object"</h4>
+ </section>
+<section id="php7UVS">
+ <h4 class="p">✔ Uniform variable syntax</h4>
+ <pre><code>// support missing combinations of operations
+$foo()['bar']()
+[$obj1, $obj2][0]->prop
+getStr(){0}
+
+// support nested ::
+$foo['bar']::$baz
+$foo::$bar::$baz
+$foo->bar()::baz()
+
+// support nested ()
+foo()()
+$foo->bar()()
+Foo::bar()()
+$foo()()
+
+// support operations on arbitrary (...) expressions
+(...)['foo']
+(...)->foo
+(...)->foo()
+(...)::$foo
+(...)::foo()
+(...)()
+
+// two more practical examples for the last point
+(function() { ... })()
+($obj->closure)()
+
+// support all operations on dereferencable scalars
+// (not very useful)
+"string"->toLower()
+[$obj, 'method']()
+'Foo'::$bar</code></pre>
<h4 class="p"> </h4>
- <p class="p">Still very early. Many more things could be added </p>
+ <p class="p">Still very early. Many more things will likely be added</p>
</section> </section>
<section>
<img src="/presentations/slides/intro/lovehack-white-1000.png"
width="1001" height="421">
diff --git a/slides/intro/php7.xml b/slides/intro/php7.xml
index d1af2bd..2313710 100644
--- a/slides/intro/php7.xml
+++ b/slides/intro/php7.xml
@@ -15,7 +15,46 @@
<blurb fontsize="4em">✔ Catchable "call to member function of
non-object"</blurb>
+<break lines="1" section="php7UVS"/>
+
+<blurb fontsize="4em">✔ Uniform variable syntax</blurb>
+
+<example fontsize="2em" marginleft="7em" result='0'
title=""><![CDATA[<?php
+// support missing combinations of operations
+$foo()['bar']()
+[$obj1, $obj2][0]->prop
+getStr(){0}
+
+// support nested ::
+$foo['bar']::$baz
+$foo::$bar::$baz
+$foo->bar()::baz()
+
+// support nested ()
+foo()()
+$foo->bar()()
+Foo::bar()()
+$foo()()
+
+// support operations on arbitrary (...) expressions
+(...)['foo']
+(...)->foo
+(...)->foo()
+(...)::$foo
+(...)::foo()
+(...)()
+
+// two more practical examples for the last point
+(function() { ... })()
+($obj->closure)()
+
+// support all operations on dereferencable scalars
+// (not very useful)
+"string"->toLower()
+[$obj, 'method']()
+'Foo'::$bar]]></example>
+
<blurb fontsize="4em"> </blurb>
-<blurb fontsize="3em">Still very early. Many more things could be added
</blurb>
+<blurb fontsize="3em">Still very early. Many more things will likely be
added</blurb>
</slide>