3v4l.org

run code in 300+ PHP versions simultaneously
<?php print_num('.11e2'); var_dump('11e0' == '.11e2'); var_dump('11e0' == '.011e3'); var_dump('1.1e1' == '.11e2'); echo ".11e2 = ", 0 + '.11e2', "\n"; echo "1.1e1 = ", 0 + '1.1e1', "\n"; function print_num() { $args = func_get_args(); foreach ($args as $str) { $num = 0 + $str; $num2 = $str + 0; if ($num <> $num2) {echo "MASSIVE ERROR!! Ignoring..."; } echo "$str = $num\n"; } }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ruvb6
function name:  (null)
number of ops:  19
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL_BY_NAME                                       'print_num'
          1        SEND_VAL_EX                                              '.11e2'
          2        DO_FCALL                                      0          
    4     3        INIT_FCALL                                               'var_dump'
          4        SEND_VAL                                                 <true>
          5        DO_ICALL                                                 
    5     6        INIT_FCALL                                               'var_dump'
          7        SEND_VAL                                                 <true>
          8        DO_ICALL                                                 
    6     9        INIT_FCALL                                               'var_dump'
         10        SEND_VAL                                                 <true>
         11        DO_ICALL                                                 
    7    12        ECHO                                                     '.11e2+%3D+'
         13        ECHO                                                     11
         14        ECHO                                                     '%0A'
    8    15        ECHO                                                     '1.1e1+%3D+'
         16        ECHO                                                     11
         17        ECHO                                                     '%0A'
   20    18      > RETURN                                                   1

Function print_num:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 3, Position 2 = 17
Branch analysis from position: 3
2 jumps found. (Code = 78) Position 1 = 4, Position 2 = 17
Branch analysis from position: 4
2 jumps found. (Code = 43) Position 1 = 10, Position 2 = 11
Branch analysis from position: 10
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 11
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 17
filename:       /in/ruvb6
function name:  print_num
number of ops:  19
compiled vars:  !0 = $args, !1 = $str, !2 = $num, !3 = $num2
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   FUNC_GET_ARGS                                    ~4      
          1        ASSIGN                                                   !0, ~4
   13     2      > FE_RESET_R                                       $6      !0, ->17
          3    > > FE_FETCH_R                                               $6, !1, ->17
   15     4    >   ADD                                              ~7      0, !1
          5        ASSIGN                                                   !2, ~7
   16     6        ADD                                              ~9      !1, 0
          7        ASSIGN                                                   !3, ~9
   17     8        IS_NOT_EQUAL                                             !2, !3
          9      > JMPZ                                                     ~11, ->11
         10    >   ECHO                                                     'MASSIVE+ERROR%21%21+Ignoring...'
   18    11    >   ROPE_INIT                                     4  ~13     !1
         12        ROPE_ADD                                      1  ~13     ~13, '+%3D+'
         13        ROPE_ADD                                      2  ~13     ~13, !2
         14        ROPE_END                                      3  ~12     ~13, '%0A'
         15        ECHO                                                     ~12
   13    16      > JMP                                                      ->3
         17    >   FE_FREE                                                  $6
   20    18      > RETURN                                                   null

End of function print_num

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.52 ms | 1392 KiB | 15 Q