3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace Nested\Name; class Test { public static function speak(string $name) { var_dump($name); // is the same as Name::class var_dump(class_exists($name)); // to see if the class exists or not var_dump(new $name); // is the same as new Name } } class Name{} Test::speak('Nested\Name\Name');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/lsNK4
function name:  (null)
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   INIT_STATIC_METHOD_CALL                                  'Nested%5CName%5CTest', 'speak'
          1        SEND_VAL                                                 'Nested%5CName%5CName'
          2        DO_FCALL                                      0          
          3      > RETURN                                                   1

Class Nested\Name\Test:
Function speak:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/lsNK4
function name:  speak
number of ops:  17
compiled vars:  !0 = $name
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   RECV                                             !0      
    9     1        INIT_NS_FCALL_BY_NAME                                    'Nested%5CName%5Cvar_dump'
          2        SEND_VAR_EX                                              !0
          3        DO_FCALL                                      0          
   10     4        INIT_NS_FCALL_BY_NAME                                    'Nested%5CName%5Cvar_dump'
          5        INIT_NS_FCALL_BY_NAME                                    'Nested%5CName%5Cclass_exists'
          6        SEND_VAR_EX                                              !0
          7        DO_FCALL                                      0  $2      
          8        SEND_VAR_NO_REF_EX                                       $2
          9        DO_FCALL                                      0          
   11    10        INIT_NS_FCALL_BY_NAME                                    'Nested%5CName%5Cvar_dump'
         11        FETCH_CLASS                                   0  $4      !0
         12        NEW                                              $5      $4
         13        DO_FCALL                                      0          
         14        SEND_VAR_NO_REF_EX                                       $5
         15        DO_FCALL                                      0          
   12    16      > RETURN                                                   null

End of function speak

End of class Nested\Name\Test.

Class Nested\Name\Name: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
180.9 ms | 1395 KiB | 17 Q