3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace MiProyecto; function obtener($nombreclase) { $a = __NAMESPACE__ . "\\" . $nombreclase; echo $a; return new $a; } //$aa = obtener('nuevaClase'); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/vBva4
function name:  (null)
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E > > RETURN                                                   1

Function miproyecto%5Cobtener:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/vBva4
function name:  MiProyecto\obtener
number of ops:  9
compiled vars:  !0 = $nombreclase, !1 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
    6     1        CONCAT                                           ~2      'MiProyecto%5C', !0
          2        ASSIGN                                                   !1, ~2
    7     3        ECHO                                                     !1
    8     4        FETCH_CLASS                                   0  $4      !1
          5        NEW                                              $5      $4
          6        DO_FCALL                                      0          
          7      > RETURN                                                   $5
    9     8*     > RETURN                                                   null

End of function miproyecto%5Cobtener

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
141.26 ms | 1393 KiB | 13 Q