3v4l.org

run code in 300+ PHP versions simultaneously
<?php $obj = new stdClass; $obj->{123} = '456'; print_r($obj); echo $obj->{123},"\n"; if (isset($obj->{123})) { echo 'Property 123 is set',"\n";} if (property_exists($obj,123)) echo 'Property 123 exists',"\n"; echo $obj->{123};
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 13, Position 2 = 15
Branch analysis from position: 13
2 jumps found. (Code = 43) Position 1 = 20, Position 2 = 22
Branch analysis from position: 20
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 22
Branch analysis from position: 15
filename:       /in/mBJdV
function name:  (null)
number of ops:  25
compiled vars:  !0 = $obj
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   NEW                                              $1      'stdClass'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
    3     3        ASSIGN_OBJ                                               !0, '123'
          4        OP_DATA                                                  '456'
    4     5        INIT_FCALL                                               'print_r'
          6        SEND_VAR                                                 !0
          7        DO_ICALL                                                 
    5     8        FETCH_OBJ_R                                      ~6      !0, '123'
          9        ECHO                                                     ~6
         10        ECHO                                                     '%0A'
    6    11        ISSET_ISEMPTY_PROP_OBJ                                   !0, '123'
         12      > JMPZ                                                     ~7, ->15
         13    >   ECHO                                                     'Property+123+is+set'
         14        ECHO                                                     '%0A'
    7    15    >   INIT_FCALL                                               'property_exists'
         16        SEND_VAR                                                 !0
         17        SEND_VAL                                                 123
         18        DO_ICALL                                         $8      
         19      > JMPZ                                                     $8, ->22
         20    >   ECHO                                                     'Property+123+exists'
         21        ECHO                                                     '%0A'
    8    22    >   FETCH_OBJ_R                                      ~9      !0, '123'
         23        ECHO                                                     ~9
         24      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.76 ms | 1400 KiB | 17 Q