3v4l.org

run code in 300+ PHP versions simultaneously
<?php var_dump(json_decode('1 ', true)); var_dump(json_last_error()); var_dump(json_decode('', true)); var_dump(json_last_error()); var_dump(json_decode('1', true)); var_dump(json_last_error()); var_dump(json_decode('b', true)); var_dump(json_last_error());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/kmnnZ
function name:  (null)
number of ops:  49
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'var_dump'
          1        INIT_FCALL                                               'json_decode'
          2        SEND_VAL                                                 '1+'
          3        SEND_VAL                                                 <true>
          4        DO_ICALL                                         $0      
          5        SEND_VAR                                                 $0
          6        DO_ICALL                                                 
    3     7        INIT_FCALL                                               'var_dump'
          8        INIT_FCALL                                               'json_last_error'
          9        DO_ICALL                                         $2      
         10        SEND_VAR                                                 $2
         11        DO_ICALL                                                 
    4    12        INIT_FCALL                                               'var_dump'
         13        INIT_FCALL                                               'json_decode'
         14        SEND_VAL                                                 ''
         15        SEND_VAL                                                 <true>
         16        DO_ICALL                                         $4      
         17        SEND_VAR                                                 $4
         18        DO_ICALL                                                 
    5    19        INIT_FCALL                                               'var_dump'
         20        INIT_FCALL                                               'json_last_error'
         21        DO_ICALL                                         $6      
         22        SEND_VAR                                                 $6
         23        DO_ICALL                                                 
    6    24        INIT_FCALL                                               'var_dump'
         25        INIT_FCALL                                               'json_decode'
         26        SEND_VAL                                                 '1'
         27        SEND_VAL                                                 <true>
         28        DO_ICALL                                         $8      
         29        SEND_VAR                                                 $8
         30        DO_ICALL                                                 
    7    31        INIT_FCALL                                               'var_dump'
         32        INIT_FCALL                                               'json_last_error'
         33        DO_ICALL                                         $10     
         34        SEND_VAR                                                 $10
         35        DO_ICALL                                                 
    8    36        INIT_FCALL                                               'var_dump'
         37        INIT_FCALL                                               'json_decode'
         38        SEND_VAL                                                 'b'
         39        SEND_VAL                                                 <true>
         40        DO_ICALL                                         $12     
         41        SEND_VAR                                                 $12
         42        DO_ICALL                                                 
    9    43        INIT_FCALL                                               'var_dump'
         44        INIT_FCALL                                               'json_last_error'
         45        DO_ICALL                                         $14     
         46        SEND_VAR                                                 $14
         47        DO_ICALL                                                 
         48      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.54 ms | 1392 KiB | 19 Q