3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace A; class Test { public function __construct(){} public function testEchoName() { echo strtolower(self::class); echo "\n"; echo get_class($this); } } $test = new Test(); $test->testEchoName();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/GKOno
function name:  (null)
number of ops:  6
compiled vars:  !0 = $test
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   NEW                                              $1      'A%5CTest'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   16     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/GKOno
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/GKOno
function name:  testEchoName
number of ops:  11
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   INIT_NS_FCALL_BY_NAME                                    'A%5Cstrtolower'
          1        SEND_VAL_EX                                              'A%5CTest'
          2        DO_FCALL                                      0  $0      
          3        ECHO                                                     $0
   11     4        ECHO                                                     '%0A'
   12     5        INIT_NS_FCALL_BY_NAME                                    'A%5Cget_class'
          6        FETCH_THIS                                       $1      
          7        SEND_VAR_EX                                              $1
          8        DO_FCALL                                      0  $2      
          9        ECHO                                                     $2
   13    10      > RETURN                                                   null

End of function testechoname

End of class A\Test.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
144.7 ms | 1395 KiB | 17 Q