3v4l.org

run code in 300+ PHP versions simultaneously
<?php class class1 { function class1() { error_log("Constuctor of class1"); } } class class2 extends class1 { } class class3 extends class2 { } class class4_working extends class3 { function class4_working() { parent::__construct(); } } class class4_notworking extends class3 { function class4_notworking() { parent::class2(); } } error_log("working"); $c = new class4_working(); error_log("notworking"); $c = new class4_notworking();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/5c8YT
function name:  (null)
number of ops:  13
compiled vars:  !0 = $c
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   27     0  E >   INIT_FCALL                                               'error_log'
          1        SEND_VAL                                                 'working'
          2        DO_ICALL                                                 
   28     3        NEW                                              $2      'class4_working'
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !0, $2
   29     6        INIT_FCALL                                               'error_log'
          7        SEND_VAL                                                 'notworking'
          8        DO_ICALL                                                 
   30     9        NEW                                              $6      'class4_notworking'
         10        DO_FCALL                                      0          
         11        ASSIGN                                                   !0, $6
         12      > RETURN                                                   1

Class class1:
Function class1:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/5c8YT
function name:  class1
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   INIT_FCALL                                               'error_log'
          1        SEND_VAL                                                 'Constuctor+of+class1'
          2        DO_ICALL                                                 
    6     3      > RETURN                                                   null

End of function class1

End of class class1.

Class class2:
Function class1:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/5c8YT
function name:  class1
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   INIT_FCALL                                               'error_log'
          1        SEND_VAL                                                 'Constuctor+of+class1'
          2        DO_ICALL                                                 
    6     3      > RETURN                                                   null

End of function class1

End of class class2.

Class class3:
Function class1:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/5c8YT
function name:  class1
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   INIT_FCALL                                               'error_log'
          1        SEND_VAL                                                 'Constuctor+of+class1'
          2        DO_ICALL                                                 
    6     3      > RETURN                                                   null

End of function class1

End of class class3.

Class class4_working:
Function class4_working:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/5c8YT
function name:  class4_working
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   INIT_STATIC_METHOD_CALL                                  
          1        DO_FCALL                                      0          
   18     2      > RETURN                                                   null

End of function class4_working

Function class1:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/5c8YT
function name:  class1
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   INIT_FCALL                                               'error_log'
          1        SEND_VAL                                                 'Constuctor+of+class1'
          2        DO_ICALL                                                 
    6     3      > RETURN                                                   null

End of function class1

End of class class4_working.

Class class4_notworking:
Function class4_notworking:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/5c8YT
function name:  class4_notworking
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   23     0  E >   INIT_STATIC_METHOD_CALL                                  'class2'
          1        DO_FCALL                                      0          
   24     2      > RETURN                                                   null

End of function class4_notworking

Function class1:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/5c8YT
function name:  class1
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   INIT_FCALL                                               'error_log'
          1        SEND_VAL                                                 'Constuctor+of+class1'
          2        DO_ICALL                                                 
    6     3      > RETURN                                                   null

End of function class1

End of class class4_notworking.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.17 ms | 1392 KiB | 15 Q