3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.67 ms | 1393 KiB | 13 Q