3v4l.org

run code in 300+ PHP versions simultaneously
<?php var_dump(json_decode('1 ')); var_dump(json_last_error()); var_dump(json_decode('')); var_dump(json_last_error()); var_dump(json_decode('1')); var_dump(json_last_error()); var_dump(json_decode('b')); var_dump(json_last_error());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/3eN4l
function name:  (null)
number of ops:  45
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        DO_ICALL                                         $0      
          4        SEND_VAR                                                 $0
          5        DO_ICALL                                                 
    3     6        INIT_FCALL                                               'var_dump'
          7        INIT_FCALL                                               'json_last_error'
          8        DO_ICALL                                         $2      
          9        SEND_VAR                                                 $2
         10        DO_ICALL                                                 
    4    11        INIT_FCALL                                               'var_dump'
         12        INIT_FCALL                                               'json_decode'
         13        SEND_VAL                                                 ''
         14        DO_ICALL                                         $4      
         15        SEND_VAR                                                 $4
         16        DO_ICALL                                                 
    5    17        INIT_FCALL                                               'var_dump'
         18        INIT_FCALL                                               'json_last_error'
         19        DO_ICALL                                         $6      
         20        SEND_VAR                                                 $6
         21        DO_ICALL                                                 
    6    22        INIT_FCALL                                               'var_dump'
         23        INIT_FCALL                                               'json_decode'
         24        SEND_VAL                                                 '1'
         25        DO_ICALL                                         $8      
         26        SEND_VAR                                                 $8
         27        DO_ICALL                                                 
    7    28        INIT_FCALL                                               'var_dump'
         29        INIT_FCALL                                               'json_last_error'
         30        DO_ICALL                                         $10     
         31        SEND_VAR                                                 $10
         32        DO_ICALL                                                 
    8    33        INIT_FCALL                                               'var_dump'
         34        INIT_FCALL                                               'json_decode'
         35        SEND_VAL                                                 'b'
         36        DO_ICALL                                         $12     
         37        SEND_VAR                                                 $12
         38        DO_ICALL                                                 
    9    39        INIT_FCALL                                               'var_dump'
         40        INIT_FCALL                                               'json_last_error'
         41        DO_ICALL                                         $14     
         42        SEND_VAR                                                 $14
         43        DO_ICALL                                                 
         44      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.83 ms | 1396 KiB | 19 Q