3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace Foo { class Bar {} } namespace Foo\Legacy { class Bar extends \Foo\Bar {} } namespace { class_alias("\Foo\Bar", "\Foo\Alias\Bar"); $b = new \Foo\Alias\Bar; var_dump(serialize(new \Foo\Alias\Bar)); var_dump(serialize(new \Foo\Legacy\Bar)); }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/B6v57
function name:  (null)
number of ops:  24
compiled vars:  !0 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   INIT_FCALL                                               'class_alias'
          1        SEND_VAL                                                 '%5CFoo%5CBar'
          2        SEND_VAL                                                 '%5CFoo%5CAlias%5CBar'
          3        DO_ICALL                                                 
   13     4        NEW                                              $2      'Foo%5CAlias%5CBar'
          5        DO_FCALL                                      0          
          6        ASSIGN                                                   !0, $2
   15     7        INIT_FCALL                                               'var_dump'
          8        INIT_FCALL                                               'serialize'
          9        NEW                                              $5      'Foo%5CAlias%5CBar'
         10        DO_FCALL                                      0          
         11        SEND_VAR                                                 $5
         12        DO_ICALL                                         $7      
         13        SEND_VAR                                                 $7
         14        DO_ICALL                                                 
   16    15        INIT_FCALL                                               'var_dump'
         16        INIT_FCALL                                               'serialize'
         17        NEW                                              $9      'Foo%5CLegacy%5CBar'
         18        DO_FCALL                                      0          
         19        SEND_VAR                                                 $9
         20        DO_ICALL                                         $11     
         21        SEND_VAR                                                 $11
         22        DO_ICALL                                                 
   17    23      > RETURN                                                   1

Class Foo\Bar: [no user functions]
Class Foo\Legacy\Bar: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
185.98 ms | 1395 KiB | 19 Q