3v4l.org

run code in 300+ PHP versions simultaneously
<?php $convert_html_keys = array("name", "label", "html", "options" => array("text")); $object = json_decode(json_encode(array( "options" => array( 0 => json_decode(json_encode(array( "value" => 0, "text" => "wtf0000" ))), 1 => json_decode(json_encode(array( "value" => 1, "text" => "wtf1111" ))) ) ))); foreach ($convert_html_keys as $key => $val) { foreach ($val as $option_array_value) { foreach ($object->$key as &$object_key_value) { $object_key_value->text = "omg"; } } } print_r($object);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 24, Position 2 = 38
Branch analysis from position: 24
2 jumps found. (Code = 78) Position 1 = 25, Position 2 = 38
Branch analysis from position: 25
2 jumps found. (Code = 77) Position 1 = 27, Position 2 = 36
Branch analysis from position: 27
2 jumps found. (Code = 78) Position 1 = 28, Position 2 = 36
Branch analysis from position: 28
2 jumps found. (Code = 125) Position 1 = 30, Position 2 = 34
Branch analysis from position: 30
2 jumps found. (Code = 126) Position 1 = 31, Position 2 = 34
Branch analysis from position: 31
1 jumps found. (Code = 42) Position 1 = 30
Branch analysis from position: 30
Branch analysis from position: 34
1 jumps found. (Code = 42) Position 1 = 27
Branch analysis from position: 27
Branch analysis from position: 34
Branch analysis from position: 36
1 jumps found. (Code = 42) Position 1 = 24
Branch analysis from position: 24
Branch analysis from position: 36
Branch analysis from position: 38
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 38
filename:       /in/roZhp
function name:  (null)
number of ops:  43
compiled vars:  !0 = $convert_html_keys, !1 = $object, !2 = $val, !3 = $key, !4 = $option_array_value, !5 = $object_key_value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    4     1        INIT_FCALL                                               'json_decode'
          2        INIT_FCALL                                               'json_encode'
    6     3        INIT_FCALL                                               'json_decode'
          4        INIT_FCALL                                               'json_encode'
    7     5        SEND_VAL                                                 <array>
          6        DO_ICALL                                         $7      
          7        SEND_VAR                                                 $7
          8        DO_ICALL                                         $8      
          9        INIT_ARRAY                                       ~9      $8, 0
   10    10        INIT_FCALL                                               'json_decode'
         11        INIT_FCALL                                               'json_encode'
   11    12        SEND_VAL                                                 <array>
         13        DO_ICALL                                         $10     
         14        SEND_VAR                                                 $10
         15        DO_ICALL                                         $11     
         16        ADD_ARRAY_ELEMENT                                ~9      $11, 1
         17        INIT_ARRAY                                       ~12     ~9, 'options'
         18        SEND_VAL                                                 ~12
         19        DO_ICALL                                         $13     
         20        SEND_VAR                                                 $13
         21        DO_ICALL                                         $14     
    4    22        ASSIGN                                                   !1, $14
   17    23      > FE_RESET_R                                       $16     !0, ->38
         24    > > FE_FETCH_R                                       ~17     $16, !2, ->38
         25    >   ASSIGN                                                   !3, ~17
   18    26      > FE_RESET_R                                       $19     !2, ->36
         27    > > FE_FETCH_R                                               $19, !4, ->36
   19    28    >   FETCH_OBJ_W                                      $20     !1, !3
         29      > FE_RESET_RW                                      $21     $20, ->34
         30    > > FE_FETCH_RW                                              $21, !5, ->34
   20    31    >   ASSIGN_OBJ                                               !5, 'text'
         32        OP_DATA                                                  'omg'
   19    33      > JMP                                                      ->30
         34    >   FE_FREE                                                  $21
   18    35      > JMP                                                      ->27
         36    >   FE_FREE                                                  $19
   17    37      > JMP                                                      ->24
         38    >   FE_FREE                                                  $16
   25    39        INIT_FCALL                                               'print_r'
         40        SEND_VAR                                                 !1
         41        DO_ICALL                                                 
         42      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.67 ms | 1400 KiB | 19 Q