3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.59 ms | 1400 KiB | 17 Q