3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Test { function __set($name, $value) { if(is_bool($value)) { if($value) { $this->$name = 't'; } else { $this->$name = 'f'; } } } } print is_bool(true); $t1 = new Test(); $test->param = true; print_r($test);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Cte8N
function name:  (null)
number of ops:  11
compiled vars:  !0 = $t1, !1 = $test
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   TYPE_CHECK                                   12  ~2      <true>
          1        ECHO                                                     ~2
   16     2        NEW                                              $3      'Test'
          3        DO_FCALL                                      0          
          4        ASSIGN                                                   !0, $3
   17     5        ASSIGN_OBJ                                               !1, 'param'
          6        OP_DATA                                                  <true>
   18     7        INIT_FCALL                                               'print_r'
          8        SEND_VAR                                                 !1
          9        DO_ICALL                                                 
         10      > RETURN                                                   1

Class Test:
Function __set:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 10
Branch analysis from position: 4
2 jumps found. (Code = 43) Position 1 = 5, Position 2 = 8
Branch analysis from position: 5
1 jumps found. (Code = 42) Position 1 = 10
Branch analysis from position: 10
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 10
filename:       /in/Cte8N
function name:  __set
number of ops:  11
compiled vars:  !0 = $name, !1 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    5     2        TYPE_CHECK                                   12          !1
          3      > JMPZ                                                     ~2, ->10
    6     4    > > JMPZ                                                     !1, ->8
    7     5    >   ASSIGN_OBJ                                               !0
          6        OP_DATA                                                  't'
          7      > JMP                                                      ->10
   10     8    >   ASSIGN_OBJ                                               !0
          9        OP_DATA                                                  'f'
   13    10    > > RETURN                                                   null

End of function __set

End of class Test.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
171.05 ms | 1387 KiB | 15 Q