3v4l.org

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

Function %00%7Bclosure%7D%2Fin%2Fqon7A%3A9%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/qon7A
function name:  {closure}
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   INIT_STATIC_METHOD_CALL                                  'a', 'b'
          1        DO_FCALL                                      0          
   11     2      > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2Fqon7A%3A9%240

Class a:
Function b:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/qon7A
function name:  b
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   ECHO                                                     'ja'
    6     1      > RETURN                                                   null

End of function b

Function f:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/qon7A
function name:  f
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2Fqon7A%3A9%240'
   11     1      > RETURN                                                   ~0
   12     2*     > RETURN                                                   null

End of function f

End of class a.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
143.48 ms | 1385 KiB | 13 Q