Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- function one(...$a){
- print_r($a);
- two(...$a);
- }
- function two ($a,$b,$c){
- print_r(['a'=>$a, 'b'=>$b, 'c'=>$c]);
- }
- one('this is a', 'this is b', 'this is c', 'this is d');
- // Result:
- // Array ( [0] => this is a [1] => this is b [2] => this is c [3] => this is d )
- // Array ( [a] => this is a [b] => this is b [c] => this is c )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement