3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.47 ms | 1400 KiB | 17 Q