3v4l.org

run code in 300+ PHP versions simultaneously
<?php error_reporting(E_ALL); json_decode('{"test":"test"}'); var_dump(json_last_error()); json_decode(""); var_dump(json_last_error()); json_decode("invalid json"); var_dump(json_last_error()); json_decode(""); var_dump(json_last_error());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/i9uYf
function name:  (null)
number of ops:  36
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'error_reporting'
          1        SEND_VAL                                                 32767
          2        DO_ICALL                                                 
    4     3        INIT_FCALL                                               'json_decode'
          4        SEND_VAL                                                 '%7B%22test%22%3A%22test%22%7D'
          5        DO_ICALL                                                 
    5     6        INIT_FCALL                                               'var_dump'
          7        INIT_FCALL                                               'json_last_error'
          8        DO_ICALL                                         $2      
          9        SEND_VAR                                                 $2
         10        DO_ICALL                                                 
    7    11        INIT_FCALL                                               'json_decode'
         12        SEND_VAL                                                 ''
         13        DO_ICALL                                                 
    8    14        INIT_FCALL                                               'var_dump'
         15        INIT_FCALL                                               'json_last_error'
         16        DO_ICALL                                         $5      
         17        SEND_VAR                                                 $5
         18        DO_ICALL                                                 
   11    19        INIT_FCALL                                               'json_decode'
         20        SEND_VAL                                                 'invalid+json'
         21        DO_ICALL                                                 
   12    22        INIT_FCALL                                               'var_dump'
         23        INIT_FCALL                                               'json_last_error'
         24        DO_ICALL                                         $8      
         25        SEND_VAR                                                 $8
         26        DO_ICALL                                                 
   15    27        INIT_FCALL                                               'json_decode'
         28        SEND_VAL                                                 ''
         29        DO_ICALL                                                 
   16    30        INIT_FCALL                                               'var_dump'
         31        INIT_FCALL                                               'json_last_error'
         32        DO_ICALL                                         $11     
         33        SEND_VAR                                                 $11
         34        DO_ICALL                                                 
         35      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
175.98 ms | 1396 KiB | 21 Q