3v4l.org

run code in 300+ PHP versions simultaneously
<?php ini_set('error_reporting', E_ALL); ini_set('display_errors', 1); $obj = new stdclass(); echo $obj->{"foo\0bar"}; $obj->{"foo\0bar"} = 1; echo $obj->{"foo\0bar"};
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/OA5HO
function name:  (null)
number of ops:  18
compiled vars:  !0 = $obj
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'ini_set'
          1        SEND_VAL                                                 'error_reporting'
          2        SEND_VAL                                                 32767
          3        DO_ICALL                                                 
    3     4        INIT_FCALL                                               'ini_set'
          5        SEND_VAL                                                 'display_errors'
          6        SEND_VAL                                                 1
          7        DO_ICALL                                                 
    5     8        NEW                                              $3      'stdclass'
          9        DO_FCALL                                      0          
         10        ASSIGN                                                   !0, $3
    6    11        FETCH_OBJ_R                                      ~6      !0, 'foo%00bar'
         12        ECHO                                                     ~6
    8    13        ASSIGN_OBJ                                               !0, 'foo%00bar'
         14        OP_DATA                                                  1
    9    15        FETCH_OBJ_R                                      ~8      !0, 'foo%00bar'
         16        ECHO                                                     ~8
         17      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
165.37 ms | 1394 KiB | 15 Q