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'); //$c = new stdclass(); //$c->func = function($b) { print "$b\n"; }; //$c->func('hahaha nope'); class f { public function f($b) { print "$b\n"; } } $f = new f(); //$f->f = function($b) { print "test $b\n"; } $f->f();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4YSdM
function name:  (null)
number of ops:  18
compiled vars:  !0 = $a, !1 = $b, !2 = $f
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2F4YSdM%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%2F4YSdM%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          
   20    12        NEW                                              $10     'f'
         13        DO_FCALL                                      0          
         14        ASSIGN                                                   !2, $10
   23    15        INIT_METHOD_CALL                                         !2, 'f'
         16        DO_FCALL                                      0          
         17      > RETURN                                                   1

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

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

Class f:
Function f:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4YSdM
function name:  f
number of ops:  5
compiled vars:  !0 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   RECV                                             !0      
   16     1        NOP                                                      
          2        FAST_CONCAT                                      ~1      !0, '%0A'
          3        ECHO                                                     ~1
   17     4      > RETURN                                                   null

End of function f

End of class f.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
145.24 ms | 1399 KiB | 13 Q