3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = function($b) { print "$b\n"; }; $a('lulz'); $b['lulz'] = function($b) { print "$b\n"; }; $b['lulz']('more lulz'); class D { public $func; } $d = new D(); $d->func = function($b) { print "$b\n"; }; $d->func('asdf');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/iodRh
function name:  (null)
number of ops:  22
compiled vars:  !0 = $a, !1 = $b, !2 = $d
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FiodRh%3A3%240'
          1        ASSIGN                                                   !0, ~3
    4     2        INIT_DYNAMIC_CALL                                        !0
          3        SEND_VAL_EX                                              'lulz'
          4        DO_FCALL                                      0          
    6     5        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FiodRh%3A6%241'
          6        ASSIGN_DIM                                               !1, 'lulz'
          7        OP_DATA                                                  ~7
    7     8        FETCH_DIM_R                                      ~8      !1, 'lulz'
          9        INIT_DYNAMIC_CALL                                        ~8
         10        SEND_VAL_EX                                              'more+lulz'
         11        DO_FCALL                                      0          
   12    12        NEW                                              $10     'D'
         13        DO_FCALL                                      0          
         14        ASSIGN                                                   !2, $10
   13    15        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FiodRh%3A13%242'
         16        ASSIGN_OBJ                                               !2, 'func'
         17        OP_DATA                                                  ~14
   14    18        INIT_METHOD_CALL                                         !2, 'func'
         19        SEND_VAL_EX                                              'asdf'
         20        DO_FCALL                                      0          
         21      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FiodRh%3A3%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/iodRh
function name:  {closure}
number of ops:  5
compiled vars:  !0 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
          1        NOP                                                      
          2        FAST_CONCAT                                      ~1      !0, '%0A'
          3        ECHO                                                     ~1
          4      > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FiodRh%3A3%240

Function %00%7Bclosure%7D%2Fin%2FiodRh%3A6%241:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/iodRh
function name:  {closure}
number of ops:  5
compiled vars:  !0 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   RECV                                             !0      
          1        NOP                                                      
          2        FAST_CONCAT                                      ~1      !0, '%0A'
          3        ECHO                                                     ~1
          4      > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FiodRh%3A6%241

Function %00%7Bclosure%7D%2Fin%2FiodRh%3A13%242:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/iodRh
function name:  {closure}
number of ops:  5
compiled vars:  !0 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   RECV                                             !0      
          1        NOP                                                      
          2        FAST_CONCAT                                      ~1      !0, '%0A'
          3        ECHO                                                     ~1
          4      > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FiodRh%3A13%242

Class D: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
174.75 ms | 1390 KiB | 13 Q