3v4l.org

run code in 300+ PHP versions simultaneously
<?php function convertFloat($float) { $float = (string)$float; $expPos = strpos($float, 'e-'); var_dump($float); if ($expPos === false) { return $float; } $numberWithoutPrecision = substr($float, 0, $expPos); $exp = substr($float, $expPos, strlen($float)); var_dump($numberWithoutPrecision, $exp); } convertFloat(1.004e-300);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/V8NI7
function name:  (null)
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   INIT_FCALL                                               'convertfloat'
          1        SEND_VAL                                                 1.004e-300
          2        DO_FCALL                                      0          
          3      > RETURN                                                   1

Function convertfloat:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 13, Position 2 = 14
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/V8NI7
function name:  convertFloat
number of ops:  32
compiled vars:  !0 = $float, !1 = $expPos, !2 = $numberWithoutPrecision, !3 = $exp
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   RECV                                             !0      
    4     1        CAST                                          6  ~4      !0
          2        ASSIGN                                                   !0, ~4
    5     3        INIT_FCALL                                               'strpos'
          4        SEND_VAR                                                 !0
          5        SEND_VAL                                                 'e-'
          6        DO_ICALL                                         $6      
          7        ASSIGN                                                   !1, $6
    6     8        INIT_FCALL                                               'var_dump'
          9        SEND_VAR                                                 !0
         10        DO_ICALL                                                 
    7    11        TYPE_CHECK                                    4          !1
         12      > JMPZ                                                     ~9, ->14
    8    13    > > RETURN                                                   !0
   11    14    >   INIT_FCALL                                               'substr'
         15        SEND_VAR                                                 !0
         16        SEND_VAL                                                 0
         17        SEND_VAR                                                 !1
         18        DO_ICALL                                         $10     
         19        ASSIGN                                                   !2, $10
   12    20        INIT_FCALL                                               'substr'
         21        SEND_VAR                                                 !0
         22        SEND_VAR                                                 !1
         23        STRLEN                                           ~12     !0
         24        SEND_VAL                                                 ~12
         25        DO_ICALL                                         $13     
         26        ASSIGN                                                   !3, $13
   14    27        INIT_FCALL                                               'var_dump'
         28        SEND_VAR                                                 !2
         29        SEND_VAR                                                 !3
         30        DO_ICALL                                                 
   15    31      > RETURN                                                   null

End of function convertfloat

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.55 ms | 1399 KiB | 20 Q