3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace foo { class foo1 { } } namespace bar { class foo2 { } } namespace { $cs = "\\foo\\foo1"; $f = new $cs(); var_dump($f); $f = new $cs(); var_dump($f); }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/qbA2r
function name:  (null)
number of ops:  16
compiled vars:  !0 = $cs, !1 = $f
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   ASSIGN                                                   !0, '%5Cfoo%5Cfoo1'
   12     1        FETCH_CLASS                                   0  $3      !0
          2        NEW                                              $4      $3
          3        DO_FCALL                                      0          
          4        ASSIGN                                                   !1, $4
   13     5        INIT_FCALL                                               'var_dump'
          6        SEND_VAR                                                 !1
          7        DO_ICALL                                                 
   14     8        FETCH_CLASS                                   0  $8      !0
          9        NEW                                              $9      $8
         10        DO_FCALL                                      0          
         11        ASSIGN                                                   !1, $9
   15    12        INIT_FCALL                                               'var_dump'
         13        SEND_VAR                                                 !1
         14        DO_ICALL                                                 
   16    15      > RETURN                                                   1

Class foo\foo1: [no user functions]
Class bar\foo2: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
192.44 ms | 1394 KiB | 15 Q