3v4l.org

run code in 300+ PHP versions simultaneously
<?php echo "'string'"; json_decode("'string'"); var_dump(json_last_error(), json_last_error_msg()); echo "100"; json_decode("100"); // int var_dump(json_last_error(), json_last_error_msg()); echo "1."; json_decode("1."); // float var_dump(json_last_error(), json_last_error_msg()); echo "1.0"; json_decode("1.0"); // float var_dump(json_last_error(), json_last_error_msg()); echo ".5"; json_decode(".5"); // float var_dump(json_last_error(), json_last_error_msg()); echo "true"; json_decode("true"); // bool var_dump(json_last_error(), json_last_error_msg());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/hdPgX
function name:  (null)
number of ops:  73
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ECHO                                                     '%27string%27'
    3     1        INIT_FCALL                                               'json_decode'
          2        SEND_VAL                                                 '%27string%27'
          3        DO_ICALL                                                 
    4     4        INIT_FCALL                                               'var_dump'
          5        INIT_FCALL                                               'json_last_error'
          6        DO_ICALL                                         $1      
          7        SEND_VAR                                                 $1
          8        INIT_FCALL                                               'json_last_error_msg'
          9        DO_ICALL                                         $2      
         10        SEND_VAR                                                 $2
         11        DO_ICALL                                                 
    6    12        ECHO                                                     '100'
    7    13        INIT_FCALL                                               'json_decode'
         14        SEND_VAL                                                 '100'
         15        DO_ICALL                                                 
    8    16        INIT_FCALL                                               'var_dump'
         17        INIT_FCALL                                               'json_last_error'
         18        DO_ICALL                                         $5      
         19        SEND_VAR                                                 $5
         20        INIT_FCALL                                               'json_last_error_msg'
         21        DO_ICALL                                         $6      
         22        SEND_VAR                                                 $6
         23        DO_ICALL                                                 
   10    24        ECHO                                                     '1.'
   11    25        INIT_FCALL                                               'json_decode'
         26        SEND_VAL                                                 '1.'
         27        DO_ICALL                                                 
   12    28        INIT_FCALL                                               'var_dump'
         29        INIT_FCALL                                               'json_last_error'
         30        DO_ICALL                                         $9      
         31        SEND_VAR                                                 $9
         32        INIT_FCALL                                               'json_last_error_msg'
         33        DO_ICALL                                         $10     
         34        SEND_VAR                                                 $10
         35        DO_ICALL                                                 
   14    36        ECHO                                                     '1.0'
   15    37        INIT_FCALL                                               'json_decode'
         38        SEND_VAL                                                 '1.0'
         39        DO_ICALL                                                 
   16    40        INIT_FCALL                                               'var_dump'
         41        INIT_FCALL                                               'json_last_error'
         42        DO_ICALL                                         $13     
         43        SEND_VAR                                                 $13
         44        INIT_FCALL                                               'json_last_error_msg'
         45        DO_ICALL                                         $14     
         46        SEND_VAR                                                 $14
         47        DO_ICALL                                                 
   18    48        ECHO                                                     '.5'
   19    49        INIT_FCALL                                               'json_decode'
         50        SEND_VAL                                                 '.5'
         51        DO_ICALL                                                 
   20    52        INIT_FCALL                                               'var_dump'
         53        INIT_FCALL                                               'json_last_error'
         54        DO_ICALL                                         $17     
         55        SEND_VAR                                                 $17
         56        INIT_FCALL                                               'json_last_error_msg'
         57        DO_ICALL                                         $18     
         58        SEND_VAR                                                 $18
         59        DO_ICALL                                                 
   22    60        ECHO                                                     'true'
   23    61        INIT_FCALL                                               'json_decode'
         62        SEND_VAL                                                 'true'
         63        DO_ICALL                                                 
   24    64        INIT_FCALL                                               'var_dump'
         65        INIT_FCALL                                               'json_last_error'
         66        DO_ICALL                                         $21     
         67        SEND_VAR                                                 $21
         68        INIT_FCALL                                               'json_last_error_msg'
         69        DO_ICALL                                         $22     
         70        SEND_VAR                                                 $22
         71        DO_ICALL                                                 
         72      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
139.77 ms | 1445 KiB | 17 Q