3v4l.org

run code in 300+ PHP versions simultaneously
<?php function to_int32($value) { $intval = hexdec($value); // If 64 bit if (PHP_INT_SIZE === 8) { return ($intval - 0x100000000); } // 32 bit return $intval; } echo to_int32('c0f672d4');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/GSOYT
function name:  (null)
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   INIT_FCALL                                               'to_int32'
          1        SEND_VAL                                                 'c0f672d4'
          2        DO_FCALL                                      0  $0      
          3        ECHO                                                     $0
          4      > RETURN                                                   1

Function to_int32:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 6, Position 2 = 8
Branch analysis from position: 6
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/GSOYT
function name:  to_int32
number of ops:  10
compiled vars:  !0 = $value, !1 = $intval
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   RECV                                             !0      
    4     1        INIT_FCALL                                               'hexdec'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $2      
          4        ASSIGN                                                   !1, $2
    7     5      > JMPZ                                                     <true>, ->8
    8     6    >   SUB                                              ~4      !1, 4294967296
          7      > RETURN                                                   ~4
   12     8    > > RETURN                                                   !1
   13     9*     > RETURN                                                   null

End of function to_int32

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.94 ms | 1397 KiB | 16 Q