3v4l.org

run code in 300+ PHP versions simultaneously
<?php function roundTo10($value) { $value = ceil($value * 10) / 10; return $value; } echo roundTo10(20.54); echo roundTo10(99); echo roundTo10(51);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/iIrGB
function name:  (null)
number of ops:  13
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   INIT_FCALL                                               'roundto10'
          1        SEND_VAL                                                 20.54
          2        DO_FCALL                                      0  $0      
          3        ECHO                                                     $0
    9     4        INIT_FCALL                                               'roundto10'
          5        SEND_VAL                                                 99
          6        DO_FCALL                                      0  $1      
          7        ECHO                                                     $1
   10     8        INIT_FCALL                                               'roundto10'
          9        SEND_VAL                                                 51
         10        DO_FCALL                                      0  $2      
         11        ECHO                                                     $2
         12      > RETURN                                                   1

Function roundto10:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/iIrGB
function name:  roundTo10
number of ops:  9
compiled vars:  !0 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    4     1        INIT_FCALL                                               'ceil'
          2        MUL                                              ~1      !0, 10
          3        SEND_VAL                                                 ~1
          4        DO_ICALL                                         $2      
          5        DIV                                              ~3      $2, 10
          6        ASSIGN                                                   !0, ~3
    5     7      > RETURN                                                   !0
    6     8*     > RETURN                                                   null

End of function roundto10

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.43 ms | 1398 KiB | 18 Q