Created
February 5, 2017 09:26
-
-
Save cyrilletuzi/f2ff12df2b6dd655024e283a1f959b29 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$myList = [1, 2, 3]; | |
/* PHP 5+ */ | |
list($data1, $data2, $data3) = $myList; | |
/* PHP 7.1+ */ | |
[$data1, $data2, $data3] = $myList; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment