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 Lulz { } $d = new Lulz(); $d->func = function($b) { print "$b\n"; }; $d->func('nope'); call_user_func_array(array($d, 'func'), array('nope')); $c = new stdclass(); $c->func = function($b) { print "$b\n"; }; $c->func('nope'); call_user_func_array(array($c, 'func'), array('nope'));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/WsYaQ
function name:  (null)
number of ops:  43
compiled vars:  !0 = $a, !1 = $b, !2 = $d, !3 = $c
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FWsYaQ%3A3%240'
          1        ASSIGN                                                   !0, ~4
    4     2        INIT_DYNAMIC_CALL                                        !0
          3        SEND_VAL_EX                                              'lulz'
          4        DO_FCALL                                      0          
    6     5        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FWsYaQ%3A6%241'
          6        ASSIGN_DIM                                               !1, 'lulz'
          7        OP_DATA                                                  ~8
    7     8        FETCH_DIM_R                                      ~9      !1, 'lulz'
          9        INIT_DYNAMIC_CALL                                        ~9
         10        SEND_VAL_EX                                              'more+lulz'
         11        DO_FCALL                                      0          
   11    12        NEW                                              $11     'Lulz'
         13        DO_FCALL                                      0          
         14        ASSIGN                                                   !2, $11
   12    15        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FWsYaQ%3A12%242'
         16        ASSIGN_OBJ                                               !2, 'func'
         17        OP_DATA                                                  ~15
   13    18        INIT_METHOD_CALL                                         !2, 'func'
         19        SEND_VAL_EX                                              'nope'
         20        DO_FCALL                                      0          
   14    21        INIT_ARRAY                                       ~17     !2
         22        ADD_ARRAY_ELEMENT                                ~17     'func'
         23        INIT_USER_CALL                                0          'call_user_func_array', ~17
         24        SEND_ARRAY                                               <array>
         25        CHECK_UNDEF_ARGS                                         
         26        DO_FCALL                                      0          
   16    27        NEW                                              $19     'stdclass'
         28        DO_FCALL                                      0          
         29        ASSIGN                                                   !3, $19
   17    30        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FWsYaQ%3A17%243'
         31        ASSIGN_OBJ                                               !3, 'func'
         32        OP_DATA                                                  ~23
   18    33        INIT_METHOD_CALL                                         !3, 'func'
         34        SEND_VAL_EX                                              'nope'
         35        DO_FCALL                                      0          
   19    36        INIT_ARRAY                                       ~25     !3
         37        ADD_ARRAY_ELEMENT                                ~25     'func'
         38        INIT_USER_CALL                                0          'call_user_func_array', ~25
         39        SEND_ARRAY                                               <array>
         40        CHECK_UNDEF_ARGS                                         
         41        DO_FCALL                                      0          
         42      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FWsYaQ%3A3%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/WsYaQ
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%2FWsYaQ%3A3%240

Function %00%7Bclosure%7D%2Fin%2FWsYaQ%3A6%241:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/WsYaQ
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%2FWsYaQ%3A6%241

Function %00%7Bclosure%7D%2Fin%2FWsYaQ%3A12%242:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/WsYaQ
function name:  {closure}
number of ops:  5
compiled vars:  !0 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     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%2FWsYaQ%3A12%242

Function %00%7Bclosure%7D%2Fin%2FWsYaQ%3A17%243:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/WsYaQ
function name:  {closure}
number of ops:  5
compiled vars:  !0 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     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%2FWsYaQ%3A17%243

Class Lulz: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.03 ms | 1399 KiB | 13 Q