3v4l.org

run code in 300+ PHP versions simultaneously
<?php $info = array('coffee', 'brown', 'caffeine'); // Listing all the variables //list($drink, $color, $power) = $info; //echo "$drink is $color and $power makes it special.\n"; // Listing some of them list($drink, , $power) = $info; echo "$drink has $power.\n"; // Or let's skip to only the third one list( , , $power) = $info; echo "I need $power!\n"; // list() doesn't work with strings list($bar) = "abcde"; var_dump($bar); // NULL
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/BdsTg
function name:  (null)
number of ops:  26
compiled vars:  !0 = $info, !1 = $drink, !2 = $power, !3 = $bar
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    9     1        QM_ASSIGN                                        ~5      !0
          2        FETCH_LIST_R                                     $6      ~5, 0
          3        ASSIGN                                                   !1, $6
          4        FETCH_LIST_R                                     $8      ~5, 2
          5        ASSIGN                                                   !2, $8
          6        FREE                                                     ~5
   10     7        ROPE_INIT                                     4  ~11     !1
          8        ROPE_ADD                                      1  ~11     ~11, '+has+'
          9        ROPE_ADD                                      2  ~11     ~11, !2
         10        ROPE_END                                      3  ~10     ~11, '.%0A'
         11        ECHO                                                     ~10
   13    12        QM_ASSIGN                                        ~13     !0
         13        FETCH_LIST_R                                     $14     ~13, 2
         14        ASSIGN                                                   !2, $14
         15        FREE                                                     ~13
   14    16        ROPE_INIT                                     3  ~17     'I+need+'
         17        ROPE_ADD                                      1  ~17     ~17, !2
         18        ROPE_END                                      2  ~16     ~17, '%21%0A'
         19        ECHO                                                     ~16
   17    20        FETCH_LIST_R                                     $19     'abcde', 0
         21        ASSIGN                                                   !3, $19
   18    22        INIT_FCALL                                               'var_dump'
         23        SEND_VAR                                                 !3
         24        DO_ICALL                                                 
         25      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
167.14 ms | 1395 KiB | 15 Q