3v4l.org

run code in 300+ PHP versions simultaneously
<?php var_dump(50*2.55); var_dump(\round(50 * 2.55,0, PHP_ROUND_HALF_UP)); var_dump(\round(50 * 2.55,0, PHP_ROUND_HALF_DOWN)); var_dump(\round(50 * 2.55,0, PHP_ROUND_HALF_EVEN)); var_dump(\round(50 * 2.55,0, PHP_ROUND_HALF_ODD));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Od2ZP
function name:  (null)
number of ops:  36
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'var_dump'
          1        SEND_VAL                                                 127.5
          2        DO_ICALL                                                 
    4     3        INIT_FCALL                                               'var_dump'
          4        INIT_FCALL                                               'round'
          5        SEND_VAL                                                 127.5
          6        SEND_VAL                                                 0
          7        SEND_VAL                                                 1
          8        DO_ICALL                                         $1      
          9        SEND_VAR                                                 $1
         10        DO_ICALL                                                 
    5    11        INIT_FCALL                                               'var_dump'
         12        INIT_FCALL                                               'round'
         13        SEND_VAL                                                 127.5
         14        SEND_VAL                                                 0
         15        SEND_VAL                                                 2
         16        DO_ICALL                                         $3      
         17        SEND_VAR                                                 $3
         18        DO_ICALL                                                 
    6    19        INIT_FCALL                                               'var_dump'
         20        INIT_FCALL                                               'round'
         21        SEND_VAL                                                 127.5
         22        SEND_VAL                                                 0
         23        SEND_VAL                                                 3
         24        DO_ICALL                                         $5      
         25        SEND_VAR                                                 $5
         26        DO_ICALL                                                 
    7    27        INIT_FCALL                                               'var_dump'
         28        INIT_FCALL                                               'round'
         29        SEND_VAL                                                 127.5
         30        SEND_VAL                                                 0
         31        SEND_VAL                                                 4
         32        DO_ICALL                                         $7      
         33        SEND_VAR                                                 $7
         34        DO_ICALL                                                 
         35      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
142.46 ms | 1004 KiB | 15 Q