3v4l.org

run code in 300+ PHP versions simultaneously
<?php declare(strict_types=1); error_reporting(E_ALL); class ClassUsedForTyping { } class ClassWithSetMagic { public function __construct(array $dummy) { printf("Constructor for ClassWithSetMagic\n"); } public function __set($name, $value) { printf("Setting %s\n", $name); } public function __isset($name) { return false; } } class ClassInheritingFromClassWithSetMagic extends ClassWithSetMagic { public ClassUsedForTyping $property_with_type; public function __construct(array $dummy, ClassUsedForTyping $class_used_for_typing) { parent::__construct($dummy); printf("Constructor for ClassInheritingFromClassWithSetMagic\n"); $this->property_with_type = $class_used_for_typing; } } $inst = new ClassInheritingFromClassWithSetMagic( [], new ClassUsedForTyping() ); print_r($inst);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/LECsk
function name:  (null)
number of ops:  14
compiled vars:  !0 = $inst
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   INIT_FCALL                                               'error_reporting'
          1        SEND_VAL                                                 32767
          2        DO_ICALL                                                 
   37     3        NEW                                              $2      'ClassInheritingFromClassWithSetMagic'
   38     4        SEND_VAL_EX                                              <array>
   39     5        NEW                                              $3      'ClassUsedForTyping'
          6        DO_FCALL                                      0          
          7        SEND_VAR_NO_REF_EX                                       $3
   37     8        DO_FCALL                                      0          
          9        ASSIGN                                                   !0, $2
   42    10        INIT_FCALL                                               'print_r'
         11        SEND_VAR                                                 !0
         12        DO_ICALL                                                 
         13      > RETURN                                                   1

Class ClassUsedForTyping: [no user functions]
Class ClassWithSetMagic:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/LECsk
function name:  __construct
number of ops:  5
compiled vars:  !0 = $dummy
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   RECV                                             !0      
   14     1        INIT_FCALL                                               'printf'
          2        SEND_VAL                                                 'Constructor+for+ClassWithSetMagic%0A'
          3        DO_ICALL                                                 
   15     4      > RETURN                                                   null

End of function __construct

Function __set:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/LECsk
function name:  __set
number of ops:  7
compiled vars:  !0 = $name, !1 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   18     2        INIT_FCALL                                               'printf'
          3        SEND_VAL                                                 'Setting+%25s%0A'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                                 
   19     6      > RETURN                                                   null

End of function __set

Function __isset:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/LECsk
function name:  __isset
number of ops:  3
compiled vars:  !0 = $name
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   21     0  E >   RECV                                             !0      
   22     1      > RETURN                                                   <false>
   23     2*     > RETURN                                                   null

End of function __isset

End of class ClassWithSetMagic.

Class ClassInheritingFromClassWithSetMagic:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/LECsk
function name:  __construct
number of ops:  11
compiled vars:  !0 = $dummy, !1 = $class_used_for_typing
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   29     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   30     2        INIT_STATIC_METHOD_CALL                                  
          3        SEND_VAR_EX                                              !0
          4        DO_FCALL                                      0          
   31     5        INIT_FCALL                                               'printf'
          6        SEND_VAL                                                 'Constructor+for+ClassInheritingFromClassWithSetMagic%0A'
          7        DO_ICALL                                                 
   33     8        ASSIGN_OBJ                                               'property_with_type'
          9        OP_DATA                                                  !1
   34    10      > RETURN                                                   null

End of function __construct

Function __set:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/LECsk
function name:  __set
number of ops:  7
compiled vars:  !0 = $name, !1 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   18     2        INIT_FCALL                                               'printf'
          3        SEND_VAL                                                 'Setting+%25s%0A'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                                 
   19     6      > RETURN                                                   null

End of function __set

Function __isset:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/LECsk
function name:  __isset
number of ops:  3
compiled vars:  !0 = $name
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   21     0  E >   RECV                                             !0      
   22     1      > RETURN                                                   <false>
   23     2*     > RETURN                                                   null

End of function __isset

End of class ClassInheritingFromClassWithSetMagic.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
259.36 ms | 1017 KiB | 16 Q