3v4l.org

run code in 300+ PHP versions simultaneously
<?php echo "Unsigned and Signed:\n"; $offset = abs(~PHP_INT_MAX) + PHP_INT_MAX; printf("%f\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/oMoBN
function name:  (null)
number of ops:  58
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                                                 '%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        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        BW_NOT                                           ~11     !0
         27        SEND_VAL                                                 ~11
         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        BW_NOT                                           ~17     !0
         41        SEND_VAL                                                 ~17
         42        DO_ICALL                                                 
   16    43        INIT_FCALL                                               'abs'
         44        SEND_VAL                                                 -1
         45        DO_ICALL                                         $19     
         46        ADD                                              ~20     $19, 9223372036854775807
         47        ASSIGN                                                   !0, ~20
   17    48        INIT_FCALL                                               'printf'
         49        SEND_VAL                                                 '%25f%0A'
         50        SEND_VAR                                                 !0
         51        DO_ICALL                                                 
   18    52        INIT_FCALL                                               'printf'
         53        SEND_VAL                                                 '%25d%0A'
         54        BW_NOT                                           ~23     !0
         55        SEND_VAL                                                 ~23
         56        DO_ICALL                                                 
         57      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.65 ms | 1400 KiB | 17 Q