3v4l.org

run code in 300+ PHP versions simultaneously
<?php var_dump(range([], [])); echo "Range will ignore any byte after the first one\n"; var_dump( range("AA", "BB") ); echo "Range cannot operate on an empty string\n"; var_dump( range("Z", "") ); // Both strings are cast to int, i.e. 0 var_dump( range("", "Z") ); // Both strings are cast to int, i.e. 0 echo "Mixing numeric string and character\n"; var_dump( range("1", "A") ); // The char is cast to an int, i.e. 0 var_dump( range("?", "1") ); // The char is cast to an int, i.e. 0 var_dump( range("3.5", "A") ); // The char is cast to a float, i.e. 0 var_dump( range("?", "3.5") ); // The char is cast to a float, i.e. 0 echo "Fractional step cannot be used on character ranges\n"; var_dump( range("A", "H", 2.6) ); // Because step is fractional it tries to interpret inputs as floats
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/XqeoP
function name:  (null)
number of ops:  69
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'var_dump'
          1        INIT_FCALL                                               'range'
          2        SEND_VAL                                                 <array>
          3        SEND_VAL                                                 <array>
          4        DO_ICALL                                         $0      
          5        SEND_VAR                                                 $0
          6        DO_ICALL                                                 
    4     7        ECHO                                                     'Range+will+ignore+any+byte+after+the+first+one%0A'
    5     8        INIT_FCALL                                               'var_dump'
          9        INIT_FCALL                                               'range'
         10        SEND_VAL                                                 'AA'
         11        SEND_VAL                                                 'BB'
         12        DO_ICALL                                         $2      
         13        SEND_VAR                                                 $2
         14        DO_ICALL                                                 
    7    15        ECHO                                                     'Range+cannot+operate+on+an+empty+string%0A'
    8    16        INIT_FCALL                                               'var_dump'
         17        INIT_FCALL                                               'range'
         18        SEND_VAL                                                 'Z'
         19        SEND_VAL                                                 ''
         20        DO_ICALL                                         $4      
         21        SEND_VAR                                                 $4
         22        DO_ICALL                                                 
    9    23        INIT_FCALL                                               'var_dump'
         24        INIT_FCALL                                               'range'
         25        SEND_VAL                                                 ''
         26        SEND_VAL                                                 'Z'
         27        DO_ICALL                                         $6      
         28        SEND_VAR                                                 $6
         29        DO_ICALL                                                 
   11    30        ECHO                                                     'Mixing+numeric+string+and+character%0A'
   12    31        INIT_FCALL                                               'var_dump'
         32        INIT_FCALL                                               'range'
         33        SEND_VAL                                                 '1'
         34        SEND_VAL                                                 'A'
         35        DO_ICALL                                         $8      
         36        SEND_VAR                                                 $8
         37        DO_ICALL                                                 
   13    38        INIT_FCALL                                               'var_dump'
         39        INIT_FCALL                                               'range'
         40        SEND_VAL                                                 '%3F'
         41        SEND_VAL                                                 '1'
         42        DO_ICALL                                         $10     
         43        SEND_VAR                                                 $10
         44        DO_ICALL                                                 
   14    45        INIT_FCALL                                               'var_dump'
         46        INIT_FCALL                                               'range'
         47        SEND_VAL                                                 '3.5'
         48        SEND_VAL                                                 'A'
         49        DO_ICALL                                         $12     
         50        SEND_VAR                                                 $12
         51        DO_ICALL                                                 
   15    52        INIT_FCALL                                               'var_dump'
         53        INIT_FCALL                                               'range'
         54        SEND_VAL                                                 '%3F'
         55        SEND_VAL                                                 '3.5'
         56        DO_ICALL                                         $14     
         57        SEND_VAR                                                 $14
         58        DO_ICALL                                                 
   17    59        ECHO                                                     'Fractional+step+cannot+be+used+on+character+ranges%0A'
   18    60        INIT_FCALL                                               'var_dump'
         61        INIT_FCALL                                               'range'
         62        SEND_VAL                                                 'A'
         63        SEND_VAL                                                 'H'
         64        SEND_VAL                                                 2.6
         65        DO_ICALL                                         $16     
         66        SEND_VAR                                                 $16
         67        DO_ICALL                                                 
         68      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.2 ms | 1405 KiB | 17 Q