3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace Foo { class Exception extends \Exception {} } namespace Foo { use Exception as BaseException; class Bar { public static function baz() { return get_class(new BaseException); } } } namespace { $e = new Foo\Exception; var_dump(Foo\Bar::baz()); }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/5Fr37
function name:  (null)
number of ops:  9
compiled vars:  !0 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   NEW                                              $1      'Foo%5CException'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   18     3        INIT_FCALL                                               'var_dump'
          4        INIT_STATIC_METHOD_CALL                                  'Foo%5CBar', 'baz'
          5        DO_FCALL                                      0  $4      
          6        SEND_VAR                                                 $4
          7        DO_ICALL                                                 
   19     8      > RETURN                                                   1

Class Foo\Exception: [no user functions]
Class Foo\Bar:
Function baz:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/5Fr37
function name:  baz
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   INIT_NS_FCALL_BY_NAME                                    'Foo%5Cget_class'
          1        NEW                                              $0      'Exception'
          2        DO_FCALL                                      0          
          3        SEND_VAR_NO_REF_EX                                       $0
          4        DO_FCALL                                      0  $2      
          5      > RETURN                                                   $2
   12     6*     > RETURN                                                   null

End of function baz

End of class Foo\Bar.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
173.76 ms | 1395 KiB | 17 Q