3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Example { protected $_data = [ "foo" => "bar", "baz" => "crazy" ]; public function &__get( $key ) { return $this->_data[ $key ]; } } $e = new Example(); $what_I_expect = ( empty( $e->foo ) ) ? "Why u no exist?!" : "It exists!"; var_dump( $what_I_expect );
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 5, Position 2 = 7
Branch analysis from position: 5
1 jumps found. (Code = 42) Position 1 = 8
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 7
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/eROgm
function name:  (null)
number of ops:  13
compiled vars:  !0 = $e, !1 = $what_I_expect
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   NEW                                              $2      'Example'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
   15     3        ISSET_ISEMPTY_PROP_OBJ                                   !0, 'foo'
          4      > JMPZ                                                     ~5, ->7
          5    >   QM_ASSIGN                                        ~6      'Why+u+no+exist%3F%21'
          6      > JMP                                                      ->8
          7    >   QM_ASSIGN                                        ~6      'It+exists%21'
          8    >   ASSIGN                                                   !1, ~6
   17     9        INIT_FCALL                                               'var_dump'
         10        SEND_VAR                                                 !1
         11        DO_ICALL                                                 
         12      > RETURN                                                   1

Class Example:
Function __get:
Finding entry points
Branch analysis from position: 0
Return found
filename:       /in/eROgm
function name:  __get
number of ops:  5
compiled vars:  !0 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   RECV                                             !0      
    8     1        FETCH_OBJ_W                                      $1      '_data'
          2        FETCH_DIM_W                                      $2      $1, !0
          3      > RETURN_BY_REF                                            $2
    9     4*     > RETURN_BY_REF                                            null

End of function __get

End of class Example.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.66 ms | 1386 KiB | 15 Q