Logo

Programming-Idioms

History of Idiom 134 > diff from v25 to v26

Edit summary for version 26 by programming-idioms.org:
[PHP] Comments emphasis

Version 25

2018-08-23, 00:54:06

Version 26

2018-09-06, 20:02:48

Idiom #134 Create a new list

Declare and initialize a new list items, containing 3 elements a, b, c.

Idiom #134 Create a new list

Declare and initialize a new list items, containing 3 elements a, b, c.

Extra Keywords
array vector slice tuple
Extra Keywords
array vector slice tuple
Code
$items = [$a, $b, $c];
Code
$items = [$a, $b, $c];
Comments bubble
$items will have $a, $b and $c in this order.
Comments bubble
$items will have $a, $b and $c in this order.
Doc URL
https://secure.php.net/manual/en/language.types.array.php
Doc URL
https://secure.php.net/manual/en/language.types.array.php
Demo URL
https://3v4l.org/lma2d
Demo URL
https://3v4l.org/lma2d