3v4l.org

run code in 300+ PHP versions simultaneously
<?php class x { public function __get($k) { if ($k=='x') return 'y'; } } $x = new x; $c = 0; for ($i=0; $i<9999; $i++) $c += strlen($x->x); echo $c;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 10
Branch analysis from position: 10
2 jumps found. (Code = 44) Position 1 = 12, Position 2 = 6
Branch analysis from position: 12
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 6
2 jumps found. (Code = 44) Position 1 = 12, Position 2 = 6
Branch analysis from position: 12
Branch analysis from position: 6
filename:       /in/qtt2l
function name:  (null)
number of ops:  14
compiled vars:  !0 = $x, !1 = $c, !2 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   NEW                                              $3      'x'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $3
   13     3        ASSIGN                                                   !1, 0
   14     4        ASSIGN                                                   !2, 0
          5      > JMP                                                      ->10
   15     6    >   FETCH_OBJ_R                                      ~8      !0, 'x'
          7        STRLEN                                           ~9      ~8
          8        ASSIGN_OP                                     1          !1, ~9
   14     9        PRE_INC                                                  !2
         10    >   IS_SMALLER                                               !2, 9999
         11      > JMPNZ                                                    ~12, ->6
   17    12    >   ECHO                                                     !1
         13      > RETURN                                                   1

Class x:
Function __get:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 3, Position 2 = 4
Branch analysis from position: 3
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 4
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/qtt2l
function name:  __get
number of ops:  5
compiled vars:  !0 = $k
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
    7     1        IS_EQUAL                                                 !0, 'x'
          2      > JMPZ                                                     ~1, ->4
    8     3    > > RETURN                                                   'y'
    9     4    > > RETURN                                                   null

End of function __get

End of class x.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
183.17 ms | 1394 KiB | 13 Q