3v4l.org

run code in 300+ PHP versions simultaneously
<?php class foo { public $baz = 'bar'; function __get($name) { if ($name == 'bar') return $this->baz; } } for($i=0; $i<10000;$i++) $o = new foo; var_dump($o->bar); var_dump(isset($o->bar));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 6
Branch analysis from position: 6
2 jumps found. (Code = 44) Position 1 = 8, Position 2 = 2
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 2
2 jumps found. (Code = 44) Position 1 = 8, Position 2 = 2
Branch analysis from position: 8
Branch analysis from position: 2
filename:       /in/SXqXM
function name:  (null)
number of ops:  17
compiled vars:  !0 = $i, !1 = $o
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   ASSIGN                                                   !0, 0
          1      > JMP                                                      ->6
   14     2    >   NEW                                              $3      'foo'
          3        DO_FCALL                                      0          
          4        ASSIGN                                                   !1, $3
   13     5        PRE_INC                                                  !0
          6    >   IS_SMALLER                                               !0, 10000
          7      > JMPNZ                                                    ~7, ->2
   15     8    >   INIT_FCALL                                               'var_dump'
          9        FETCH_OBJ_R                                      ~8      !1, 'bar'
         10        SEND_VAL                                                 ~8
         11        DO_ICALL                                                 
   16    12        INIT_FCALL                                               'var_dump'
         13        ISSET_ISEMPTY_PROP_OBJ                           ~10     !1, 'bar'
         14        SEND_VAL                                                 ~10
         15        DO_ICALL                                                 
         16      > RETURN                                                   1

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

End of function __get

End of class foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.77 ms | 1396 KiB | 15 Q