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/SjFqL
function name:  (null)
number of ops:  60
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                                                 -9223372036854775808
         17        DO_ICALL                                         $7      
         18        ADD                                              ~8      $7, 1
         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        BW_NOT                                           ~12     !0
         28        SEND_VAL                                                 ~12
         29        DO_ICALL                                                 
   11    30        INIT_FCALL                                               'abs'
         31        SEND_VAL                                                 -9223372036854775808
         32        DO_ICALL                                         $14     
         33        ADD                                              ~15     $14, 2
         34        ADD                                              ~16     ~15, 9223372036854775807
         35        ASSIGN                                                   !0, ~16
   12    36        INIT_FCALL                                               'printf'
         37        SEND_VAL                                                 '%25f%0A'
         38        SEND_VAR                                                 !0
         39        DO_ICALL                                                 
   13    40        INIT_FCALL                                               'printf'
         41        SEND_VAL                                                 '%25d%0A'
         42        BW_NOT                                           ~19     !0
         43        SEND_VAL                                                 ~19
         44        DO_ICALL                                                 
   16    45        INIT_FCALL                                               'abs'
         46        SEND_VAL                                                 -1
         47        DO_ICALL                                         $21     
         48        ADD                                              ~22     $21, 9223372036854775807
         49        ASSIGN                                                   !0, ~22
   17    50        INIT_FCALL                                               'printf'
         51        SEND_VAL                                                 '%25f%0A'
         52        SEND_VAR                                                 !0
         53        DO_ICALL                                                 
   18    54        INIT_FCALL                                               'printf'
         55        SEND_VAL                                                 '%25d%0A'
         56        BW_NOT                                           ~25     !0
         57        SEND_VAL                                                 ~25
         58        DO_ICALL                                                 
         59      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.76 ms | 1400 KiB | 17 Q