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(); $res = $l(); var_dump($res); // $l->makeHappy();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/AD9nA
function name:  (null)
number of ops:  10
compiled vars:  !0 = $l, !1 = $res
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   23     0  E >   NEW                                              $2      'Lop'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
   24     3        INIT_DYNAMIC_CALL                                        !0
          4        DO_FCALL                                      0  $5      
          5        ASSIGN                                                   !1, $5
   25     6        INIT_FCALL                                               'var_dump'
          7        SEND_VAR                                                 !1
          8        DO_ICALL                                                 
   26     9      > RETURN                                                   1

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

Class Lop:
Function __invoke:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/AD9nA
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/AD9nA
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%2FAD9nA%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:
232.06 ms | 1400 KiB | 15 Q