I want to create 5 variables of type array all at once. Is this possible? In Java I know you can, but can\'t find anything about PHP. I\'d like to do something like this:
Since PHP 7.1 you can use square bracket syntax:
[$var1, $var2, $var3, $var4, $var5] = array(1, 2, 3, 4, 5);
[1] https://wiki.php.net/rfc/short_list_syntax [2] https://secure.php.net/manual/de/migration71.new-features.php#migration71.new-features.symmetric-array-destructuring