3v4l.org

run code in 300+ PHP versions simultaneously
<?php $number = 0.49999999999999994; var_dump($number, round($number, 0, PHP_ROUND_HALF_UP)); $number = 1.4999999999999998; var_dump($number, round($number, 0, PHP_ROUND_HALF_UP)); $number = 4503599627370495.5; var_dump($number, round($number, 0, PHP_ROUND_HALF_UP));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/jsMKb
function name:  (null)
number of ops:  31
compiled vars:  !0 = $number
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 0.5
    3     1        INIT_FCALL                                               'var_dump'
          2        SEND_VAR                                                 !0
          3        INIT_FCALL                                               'round'
          4        SEND_VAR                                                 !0
          5        SEND_VAL                                                 0
          6        SEND_VAL                                                 1
          7        DO_ICALL                                         $2      
          8        SEND_VAR                                                 $2
          9        DO_ICALL                                                 
    5    10        ASSIGN                                                   !0, 1.5
    6    11        INIT_FCALL                                               'var_dump'
         12        SEND_VAR                                                 !0
         13        INIT_FCALL                                               'round'
         14        SEND_VAR                                                 !0
         15        SEND_VAL                                                 0
         16        SEND_VAL                                                 1
         17        DO_ICALL                                         $5      
         18        SEND_VAR                                                 $5
         19        DO_ICALL                                                 
    8    20        ASSIGN                                                   !0, 4.5036e+15
    9    21        INIT_FCALL                                               'var_dump'
         22        SEND_VAR                                                 !0
         23        INIT_FCALL                                               'round'
         24        SEND_VAR                                                 !0
         25        SEND_VAL                                                 0
         26        SEND_VAL                                                 1
         27        DO_ICALL                                         $8      
         28        SEND_VAR                                                 $8
         29        DO_ICALL                                                 
         30      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
136.07 ms | 999 KiB | 15 Q