3v4l.org

run code in 500+ PHP versions simultaneously
<?php $json = <<<JSON {"general":{ "round-corner":"0", "border-stroke":"2", "background-color äü??$%§":"#ffffff" } } JSON; $obj = json_decode($json); $keyName = "round-corner"; var_dump($obj->general->{'round-corner'}); var_dump($obj->general->$keyName); var_dump($obj->general->{'background-color äü??$%§'});
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/YDG13
function name:  (null)
number of ops:  22
compiled vars:  !0 = $json, !1 = $obj, !2 = $keyName
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, '%7B%22general%22%3A%7B%0A+%22round-corner%22%3A%220%22%2C%0A+%22border-stroke%22%3A%222%22%2C%0A+%22background-color+%C3%A4%C3%BC%3F%3F%24%25%C2%A7%22%3A%22%23ffffff%22%0A+%7D%0A%7D'
   12     1        INIT_FCALL                                                   'json_decode'
          2        SEND_VAR                                                     !0
          3        DO_ICALL                                             $4      
          4        ASSIGN                                                       !1, $4
   14     5        ASSIGN                                                       !2, 'round-corner'
   15     6        INIT_FCALL                                                   'var_dump'
          7        FETCH_OBJ_R                                          ~7      !1, 'general'
          8        FETCH_OBJ_R                                          ~8      ~7, 'round-corner'
          9        SEND_VAL                                                     ~8
         10        DO_ICALL                                                     
   16    11        INIT_FCALL                                                   'var_dump'
         12        FETCH_OBJ_R                                          ~10     !1, 'general'
         13        FETCH_OBJ_R                                          ~11     ~10, !2
         14        SEND_VAL                                                     ~11
         15        DO_ICALL                                                     
   17    16        INIT_FCALL                                                   'var_dump'
         17        FETCH_OBJ_R                                          ~13     !1, 'general'
         18        FETCH_OBJ_R                                          ~14     ~13, 'background-color+%C3%A4%C3%BC%3F%3F%24%25%C2%A7'
         19        SEND_VAL                                                     ~14
         20        DO_ICALL                                                     
         21      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
163.36 ms | 3311 KiB | 15 Q