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'](); } 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/OGmOG
function name:  (null)
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   20     0  E >   NEW                                              $0      'Bar'
          1        DO_FCALL                                      0          
          2        FREE                                                     $0
   21     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/OGmOG
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/OGmOG
function name:  __construct
number of ops:  16
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      > 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/OGmOG
function name:  test
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     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:
173.28 ms | 1395 KiB | 13 Q