3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace NS { class Foo { public static function bar($i = DEF) { return $i; } } } namespace { define('\\NS\\DEF', 'ddd'); var_dump(Ex::bar()); }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/vKFQo
function name:  (null)
number of ops:  10
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   INIT_FCALL                                               'define'
          1        SEND_VAL                                                 '%5CNS%5CDEF'
          2        SEND_VAL                                                 'ddd'
          3        DO_ICALL                                                 
   17     4        INIT_FCALL                                               'var_dump'
          5        INIT_STATIC_METHOD_CALL                                  'Ex', 'bar'
          6        DO_FCALL                                      0  $1      
          7        SEND_VAR                                                 $1
          8        DO_ICALL                                                 
   18     9      > RETURN                                                   1

Class NS\Foo:
Function bar:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/vKFQo
function name:  bar
number of ops:  3
compiled vars:  !0 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   RECV_INIT                                        !0      <const ast>
    9     1      > RETURN                                                   !0
   10     2*     > RETURN                                                   null

End of function bar

End of class NS\Foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.55 ms | 1394 KiB | 17 Q