3v4l.org

run code in 500+ PHP versions simultaneously
<?php // JSON is decoded print_r(json_decode('{"a":1,"b":3,"a":2}')); // with an error print json_last_error_msg(); // it is actually an error print_r(json_decode('{"a":1,"b":3,a":2}', flags: JSON_THROW_ON_ERROR)); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/rECYJ
function name:  (null)
number of ops:  18
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    4     0  E >   INIT_FCALL                                                   'print_r'
          1        INIT_FCALL                                                   'json_decode'
          2        SEND_VAL                                                     '%7B%22a%22%3A1%2C%22b%22%3A3%2C%22a%22%3A2%7D'
          3        DO_ICALL                                             $0      
          4        SEND_VAR                                                     $0
          5        DO_ICALL                                                     
    7     6        INIT_FCALL                                                   'json_last_error_msg'
          7        DO_ICALL                                             $2      
          8        ECHO                                                         $2
   10     9        INIT_FCALL                                                   'print_r'
         10        INIT_FCALL                                                   'json_decode'
         11        SEND_VAL                                                     '%7B%22a%22%3A1%2C%22b%22%3A3%2Ca%22%3A2%7D'
         12        SEND_VAL                                                     4194304
         13        CHECK_UNDEF_ARGS                                             
         14        DO_ICALL                                             $3      
         15        SEND_VAR                                                     $3
         16        DO_ICALL                                                     
   12    17      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
169.4 ms | 1432 KiB | 16 Q