3v4l.org

run code in 300+ PHP versions simultaneously
<?php $float = 17.31; // Bedrag in centen $integer = intval($float * 100); $integer2 = (integer)($float*100); $remainder = $float*100-$integer; echo $float."\n"; echo $integer."\n"; echo $integer2."\n"; echo $remainder."\n";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/t8R0V
function name:  (null)
number of ops:  19
compiled vars:  !0 = $float, !1 = $integer, !2 = $integer2, !3 = $remainder
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 17.31
    5     1        MUL                                              ~5      !0, 100
          2        CAST                                          4  ~6      ~5
          3        ASSIGN                                                   !1, ~6
    6     4        MUL                                              ~8      !0, 100
          5        CAST                                          4  ~9      ~8
          6        ASSIGN                                                   !2, ~9
    8     7        MUL                                              ~11     !0, 100
          8        SUB                                              ~12     ~11, !1
          9        ASSIGN                                                   !3, ~12
   10    10        CONCAT                                           ~14     !0, '%0A'
         11        ECHO                                                     ~14
   11    12        CONCAT                                           ~15     !1, '%0A'
         13        ECHO                                                     ~15
   12    14        CONCAT                                           ~16     !2, '%0A'
         15        ECHO                                                     ~16
   13    16        CONCAT                                           ~17     !3, '%0A'
         17        ECHO                                                     ~17
         18      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
200.95 ms | 1393 KiB | 13 Q