fork download
  1. <?php
  2.  
  3. $array = [
  4. 'UM',
  5. 'DOIS',
  6. 'TRES'
  7. ];
  8.  
  9.  
  10. list($variavel1, $variavel2, $variavel3) = $array;
  11.  
  12. echo "Var 1: $variavel1\n";
  13. echo "Var 2: $variavel2\n";
  14. echo "Var 3: $variavel3\n";
Success #stdin #stdout 0.02s 24612KB
stdin
Standard input is empty
stdout
Var 1: UM
Var 2: DOIS
Var 3: TRES