3v4l.org

run code in 300+ PHP versions simultaneously
<?php define('PHP_INT_SIZE',4+4*!!(255<<63)); define('PHP_INT_MIN', 255<<(PHP_INT_SIZE*8)-1); define('PHP_INT_MAX',~PHP_INT_MIN); // ceil rounds a number to nearest larger integer // so of course it returns a float var_dump(ceil(1)); // $n is a large integer: $n = PHP_INT_MAX - 10; var_dump($n); // I wonder... $x = ((int) ceil($n)) - $n; var_dump($x); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/vOVrD
function name:  (null)
number of ops:  32
compiled vars:  !0 = $n, !1 = $x
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'define'
          1        SEND_VAL                                                 'PHP_INT_SIZE'
          2        SEND_VAL                                                 8
          3        DO_ICALL                                                 
    3     4        INIT_FCALL                                               'define'
          5        SEND_VAL                                                 'PHP_INT_MIN'
          6        SEND_VAL                                                 -9223372036854775808
          7        DO_ICALL                                                 
    4     8        INIT_FCALL                                               'define'
          9        SEND_VAL                                                 'PHP_INT_MAX'
         10        SEND_VAL                                                 9223372036854775807
         11        DO_ICALL                                                 
    7    12        INIT_FCALL                                               'var_dump'
         13        INIT_FCALL                                               'ceil'
         14        SEND_VAL                                                 1
         15        DO_ICALL                                         $5      
         16        SEND_VAR                                                 $5
         17        DO_ICALL                                                 
   10    18        ASSIGN                                                   !0, 9223372036854775797
   11    19        INIT_FCALL                                               'var_dump'
         20        SEND_VAR                                                 !0
         21        DO_ICALL                                                 
   14    22        INIT_FCALL                                               'ceil'
         23        SEND_VAR                                                 !0
         24        DO_ICALL                                         $9      
         25        CAST                                          4  ~10     $9
         26        SUB                                              ~11     ~10, !0
         27        ASSIGN                                                   !1, ~11
   15    28        INIT_FCALL                                               'var_dump'
         29        SEND_VAR                                                 !1
         30        DO_ICALL                                                 
   16    31      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.12 ms | 1395 KiB | 19 Q