3v4l.org

run code in 300+ PHP versions simultaneously
<?php $number = 1.31; $int = floor($number); $float = $number-$int; if ($float*10 < 3.1) $result = $int; else $result = ceil($number); echo $number." becomes ".$result."\n"; $number = 1.3; $int = floor($number); $float = $number-$int; if ($float*10 < 3.1) $result = $int; else $result = ceil($number); echo $number." becomes ".$result;
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 10, Position 2 = 12
Branch analysis from position: 10
1 jumps found. (Code = 42) Position 1 = 16
Branch analysis from position: 16
2 jumps found. (Code = 43) Position 1 = 30, Position 2 = 32
Branch analysis from position: 30
1 jumps found. (Code = 42) Position 1 = 36
Branch analysis from position: 36
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 32
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 12
2 jumps found. (Code = 43) Position 1 = 30, Position 2 = 32
Branch analysis from position: 30
Branch analysis from position: 32
filename:       /in/WEXcD
function name:  (null)
number of ops:  40
compiled vars:  !0 = $number, !1 = $int, !2 = $float, !3 = $result
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 1.31
    5     1        INIT_FCALL                                               'floor'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $5      
          4        ASSIGN                                                   !1, $5
    6     5        SUB                                              ~7      !0, !1
          6        ASSIGN                                                   !2, ~7
    7     7        MUL                                              ~9      !2, 10
          8        IS_SMALLER                                               ~9, 3.1
          9      > JMPZ                                                     ~10, ->12
    8    10    >   ASSIGN                                                   !3, !1
         11      > JMP                                                      ->16
   10    12    >   INIT_FCALL                                               'ceil'
         13        SEND_VAR                                                 !0
         14        DO_ICALL                                         $12     
         15        ASSIGN                                                   !3, $12
   12    16    >   CONCAT                                           ~14     !0, '+becomes+'
         17        CONCAT                                           ~15     ~14, !3
         18        CONCAT                                           ~16     ~15, '%0A'
         19        ECHO                                                     ~16
   15    20        ASSIGN                                                   !0, 1.3
   17    21        INIT_FCALL                                               'floor'
         22        SEND_VAR                                                 !0
         23        DO_ICALL                                         $18     
         24        ASSIGN                                                   !1, $18
   18    25        SUB                                              ~20     !0, !1
         26        ASSIGN                                                   !2, ~20
   19    27        MUL                                              ~22     !2, 10
         28        IS_SMALLER                                               ~22, 3.1
         29      > JMPZ                                                     ~23, ->32
   20    30    >   ASSIGN                                                   !3, !1
         31      > JMP                                                      ->36
   22    32    >   INIT_FCALL                                               'ceil'
         33        SEND_VAR                                                 !0
         34        DO_ICALL                                         $25     
         35        ASSIGN                                                   !3, $25
   24    36    >   CONCAT                                           ~27     !0, '+becomes+'
         37        CONCAT                                           ~28     ~27, !3
         38        ECHO                                                     ~28
         39      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
133.35 ms | 1405 KiB | 17 Q