3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Lop { public $jeka; public function __invoke() { return 300; } public function makeHappy() { $cl = function () { var_dump(@$this); }; $cl(); return 123; } } $l = new Lop(); $l->makeHappy();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/rfaZX
function name:  (null)
number of ops:  6
compiled vars:  !0 = $l
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   23     0  E >   NEW                                              $1      'Lop'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   24     3        INIT_METHOD_CALL                                         !0, 'makeHappy'
          4        DO_FCALL                                      0          
          5      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FrfaZX%3A15%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/rfaZX
function name:  {closure}
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   INIT_FCALL                                               'var_dump'
          1        BEGIN_SILENCE                                    ~0      
          2        FETCH_R                      local               ~1      'this'
          3        END_SILENCE                                              ~0
          4        SEND_VAL                                                 ~1
          5        DO_ICALL                                                 
   17     6      > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FrfaZX%3A15%240

Class Lop:
Function __invoke:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/rfaZX
function name:  __invoke
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E > > RETURN                                                   300
   11     1*     > RETURN                                                   null

End of function __invoke

Function makehappy:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/rfaZX
function name:  makeHappy
number of ops:  6
compiled vars:  !0 = $cl
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FrfaZX%3A15%240'
          1        ASSIGN                                                   !0, ~1
   18     2        INIT_DYNAMIC_CALL                                        !0
          3        DO_FCALL                                      0          
   19     4      > RETURN                                                   123
   20     5*     > RETURN                                                   null

End of function makehappy

End of class Lop.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.94 ms | 1396 KiB | 15 Q