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/IXpei
function name:  (null)
number of ops:  33
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>
    6     1        ROPE_INIT                                     6  ~7      !1
          2        ROPE_ADD                                      1  ~7      ~7, '+is+'
          3        ROPE_ADD                                      2  ~7      ~7, !2
          4        ROPE_ADD                                      3  ~7      ~7, '+and+'
          5        ROPE_ADD                                      4  ~7      ~7, !3
          6        ROPE_END                                      5  ~6      ~7, '+makes+it+special.%0A'
          7        ECHO                                                     ~6
    9     8        QM_ASSIGN                                        ~10     !0
          9        FETCH_LIST_R                                     $11     ~10, 0
         10        ASSIGN                                                   !1, $11
         11        FETCH_LIST_R                                     $13     ~10, 2
         12        ASSIGN                                                   !3, $13
         13        FREE                                                     ~10
   10    14        ROPE_INIT                                     4  ~16     !1
         15        ROPE_ADD                                      1  ~16     ~16, '+has+'
         16        ROPE_ADD                                      2  ~16     ~16, !3
         17        ROPE_END                                      3  ~15     ~16, '.%0A'
         18        ECHO                                                     ~15
   13    19        QM_ASSIGN                                        ~18     !0
         20        FETCH_LIST_R                                     $19     ~18, 2
         21        ASSIGN                                                   !3, $19
         22        FREE                                                     ~18
   14    23        ROPE_INIT                                     3  ~22     'I+need+'
         24        ROPE_ADD                                      1  ~22     ~22, !3
         25        ROPE_END                                      2  ~21     ~22, '%21%0A'
         26        ECHO                                                     ~21
   17    27        FETCH_LIST_R                                     $24     'abcde', 0
         28        ASSIGN                                                   !4, $24
   18    29        INIT_FCALL                                               'var_dump'
         30        SEND_VAR                                                 !4
         31        DO_ICALL                                                 
         32      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.27 ms | 1396 KiB | 15 Q