3v4l.org

run code in 300+ PHP versions simultaneously
<?php if ( ! function_exists('metersToMiles')) { function metersToMiles($meters, $round = 3) { return round($meters * 0.000621371, $round); } } $miles = "150297.609"; echo metersToMiles($miles, '1');
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 5, Position 2 = 6
Branch analysis from position: 5
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 6
filename:       /in/9hPMB
function name:  (null)
number of ops:  13
compiled vars:  !0 = $miles
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'function_exists'
          1        SEND_VAL                                                 'metersToMiles'
          2        DO_ICALL                                         $1      
          3        BOOL_NOT                                         ~2      $1
          4      > JMPZ                                                     ~2, ->6
    5     5    >   DECLARE_FUNCTION                                         'meterstomiles'
   11     6    >   ASSIGN                                                   !0, '150297.609'
   12     7        INIT_FCALL_BY_NAME                                       'metersToMiles'
          8        SEND_VAR_EX                                              !0
          9        SEND_VAL_EX                                              '1'
         10        DO_FCALL                                      0  $4      
         11        ECHO                                                     $4
         12      > RETURN                                                   1

Function %00meterstomiles%2Fin%2F9hPMB%3A5%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/9hPMB
function name:  metersToMiles
number of ops:  9
compiled vars:  !0 = $meters, !1 = $round
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
          1        RECV_INIT                                        !1      3
    7     2        INIT_FCALL                                               'round'
          3        MUL                                              ~2      !0, 0.000621371
          4        SEND_VAL                                                 ~2
          5        SEND_VAR                                                 !1
          6        DO_ICALL                                         $3      
          7      > RETURN                                                   $3
    8     8*     > RETURN                                                   null

End of function %00meterstomiles%2Fin%2F9hPMB%3A5%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
182.59 ms | 1395 KiB | 17 Q