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 ) ) ? "It exists!" : "Why u no exist?!"; var_dump( $what_I_expect );
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 6, Position 2 = 8
Branch analysis from position: 6
1 jumps found. (Code = 42) Position 1 = 9
Branch analysis from position: 9
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/aUD9i
function name:  (null)
number of ops:  14
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                           ~5      !0, 'foo'
          4        BOOL_NOT                                         ~6      ~5
          5      > JMPZ                                                     ~6, ->8
          6    >   QM_ASSIGN                                        ~7      'It+exists%21'
          7      > JMP                                                      ->9
          8    >   QM_ASSIGN                                        ~7      'Why+u+no+exist%3F%21'
          9    >   ASSIGN                                                   !1, ~7
   17    10        INIT_FCALL                                               'var_dump'
         11        SEND_VAR                                                 !1
         12        DO_ICALL                                                 
         13      > RETURN                                                   1

Class Example:
Function __get:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/aUD9i
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_R                                      ~1      '_data'
          2        FETCH_DIM_R                                      ~2      ~1, !0
          3      > RETURN                                                   ~2
    9     4*     > RETURN                                                   null

End of function __get

End of class Example.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153 ms | 1395 KiB | 15 Q