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/hScDq
function name:  (null)
number of ops:  41
compiled vars:  !0 = $info, !1 = $drink, !2 = $color, !3 = $power, !4 = $bar
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    5     1        QM_ASSIGN                                        ~6      !0
          2        FETCH_LIST_R                                     $7      ~6, 0
          3        ASSIGN                                                   !1, $7
          4        FETCH_LIST_R                                     $9      ~6, 1
          5        ASSIGN                                                   !2, $9
          6        FETCH_LIST_R                                     $11     ~6, 2
          7        ASSIGN                                                   !3, $11
          8        FREE                                                     ~6
    6     9        ROPE_INIT                                     6  ~14     !1
         10        ROPE_ADD                                      1  ~14     ~14, '+is+'
         11        ROPE_ADD                                      2  ~14     ~14, !2
         12        ROPE_ADD                                      3  ~14     ~14, '+and+'
         13        ROPE_ADD                                      4  ~14     ~14, !3
         14        ROPE_END                                      5  ~13     ~14, '+makes+it+special.%0A'
         15        ECHO                                                     ~13
    9    16        QM_ASSIGN                                        ~17     !0
         17        FETCH_LIST_R                                     $18     ~17, 0
         18        ASSIGN                                                   !1, $18
         19        FETCH_LIST_R                                     $20     ~17, 2
         20        ASSIGN                                                   !3, $20
         21        FREE                                                     ~17
   10    22        ROPE_INIT                                     4  ~23     !1
         23        ROPE_ADD                                      1  ~23     ~23, '+has+'
         24        ROPE_ADD                                      2  ~23     ~23, !3
         25        ROPE_END                                      3  ~22     ~23, '.%0A'
         26        ECHO                                                     ~22
   13    27        QM_ASSIGN                                        ~25     !0
         28        FETCH_LIST_R                                     $26     ~25, 2
         29        ASSIGN                                                   !3, $26
         30        FREE                                                     ~25
   14    31        ROPE_INIT                                     3  ~29     'I+need+'
         32        ROPE_ADD                                      1  ~29     ~29, !3
         33        ROPE_END                                      2  ~28     ~29, '%21%0A'
         34        ECHO                                                     ~28
   17    35        FETCH_LIST_R                                     $31     'abcde', 0
         36        ASSIGN                                                   !4, $31
   18    37        INIT_FCALL                                               'var_dump'
         38        SEND_VAR                                                 !4
         39        DO_ICALL                                                 
         40      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.25 ms | 1388 KiB | 15 Q