3v4l.org

run code in 500+ PHP versions simultaneously
<?php class Test { public function testing() { return function() { var_dump($this); }; } } $function = (new Test)->testing(); $function(); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/qVEF1
function name:  (null)
number of ops:  8
compiled vars:  !0 = $function
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   13     0  E >   NEW                                                  $1      'Test'
          1        DO_FCALL                                          0          
          2        INIT_METHOD_CALL                                             $1, 'testing'
          3        DO_FCALL                                          0  $3      
          4        ASSIGN                                                       !0, $3
   14     5        INIT_DYNAMIC_CALL                                            !0
          6        DO_FCALL                                          0          
   16     7      > RETURN                                                       1

Class Test:
Function testing:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/qVEF1
function name:  testing
number of ops:  3
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    7     0  E >   DECLARE_LAMBDA_FUNCTION                              ~0      [0]
    9     1      > RETURN                                                       ~0
   10     2*     > RETURN                                                       null


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/qVEF1
function name:  {closure:Test::testing():7}
number of ops:  5
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    8     0  E >   INIT_FCALL                                                   'var_dump'
          1        FETCH_THIS                                           ~0      
          2        SEND_VAL                                                     ~0
          3        DO_ICALL                                                     
    9     4      > RETURN                                                       null

End of Dynamic Function 0

End of function testing

End of class Test.

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
142.93 ms | 2672 KiB | 9 Q