3v4l.org

run code in 300+ PHP versions simultaneously
<?php class a { public function __construct() { echo "FIRST<br>"; } } class b extends a { function test() { global $a; var_dump( $a ); } public function __construct() { $this->test(); echo "SECOND"; } } function inst() { static $a; $a = new a(); } inst(); $b = new b();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/pBuYn
function name:  (null)
number of ops:  6
compiled vars:  !0 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   24     0  E >   INIT_FCALL                                               'inst'
          1        DO_FCALL                                      0          
   26     2        NEW                                              $2      'b'
          3        DO_FCALL                                      0          
          4        ASSIGN                                                   !0, $2
          5      > RETURN                                                   1

Function inst:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/pBuYn
function name:  inst
number of ops:  5
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   21     0  E >   BIND_STATIC                                              !0
   22     1        NEW                                              $1      'a'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $1
   23     4      > RETURN                                                   null

End of function inst

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

End of function __construct

End of class a.

Class b:
Function test:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/pBuYn
function name:  test
number of ops:  5
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   BIND_GLOBAL                                              !0, 'a'
   11     1        INIT_FCALL                                               'var_dump'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                                 
   12     4      > RETURN                                                   null

End of function test

Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/pBuYn
function name:  __construct
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   INIT_METHOD_CALL                                         'test'
          1        DO_FCALL                                      0          
   16     2        ECHO                                                     'SECOND'
   17     3      > RETURN                                                   null

End of function __construct

End of class b.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
204.37 ms | 1403 KiB | 16 Q