3v4l.org

run code in 300+ PHP versions simultaneously
<?php function blah (array $ar){ var_dump($ar); } $elem = 'bar'; $elems = ['bar1','bar2']; blah($elems); blah([$elem]);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/JTd4T
function name:  (null)
number of ops:  10
compiled vars:  !0 = $elem, !1 = $elems
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   ASSIGN                                                   !0, 'bar'
    7     1        ASSIGN                                                   !1, <array>
    8     2        INIT_FCALL                                               'blah'
          3        SEND_VAR                                                 !1
          4        DO_FCALL                                      0          
    9     5        INIT_FCALL                                               'blah'
          6        INIT_ARRAY                                       ~5      !0
          7        SEND_VAL                                                 ~5
          8        DO_FCALL                                      0          
          9      > RETURN                                                   1

Function blah:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/JTd4T
function name:  blah
number of ops:  5
compiled vars:  !0 = $ar
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    4     1        INIT_FCALL                                               'var_dump'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                                 
    5     4      > RETURN                                                   null

End of function blah

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
174.2 ms | 1397 KiB | 17 Q