3v4l.org

run code in 300+ PHP versions simultaneously
<?php foreach(["32.3","11.8","2.5"] as $float){ print ((float)(string)$float * 1000).PHP_EOL; $v = (float)(string)$float * 1000; print var_export($v,true).PHP_EOL; print "{$v}\n"; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 1, Position 2 = 21
Branch analysis from position: 1
2 jumps found. (Code = 78) Position 1 = 2, Position 2 = 21
Branch analysis from position: 2
1 jumps found. (Code = 42) Position 1 = 1
Branch analysis from position: 1
Branch analysis from position: 21
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 21
filename:       /in/CQEd7
function name:  (null)
number of ops:  23
compiled vars:  !0 = $float, !1 = $v
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E > > FE_RESET_R                                       $2      <array>, ->21
          1    > > FE_FETCH_R                                               $2, !0, ->21
    3     2    >   CAST                                          6  ~3      !0
          3        CAST                                          5  ~4      ~3
          4        MUL                                              ~5      ~4, 1000
          5        CONCAT                                           ~6      ~5, '%0A'
          6        ECHO                                                     ~6
    4     7        CAST                                          6  ~7      !0
          8        CAST                                          5  ~8      ~7
          9        MUL                                              ~9      ~8, 1000
         10        ASSIGN                                                   !1, ~9
    5    11        INIT_FCALL                                               'var_export'
         12        SEND_VAR                                                 !1
         13        SEND_VAL                                                 <true>
         14        DO_ICALL                                         $11     
         15        CONCAT                                           ~12     $11, '%0A'
         16        ECHO                                                     ~12
    6    17        NOP                                                      
         18        FAST_CONCAT                                      ~13     !1, '%0A'
         19        ECHO                                                     ~13
    2    20      > JMP                                                      ->1
         21    >   FE_FREE                                                  $2
    7    22      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
136.57 ms | 998 KiB | 14 Q