3v4l.org

run code in 500+ PHP versions simultaneously
<?php $x = json_decode('{ "key": "levels", "value": "[{role_id:1, access_level_id:3}, {role_id:2, access_level_id:1}, {role_id:3, access_level_id:2}]", "description": "" }', true); $x['value'] = json_decode(preg_replace('/(\w+)(?=:)/', '"$1"', $x['value']), true); print_r($x);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/HgjJQ
function name:  (null)
number of ops:  18
compiled vars:  !0 = $x
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                                   'json_decode'
          1        SEND_VAL                                                     '%7B%0A%09%22key%22%3A+%22levels%22%2C%0A%09%22value%22%3A+%22%5B%7Brole_id%3A1%2C+access_level_id%3A3%7D%2C+%7Brole_id%3A2%2C+access_level_id%3A1%7D%2C+%7Brole_id%3A3%2C+access_level_id%3A2%7D%5D%22%2C%0A%09%22description%22%3A+%22%22%0A%7D'
    7     2        SEND_VAL                                                     <true>
    3     3        DO_ICALL                                             $1      
          4        ASSIGN                                                       !0, $1
    9     5        INIT_FCALL                                                   'json_decode'
          6        FETCH_DIM_R                                          ~4      !0, 'value'
          7        FRAMELESS_ICALL_3                preg_replace        ~5      '%2F%28%5Cw%2B%29%28%3F%3D%3A%29%2F', '%22%241%22'
          8        OP_DATA                                                      ~4
          9        SEND_VAL                                                     ~5
         10        SEND_VAL                                                     <true>
         11        DO_ICALL                                             $6      
         12        ASSIGN_DIM                                                   !0, 'value'
         13        OP_DATA                                                      $6
   10    14        INIT_FCALL                                                   'print_r'
         15        SEND_VAR                                                     !0
         16        DO_ICALL                                                     
         17      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
222.8 ms | 2239 KiB | 15 Q