3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { function test() { echo "foo\n"; } } class Bar extends Foo { function __construct() { [$this, 'test'](); [$this, 'self::test'](); [$this, 'parent::test'](); [$this, 'Foo::test'](); [$this, 'Bar::test'](); } function test() { echo "bar\n"; } } new Bar;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/6XGEP
function name:  (null)
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   22     0  E >   NEW                                              $0      'Bar'
          1        DO_FCALL                                      0          
          2        FREE                                                     $0
   23     3      > RETURN                                                   1

Class Foo:
Function test:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/6XGEP
function name:  test
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   ECHO                                                     'foo%0A'
          1      > RETURN                                                   null

End of function test

End of class Foo.

Class Bar:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/6XGEP
function name:  __construct
number of ops:  26
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   FETCH_THIS                                       ~0      
          1        INIT_ARRAY                                       ~1      ~0
          2        ADD_ARRAY_ELEMENT                                ~1      'test'
          3        INIT_DYNAMIC_CALL                                        ~1
          4        DO_FCALL                                      0          
   13     5        FETCH_THIS                                       ~3      
          6        INIT_ARRAY                                       ~4      ~3
          7        ADD_ARRAY_ELEMENT                                ~4      'self%3A%3Atest'
          8        INIT_DYNAMIC_CALL                                        ~4
          9        DO_FCALL                                      0          
   14    10        FETCH_THIS                                       ~6      
         11        INIT_ARRAY                                       ~7      ~6
         12        ADD_ARRAY_ELEMENT                                ~7      'parent%3A%3Atest'
         13        INIT_DYNAMIC_CALL                                        ~7
         14        DO_FCALL                                      0          
   15    15        FETCH_THIS                                       ~9      
         16        INIT_ARRAY                                       ~10     ~9
         17        ADD_ARRAY_ELEMENT                                ~10     'Foo%3A%3Atest'
         18        INIT_DYNAMIC_CALL                                        ~10
         19        DO_FCALL                                      0          
   16    20        FETCH_THIS                                       ~12     
         21        INIT_ARRAY                                       ~13     ~12
         22        ADD_ARRAY_ELEMENT                                ~13     'Bar%3A%3Atest'
         23        INIT_DYNAMIC_CALL                                        ~13
         24        DO_FCALL                                      0          
   17    25      > RETURN                                                   null

End of function __construct

Function test:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/6XGEP
function name:  test
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   19     0  E >   ECHO                                                     'bar%0A'
          1      > RETURN                                                   null

End of function test

End of class Bar.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
165.21 ms | 1403 KiB | 13 Q