3v4l.org

run code in 300+ PHP versions simultaneously
<?php class x { public function __set($name, $value) { if ($value == 'mooo') $this->doSomethingPotentiallySetty(); var_dump(property_exist($this, $name)); } public function doSomethingPotentiallySetty() { $this->test = 123; } } $x = new x(); $x->doSomethingPotentiallySetty(); var_dump($x); $x->test = 'mooo'; var_dump($x);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/mZRlJ
function name:  (null)
number of ops:  14
compiled vars:  !0 = $x
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   19     0  E >   NEW                                              $1      'x'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   21     3        INIT_METHOD_CALL                                         !0, 'doSomethingPotentiallySetty'
          4        DO_FCALL                                      0          
   23     5        INIT_FCALL                                               'var_dump'
          6        SEND_VAR                                                 !0
          7        DO_ICALL                                                 
   25     8        ASSIGN_OBJ                                               !0, 'test'
          9        OP_DATA                                                  'mooo'
   27    10        INIT_FCALL                                               'var_dump'
         11        SEND_VAR                                                 !0
         12        DO_ICALL                                                 
         13      > RETURN                                                   1

Class x:
Function __set:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 6
Branch analysis from position: 4
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 6
filename:       /in/mZRlJ
function name:  __set
number of ops:  15
compiled vars:  !0 = $name, !1 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    7     2        IS_EQUAL                                                 !1, 'mooo'
          3      > JMPZ                                                     ~2, ->6
    8     4    >   INIT_METHOD_CALL                                         'doSomethingPotentiallySetty'
          5        DO_FCALL                                      0          
   10     6    >   INIT_FCALL                                               'var_dump'
          7        INIT_FCALL_BY_NAME                                       'property_exist'
          8        FETCH_THIS                                       $4      
          9        SEND_VAR_EX                                              $4
         10        SEND_VAR_EX                                              !0
         11        DO_FCALL                                      0  $5      
         12        SEND_VAR                                                 $5
         13        DO_ICALL                                                 
   11    14      > RETURN                                                   null

End of function __set

Function dosomethingpotentiallysetty:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/mZRlJ
function name:  doSomethingPotentiallySetty
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   ASSIGN_OBJ                                               'test'
          1        OP_DATA                                                  123
   16     2      > RETURN                                                   null

End of function dosomethingpotentiallysetty

End of class x.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
158 ms | 1396 KiB | 15 Q