3v4l.org

run code in 300+ PHP versions simultaneously
<?php // 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/Tvnj9
function name:  (null)
number of ops:  20
compiled vars:  !0 = $n, !1 = $x
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   INIT_FCALL                                               'var_dump'
          1        INIT_FCALL                                               'ceil'
          2        SEND_VAL                                                 1
          3        DO_ICALL                                         $2      
          4        SEND_VAR                                                 $2
          5        DO_ICALL                                                 
    8     6        ASSIGN                                                   !0, 9223372036854775797
    9     7        INIT_FCALL                                               'var_dump'
          8        SEND_VAR                                                 !0
          9        DO_ICALL                                                 
   12    10        INIT_FCALL                                               'ceil'
         11        SEND_VAR                                                 !0
         12        DO_ICALL                                         $6      
         13        CAST                                          4  ~7      $6
         14        SUB                                              ~8      ~7, !0
         15        ASSIGN                                                   !1, ~8
   13    16        INIT_FCALL                                               'var_dump'
         17        SEND_VAR                                                 !1
         18        DO_ICALL                                                 
   14    19      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.83 ms | 1394 KiB | 17 Q