3v4l.org

run code in 300+ PHP versions simultaneously
<?php $myClass = [ 'attribute' => 0, 'method' => [ 'type' => 'static', 'accessibility' => 'public', 'code' => function () { echo($myClass['attribute']); } ] ]; $foo = 'foo'; $bar = function () { echo($foo); }; $bar();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/vFpuY
function name:  (null)
number of ops:  13
compiled vars:  !0 = $myClass, !1 = $foo, !2 = $bar
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_ARRAY                                       ~3      0, 'attribute'
    5     1        INIT_ARRAY                                       ~4      'static', 'type'
    6     2        ADD_ARRAY_ELEMENT                                ~4      'public', 'accessibility'
    7     3        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FvFpuY%3A7%240'
    9     4        ADD_ARRAY_ELEMENT                                ~4      ~5, 'code'
          5        ADD_ARRAY_ELEMENT                                ~3      ~4, 'method'
    2     6        ASSIGN                                                   !0, ~3
   12     7        ASSIGN                                                   !1, 'foo'
   13     8        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FvFpuY%3A13%241'
          9        ASSIGN                                                   !2, ~8
   16    10        INIT_DYNAMIC_CALL                                        !2
         11        DO_FCALL                                      0          
         12      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FvFpuY%3A7%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/vFpuY
function name:  {closure}
number of ops:  3
compiled vars:  !0 = $myClass
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   FETCH_DIM_R                                      ~1      !0, 'attribute'
          1        ECHO                                                     ~1
    9     2      > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FvFpuY%3A7%240

Function %00%7Bclosure%7D%2Fin%2FvFpuY%3A13%241:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/vFpuY
function name:  {closure}
number of ops:  2
compiled vars:  !0 = $foo
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   ECHO                                                     !0
   15     1      > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FvFpuY%3A13%241

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.25 ms | 1398 KiB | 13 Q