3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace A; class Test { public function __construct(){} public function testEchoName() { echo "self::class: ".self::class; echo "\n"; echo "get_class: ".get_class($this); echo "\n"; echo '__CLASS__: '.__CLASS__; echo "\n"; echo 'basename(__CLASS__): '.basename(__CLASS__); } } $test = new Test(); $test->testEchoName();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/LiZP1
function name:  (null)
number of ops:  6
compiled vars:  !0 = $test
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   19     0  E >   NEW                                              $1      'A%5CTest'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   20     3        INIT_METHOD_CALL                                         !0, 'testEchoName'
          4        DO_FCALL                                      0          
          5      > RETURN                                                   1

Class A\Test:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/LiZP1
function name:  __construct
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E > > RETURN                                                   null

End of function __construct

Function testechoname:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/LiZP1
function name:  testEchoName
number of ops:  17
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   ECHO                                                     'self%3A%3Aclass%3A+A%5CTest'
   11     1        ECHO                                                     '%0A'
   12     2        INIT_NS_FCALL_BY_NAME                                    'A%5Cget_class'
          3        FETCH_THIS                                       $0      
          4        SEND_VAR_EX                                              $0
          5        DO_FCALL                                      0  $1      
          6        CONCAT                                           ~2      'get_class%3A+', $1
          7        ECHO                                                     ~2
   13     8        ECHO                                                     '%0A'
   14     9        ECHO                                                     '__CLASS__%3A+A%5CTest'
   15    10        ECHO                                                     '%0A'
   16    11        INIT_NS_FCALL_BY_NAME                                    'A%5Cbasename'
         12        SEND_VAL_EX                                              'A%5CTest'
         13        DO_FCALL                                      0  $3      
         14        CONCAT                                           ~4      'basename%28__CLASS__%29%3A+', $3
         15        ECHO                                                     ~4
   17    16      > RETURN                                                   null

End of function testechoname

End of class A\Test.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
190.51 ms | 1396 KiB | 17 Q