3v4l.org

run code in 300+ PHP versions simultaneously
<?php $json = '{"one": "1", "two":"2"}'; $obj = json_decode($json, false); $assoc = json_decode($json, true); print_r($obj); print_r($assoc);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/YBaVr
function name:  (null)
number of ops:  18
compiled vars:  !0 = $json, !1 = $obj, !2 = $assoc
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%7B%22one%22%3A+%221%22%2C+%22two%22%3A%222%22%7D'
    5     1        INIT_FCALL                                               'json_decode'
          2        SEND_VAR                                                 !0
          3        SEND_VAL                                                 <false>
          4        DO_ICALL                                         $4      
          5        ASSIGN                                                   !1, $4
    6     6        INIT_FCALL                                               'json_decode'
          7        SEND_VAR                                                 !0
          8        SEND_VAL                                                 <true>
          9        DO_ICALL                                         $6      
         10        ASSIGN                                                   !2, $6
    8    11        INIT_FCALL                                               'print_r'
         12        SEND_VAR                                                 !1
         13        DO_ICALL                                                 
    9    14        INIT_FCALL                                               'print_r'
         15        SEND_VAR                                                 !2
         16        DO_ICALL                                                 
         17      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
167.98 ms | 1394 KiB | 17 Q