com presentations: Oops, can't have trailing non-variadic args: phpday14.html slides/intro/php56.xml
| From: | Rasmus Lerdorf | Date: | Fri, 16 May 2014 10:51:05 +0000 |
| Subject: | com presentations: Oops, can't have trailing non-variadic args: phpday14.html slides/intro/php56.xml | ||
| Groups: | php.pres | ||
| Request: | Send a blank email to pres+get-1988@lists.php.net to get a copy of this message | ||
Commit: e700d6fb993991ec63426f596895f4186e581e5a
Author: Rasmus Lerdorf <rasmus@php.net> Fri, 16 May 2014 12:51:05 +0200
Parents: f8548919d7755baa712cadb5cbbdf8c1082b1615
Branches: master
Link: http://git.php.net/?p=presentations.git;a=commitdiff;h=e700d6fb993991ec63426f596895f4186e581e5a
Log:
Oops, can't have trailing non-variadic args
Changed paths:
M phpday14.html
M slides/intro/php56.xml
Diff:
diff --git a/phpday14.html b/phpday14.html
index 7012fa9..c04ddcf 100644
--- a/phpday14.html
+++ b/phpday14.html
@@ -152,7 +152,7 @@ $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]</code></pre>
+test(...$args1, 4, 5, 6); // Fatal error: Cannot use positional argument after argument
unpacking</code></pre>
</section>
<section id="php56constscalar">
<h4 class="p">✔ Constant scalar expressions</h4>
diff --git a/slides/intro/php56.xml b/slides/intro/php56.xml
index 0dc4c38..09b9572 100644
--- a/slides/intro/php56.xml
+++ b/slides/intro/php56.xml
@@ -22,7 +22,7 @@ $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>
+test(...$args1, 4, 5, 6); // Fatal error: Cannot use positional argument after argument
unpacking]]></example>
<break lines="1" section="php56constscalar"/>
<blurb fontsize="4em">✔ Constant scalar expressions</blurb>