3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace MyProject; $classname='p'; function get($classname) { $a = __NAMESPACE__ . '\\' . $classname; return new $a; echo $a; } ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/MQSYJ
function name:  (null)
number of ops:  2
compiled vars:  !0 = $classname
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'p'
   12     1      > RETURN                                                   1

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

End of function myproject%5Cget

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.72 ms | 1393 KiB | 13 Q