3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace My\Ns; class Foo {} if (!class_exists(Bar::class)) { class_alias(Foo::class, Bar::class); } function f(Bar $x): void { var_dump($x); } f(new Foo());
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 5, Position 2 = 9
Branch analysis from position: 5
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
filename:       /in/pPO3n
function name:  (null)
number of ops:  15
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   INIT_NS_FCALL_BY_NAME                                    'My%5CNs%5Cclass_exists'
          1        SEND_VAL_EX                                              'My%5CNs%5CBar'
          2        DO_FCALL                                      0  $0      
          3        BOOL_NOT                                         ~1      $0
          4      > JMPZ                                                     ~1, ->9
    5     5    >   INIT_NS_FCALL_BY_NAME                                    'My%5CNs%5Cclass_alias'
          6        SEND_VAL_EX                                              'My%5CNs%5CFoo'
          7        SEND_VAL_EX                                              'My%5CNs%5CBar'
          8        DO_FCALL                                      0          
   10     9    >   INIT_NS_FCALL_BY_NAME                                    'My%5CNs%5Cf'
         10        NEW                                              $3      'My%5CNs%5CFoo'
         11        DO_FCALL                                      0          
         12        SEND_VAR_NO_REF_EX                                       $3
         13        DO_FCALL                                      0          
         14      > RETURN                                                   1

Function my%5Cns%5Cf:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/pPO3n
function name:  My\Ns\f
number of ops:  5
compiled vars:  !0 = $x
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   RECV                                             !0      
    8     1        INIT_NS_FCALL_BY_NAME                                    'My%5CNs%5Cvar_dump'
          2        SEND_VAR_EX                                              !0
          3        DO_FCALL                                      0          
    9     4      > RETURN                                                   null

End of function my%5Cns%5Cf

Class My\Ns\Foo: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.87 ms | 1015 KiB | 17 Q