3v4l.org

run code in 500+ PHP versions simultaneously
<?php $string = "[{'test':'1', 'anothertest':'2'}, {'test':'3', 'anothertest':'4'}]"; $string = str_replace("'",'"', $string); print_r(json_decode($string,true));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/PDI7O
function name:  (null)
number of ops:  12
compiled vars:  !0 = $string
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, '%5B%7B%27test%27%3A%271%27%2C+%27anothertest%27%3A%272%27%7D%2C+%7B%27test%27%3A%273%27%2C+%27anothertest%27%3A%274%27%7D%5D'
    4     1        FRAMELESS_ICALL_3                str_replace         ~2      '%27', '%22'
          2        OP_DATA                                                      !0
          3        ASSIGN                                                       !0, ~2
    5     4        INIT_FCALL                                                   'print_r'
          5        INIT_FCALL                                                   'json_decode'
          6        SEND_VAR                                                     !0
          7        SEND_VAL                                                     <true>
          8        DO_ICALL                                             $4      
          9        SEND_VAR                                                     $4
         10        DO_ICALL                                                     
         11      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
163.7 ms | 1913 KiB | 15 Q