3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace Foo { class Bar { function __construct(){ echo get_called_class() . PHP_EOL; echo get_class($this) . PHP_EOL; echo __CLASS__ . PHP_EOL; echo get_class(self) . PHP_EOL; echo ClassName::class . PHP_EOL; } } $oBar = new Bar(); } #EOF
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/2pYCX
function name:  (null)
number of ops:  4
compiled vars:  !0 = $oBar
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   NEW                                              $1      'Foo%5CBar'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   18     3      > RETURN                                                   1

Class Foo\Bar:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/2pYCX
function name:  __construct
number of ops:  26
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   INIT_NS_FCALL_BY_NAME                                    'Foo%5Cget_called_class'
          1        DO_FCALL                                      0  $0      
          2        FETCH_CONSTANT                                   ~1      'Foo%5CPHP_EOL'
          3        CONCAT                                           ~2      $0, ~1
          4        ECHO                                                     ~2
    8     5        INIT_NS_FCALL_BY_NAME                                    'Foo%5Cget_class'
          6        FETCH_THIS                                       $3      
          7        SEND_VAR_EX                                              $3
          8        DO_FCALL                                      0  $4      
          9        FETCH_CONSTANT                                   ~5      'Foo%5CPHP_EOL'
         10        CONCAT                                           ~6      $4, ~5
         11        ECHO                                                     ~6
    9    12        FETCH_CONSTANT                                   ~7      'Foo%5CPHP_EOL'
         13        CONCAT                                           ~8      'Foo%5CBar', ~7
         14        ECHO                                                     ~8
   10    15        INIT_NS_FCALL_BY_NAME                                    'Foo%5Cget_class'
         16        FETCH_CONSTANT                                   ~9      'Foo%5Cself'
         17        SEND_VAL_EX                                              ~9
         18        DO_FCALL                                      0  $10     
         19        FETCH_CONSTANT                                   ~11     'Foo%5CPHP_EOL'
         20        CONCAT                                           ~12     $10, ~11
         21        ECHO                                                     ~12
   11    22        FETCH_CONSTANT                                   ~13     'Foo%5CPHP_EOL'
         23        CONCAT                                           ~14     'Foo%5CClassName', ~13
         24        ECHO                                                     ~14
   12    25      > RETURN                                                   null

End of function __construct

End of class Foo\Bar.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
162.4 ms | 1400 KiB | 17 Q