3v4l.org

run code in 500+ PHP versions simultaneously
<?php // TYPE 1 - valid in top level but not valid in array // parsed at the top level var_dump(json_decode("07")); var_dump(json_decode("0xff")); var_dump(json_decode(".1")); var_dump(json_decode("-.1")); // parser by JSON_Parser var_dump(json_decode("[07]")); var_dump(json_decode("[0xff]")); var_dump(json_decode("[.1]")); var_dump(json_decode("[-.1]")); var_dump(json_last_error_msg()); // TYPE 2 - valid in top level as well as valid in array // parsed at the top level var_dump(json_decode("1.")); var_dump(json_decode("1.e1")); // parser by JSON_Parser var_dump(json_decode("[1.]")); var_dump(json_decode("[1.e1]"));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/2D72Q
function name:  (null)
number of ops:  78
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    5     0  E >   INIT_FCALL                                                   'var_dump'
          1        INIT_FCALL                                                   'json_decode'
          2        SEND_VAL                                                     '07'
          3        DO_ICALL                                             $0      
          4        SEND_VAR                                                     $0
          5        DO_ICALL                                                     
    6     6        INIT_FCALL                                                   'var_dump'
          7        INIT_FCALL                                                   'json_decode'
          8        SEND_VAL                                                     '0xff'
          9        DO_ICALL                                             $2      
         10        SEND_VAR                                                     $2
         11        DO_ICALL                                                     
    7    12        INIT_FCALL                                                   'var_dump'
         13        INIT_FCALL                                                   'json_decode'
         14        SEND_VAL                                                     '.1'
         15        DO_ICALL                                             $4      
         16        SEND_VAR                                                     $4
         17        DO_ICALL                                                     
    8    18        INIT_FCALL                                                   'var_dump'
         19        INIT_FCALL                                                   'json_decode'
         20        SEND_VAL                                                     '-.1'
         21        DO_ICALL                                             $6      
         22        SEND_VAR                                                     $6
         23        DO_ICALL                                                     
   10    24        INIT_FCALL                                                   'var_dump'
         25        INIT_FCALL                                                   'json_decode'
         26        SEND_VAL                                                     '%5B07%5D'
         27        DO_ICALL                                             $8      
         28        SEND_VAR                                                     $8
         29        DO_ICALL                                                     
   11    30        INIT_FCALL                                                   'var_dump'
         31        INIT_FCALL                                                   'json_decode'
         32        SEND_VAL                                                     '%5B0xff%5D'
         33        DO_ICALL                                             $10     
         34        SEND_VAR                                                     $10
         35        DO_ICALL                                                     
   12    36        INIT_FCALL                                                   'var_dump'
         37        INIT_FCALL                                                   'json_decode'
         38        SEND_VAL                                                     '%5B.1%5D'
         39        DO_ICALL                                             $12     
         40        SEND_VAR                                                     $12
         41        DO_ICALL                                                     
   13    42        INIT_FCALL                                                   'var_dump'
         43        INIT_FCALL                                                   'json_decode'
         44        SEND_VAL                                                     '%5B-.1%5D'
         45        DO_ICALL                                             $14     
         46        SEND_VAR                                                     $14
         47        DO_ICALL                                                     
   14    48        INIT_FCALL                                                   'var_dump'
         49        INIT_FCALL                                                   'json_last_error_msg'
         50        DO_ICALL                                             $16     
         51        SEND_VAR                                                     $16
         52        DO_ICALL                                                     
   19    53        INIT_FCALL                                                   'var_dump'
         54        INIT_FCALL                                                   'json_decode'
         55        SEND_VAL                                                     '1.'
         56        DO_ICALL                                             $18     
         57        SEND_VAR                                                     $18
         58        DO_ICALL                                                     
   20    59        INIT_FCALL                                                   'var_dump'
         60        INIT_FCALL                                                   'json_decode'
         61        SEND_VAL                                                     '1.e1'
         62        DO_ICALL                                             $20     
         63        SEND_VAR                                                     $20
         64        DO_ICALL                                                     
   22    65        INIT_FCALL                                                   'var_dump'
         66        INIT_FCALL                                                   'json_decode'
         67        SEND_VAL                                                     '%5B1.%5D'
         68        DO_ICALL                                             $22     
         69        SEND_VAR                                                     $22
         70        DO_ICALL                                                     
   23    71        INIT_FCALL                                                   'var_dump'
         72        INIT_FCALL                                                   'json_decode'
         73        SEND_VAL                                                     '%5B1.e1%5D'
         74        DO_ICALL                                             $24     
         75        SEND_VAR                                                     $24
         76        DO_ICALL                                                     
         77      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
161.9 ms | 2727 KiB | 16 Q