3v4l.org

run code in 500+ PHP versions simultaneously
<?php class Foo { public function __invoke() { echo 'self: ' . self::class . PHP_EOL; echo 'static: ' . static::class . PHP_EOL; echo 'get_class(): ' . get_class() . PHP_EOL; echo 'get_class($this): ' . get_class($this) . PHP_EOL; echo 'get_called_class(): ' . get_called_class() . PHP_EOL; } } class Bar extends Foo { } (new Bar())();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/PpZA6
function name:  (null)
number of ops:  5
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   19     0  E >   NEW                                                  $0      'Bar'
          1        DO_FCALL                                          0          
          2        INIT_DYNAMIC_CALL                                            $0
          3        DO_FCALL                                          0          
          4      > RETURN                                                       1

Class Foo:
Function __invoke:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/PpZA6
function name:  __invoke
number of ops:  19
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    7     0  E >   ECHO                                                         'self%3A+Foo%0A'
    8     1        FETCH_CLASS_NAME                                     ~0      
          2        CONCAT                                               ~1      'static%3A+', ~0
          3        CONCAT                                               ~2      ~1, '%0A'
          4        ECHO                                                         ~2
    9     5        GET_CLASS                                            ~3      
          6        CONCAT                                               ~4      'get_class%28%29%3A+', ~3
          7        CONCAT                                               ~5      ~4, '%0A'
          8        ECHO                                                         ~5
   10     9        FETCH_THIS                                           ~6      
         10        GET_CLASS                                            ~7      ~6
         11        CONCAT                                               ~8      'get_class%28%24this%29%3A+', ~7
         12        CONCAT                                               ~9      ~8, '%0A'
         13        ECHO                                                         ~9
   11    14        GET_CALLED_CLASS                                     ~10     
         15        CONCAT                                               ~11     'get_called_class%28%29%3A+', ~10
         16        CONCAT                                               ~12     ~11, '%0A'
         17        ECHO                                                         ~12
   12    18      > RETURN                                                       null

End of function __invoke

End of class Foo.

Class Bar:
Function __invoke:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/PpZA6
function name:  __invoke
number of ops:  19
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    7     0  E >   ECHO                                                         'self%3A+Foo%0A'
    8     1        FETCH_CLASS_NAME                                     ~0      
          2        CONCAT                                               ~1      'static%3A+', ~0
          3        CONCAT                                               ~2      ~1, '%0A'
          4        ECHO                                                         ~2
    9     5        GET_CLASS                                            ~3      
          6        CONCAT                                               ~4      'get_class%28%29%3A+', ~3
          7        CONCAT                                               ~5      ~4, '%0A'
          8        ECHO                                                         ~5
   10     9        FETCH_THIS                                           ~6      
         10        GET_CLASS                                            ~7      ~6
         11        CONCAT                                               ~8      'get_class%28%24this%29%3A+', ~7
         12        CONCAT                                               ~9      ~8, '%0A'
         13        ECHO                                                         ~9
   11    14        GET_CALLED_CLASS                                     ~10     
         15        CONCAT                                               ~11     'get_called_class%28%29%3A+', ~10
         16        CONCAT                                               ~12     ~11, '%0A'
         17        ECHO                                                         ~12
   12    18      > RETURN                                                       null

End of function __invoke

End of class Bar.

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
210.45 ms | 2343 KiB | 13 Q