3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Test { public function m() { return function($a, $b) { echo $a, $b; }; } } $t = new Test; ($t->m())('a', 'b');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/XOQGB
function name:  (null)
number of ops:  10
compiled vars:  !0 = $t
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   NEW                                              $1      'Test'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   12     3        INIT_METHOD_CALL                                         !0, 'm'
          4        DO_FCALL                                      0  $4      
          5        INIT_DYNAMIC_CALL                                        $4
          6        SEND_VAL_EX                                              'a'
          7        SEND_VAL_EX                                              'b'
          8        DO_FCALL                                      0          
          9      > RETURN                                                   1

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

End of function %00%7Bclosure%7D%2Fin%2FXOQGB%3A5%240

Class Test:
Function m:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/XOQGB
function name:  m
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FXOQGB%3A5%240'
    7     1      > RETURN                                                   ~0
    8     2*     > RETURN                                                   null

End of function m

End of class Test.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
175.12 ms | 1394 KiB | 13 Q