3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
167.97 ms | 1400 KiB | 17 Q