FAQ
Commit: d50e26bc9bdca27cf1d901d6852d30e6e45c9965
Author: Rasmus Lerdorf <rasmus@php.net> Mon, 23 Nov 2015 23:28:06 +0100
Parents: b93083ee342332ba39e4d7c3524de215e1c52c10
Branches: master

Link: http://git.php.net/?p=presentations.git;a=commitdiff;h=d50e26bc9bdca27cf1d901d6852d30e6e45c9965

Log:
Tweaks

Changed paths:
   M afup15.html
   M slides/intro/php7_2016.xml
   M slides/intro/php7_perf.xml


Diff:
diff --git a/afup15.html b/afup15.html
index d4b29b1..d86731b 100644
--- a/afup15.html
+++ b/afup15.html
@@ -390,14 +390,14 @@ class MyObject extends MyStuff {
  }</code></pre>
    </section>
  <section id="php7coalesce">
- <p class="p" style="font-size:1.1em;text-align:left;">✔ Null Coalesce Operator</p>
+ <p class="p" style="font-size:1.1em;text-align:left;">✔ Coalesce Operator</p>
    <pre><code data-trim style="font-size:1.5em;">$a = NULL;
-$b = 1;
+$b = 0;
  $c = 2;

-echo $a ?? $b; // 1
+echo $a ?? $b; // 0
  echo $c ?? $b; // 2
-echo $a ?? $b ?? $c; // 1
+echo $a ?? $b ?? $c; // 0
  echo $a ?? $x ?? $c; // 2</code></pre>
    </section>
  <section id="Spaceship">
@@ -562,8 +562,8 @@ $bytes = random_bytes(10);

  var_dump( $int );
  var_dump( bin2hex($bytes) );</code></pre>
- <pre class="output" style="font-size:1.2em;">int(-57)
-string(20) "0fccee1859e2ed386eab"
+ <pre class="output" style="font-size:1.2em;">int(333)
+string(20) "bbecaff173062f10e091"
    </pre> </section>
  <section id="php7more">
    <p class="p" style="font-size:1.5em;">GA release scheduled for Nov.26 or Dec.3</p>
@@ -585,10 +585,14 @@ string(20) "0fccee1859e2ed386eab"
     <li style="font-size: 1em;list-style-type: none;">Immutable array optimization</li>
    </ul>
    <pre><code data-trim style="font-size:1.1em;">$a = [];
-for($i=0; $i &lt; 100000;$i++) $a[] = ['abc'];
+for($i=0; $i &lt; 100000;$i++) {
+ $a[] = ['abc','def','ghi','jkl','mno','pqr'];
+}
  echo memory_get_usage(true);
-// PHP 5.x 43M
-// PHP 7.0 6M</code></pre>
+
+// PHP 5.x 109M
+// PHP 7.0 42M no opcache
+// PHP 7.0 6M with opcache enabled</code></pre>
    </section>
  <section id="php7perfdetail2">
    <ul>
diff --git a/slides/intro/php7_2016.xml b/slides/intro/php7_2016.xml
index 4551686..7774691 100644
--- a/slides/intro/php7_2016.xml
+++ b/slides/intro/php7_2016.xml
@@ -306,16 +306,16 @@ class MyObject extends MyStuff {
  ]]></example>

  <break lines="1" section="php7coalesce"/>
-<blurb fontsize="1.1em" align="left">✔ Null Coalesce Operator</blurb>
+<blurb fontsize="1.1em" align="left">✔ Coalesce Operator</blurb>
  <example fontsize="1.5em" result='0' title=""><![CDATA[
  <?php
  $a = NULL;
-$b = 1;
+$b = 0;
  $c = 2;

-echo $a ?? $b; // 1
+echo $a ?? $b; // 0
  echo $c ?? $b; // 2
-echo $a ?? $b ?? $c; // 1
+echo $a ?? $b ?? $c; // 0
  echo $a ?? $x ?? $c; // 2
  ]]></example>

diff --git a/slides/intro/php7_perf.xml b/slides/intro/php7_perf.xml
index 5b50f80..e695102 100644
--- a/slides/intro/php7_perf.xml
+++ b/slides/intro/php7_perf.xml
@@ -9,10 +9,14 @@
  <example fontsize="1.1em" result='0' title=""><![CDATA[
  <?php
  $a = [];
-for($i=0; $i < 100000;$i++) $a[] = ['abc'];
+for($i=0; $i < 100000;$i++) {
+ $a[] = ['abc','def','ghi','jkl','mno','pqr'];
+}
  echo memory_get_usage(true);
-// PHP 5.x 43M
-// PHP 7.0 6M
+
+// PHP 5.x 109M
+// PHP 7.0 42M no opcache
+// PHP 7.0 6M with opcache enabled
  ]]></example>

  <break lines="1" section="php7perfdetail2"/>

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 1 of 1 | next ›
Discussion Overview
groupphp-pres @
categoriesphp
postedNov 23, '15 at 10:28p
activeNov 23, '15 at 10:28p
posts1
users1
websitephp.net

1 user in discussion

Rasmus Lerdorf: 1 post

People

Translate

site design / logo © 2017 Grokbase