3v4l.org

run code in 300+ PHP versions simultaneously
<?php error_reporting(-1); class foo { public $baz = 'bar'; function __get($name) { if ($name == 'bar') return $this->baz; } } $o = new foo; var_dump($o->bazz); var_dump($o->bar); var_dump(isset($o->bar));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/LNPhf
function name:  (null)
number of ops:  19
compiled vars:  !0 = $o
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'error_reporting'
          1        SEND_VAL                                                 -1
          2        DO_ICALL                                                 
   13     3        NEW                                              $2      'foo'
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !0, $2
   14     6        INIT_FCALL                                               'var_dump'
          7        FETCH_OBJ_R                                      ~5      !0, 'bazz'
          8        SEND_VAL                                                 ~5
          9        DO_ICALL                                                 
   15    10        INIT_FCALL                                               'var_dump'
         11        FETCH_OBJ_R                                      ~7      !0, 'bar'
         12        SEND_VAL                                                 ~7
         13        DO_ICALL                                                 
   16    14        INIT_FCALL                                               'var_dump'
         15        ISSET_ISEMPTY_PROP_OBJ                           ~9      !0, 'bar'
         16        SEND_VAL                                                 ~9
         17        DO_ICALL                                                 
         18      > 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/LNPhf
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:
153.67 ms | 1395 KiB | 17 Q