3v4l.org

run code in 300+ PHP versions simultaneously
<?php declare(strict_types=1); class Dummy { } class Parental { public function __set($name, $val) { printf("Setting %s to %s\n", $name, var_export($val, true)); $this->{$name} = $val; } } class Demo extends Parental { private Dummy $x; public function test() { $this->x = new Dummy(); } } $d = new Demo(); $d->test(); print_r($d);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/DQqak
function name:  (null)
number of ops:  9
compiled vars:  !0 = $d
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   22     0  E >   NEW                                              $1      'Demo'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   23     3        INIT_METHOD_CALL                                         !0, 'test'
          4        DO_FCALL                                      0          
   25     5        INIT_FCALL                                               'print_r'
          6        SEND_VAR                                                 !0
          7        DO_ICALL                                                 
          8      > RETURN                                                   1

Class Dummy: [no user functions]
Class Parental:
Function __set:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/DQqak
function name:  __set
number of ops:  14
compiled vars:  !0 = $name, !1 = $val
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    9     2        INIT_FCALL                                               'printf'
          3        SEND_VAL                                                 'Setting+%25s+to+%25s%0A'
          4        SEND_VAR                                                 !0
          5        INIT_FCALL                                               'var_export'
          6        SEND_VAR                                                 !1
          7        SEND_VAL                                                 <true>
          8        DO_ICALL                                         $2      
          9        SEND_VAR                                                 $2
         10        DO_ICALL                                                 
   10    11        ASSIGN_OBJ                                               !0
         12        OP_DATA                                                  !1
   11    13      > RETURN                                                   null

End of function __set

End of class Parental.

Class Demo:
Function test:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/DQqak
function name:  test
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     0  E >   NEW                                              $1      'Dummy'
          1        DO_FCALL                                      0          
          2        ASSIGN_OBJ                                               'x'
          3        OP_DATA                                                  $1
   19     4      > RETURN                                                   null

End of function test

Function __set:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/DQqak
function name:  __set
number of ops:  14
compiled vars:  !0 = $name, !1 = $val
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    9     2        INIT_FCALL                                               'printf'
          3        SEND_VAL                                                 'Setting+%25s+to+%25s%0A'
          4        SEND_VAR                                                 !0
          5        INIT_FCALL                                               'var_export'
          6        SEND_VAR                                                 !1
          7        SEND_VAL                                                 <true>
          8        DO_ICALL                                         $2      
          9        SEND_VAR                                                 $2
         10        DO_ICALL                                                 
   10    11        ASSIGN_OBJ                                               !0
         12        OP_DATA                                                  !1
   11    13      > RETURN                                                   null

End of function __set

End of class Demo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
140.1 ms | 1007 KiB | 16 Q