2016 Update

This commit is contained in:
Tina Müller 2016-12-05 22:15:40 +01:00
parent 948b86eafa
commit dcf5d15da3
7965 changed files with 139854 additions and 31002 deletions

View file

@ -1,3 +1,4 @@
<?php
function printAll() {
foreach (func_get_args() as $x) // first way
echo "$x\n";
@ -9,3 +10,4 @@ function printAll() {
printAll(4, 3, 5, 6, 4, 3);
printAll(4, 3, 5);
printAll("Rosetta", "Code", "Is", "Awesome!");
?>

View file

@ -1,2 +1,4 @@
<?php
$args = array("Rosetta", "Code", "Is", "Awesome!");
call_user_func_array('printAll', $args);
?>

View file

@ -0,0 +1,9 @@
<?php
function printAll(...$things) {
foreach ($things as $x)
echo "$x\n";
}
printAll(4, 3, 5, 6, 4, 3);
printAll(4, 3, 5);
printAll("Rosetta", "Code", "Is", "Awesome!");
?>

View file

@ -0,0 +1,4 @@
<?php
$args = ["Rosetta", "Code", "Is", "Awesome!"];
printAll(...$args);
?>