3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.78 ms | 1400 KiB | 17 Q