3v4l.org

run code in 300+ PHP versions simultaneously
<?php $coords = array( 'DFW' => array('lat'=>52.989, 'long'=>16.910), 'LAX' => array('lat'=>53.149, 'long'=>16.739), ); //Chodzież -Piła // Change 3959 to 6371 to get the distance in kilometers $distance = (6371 * acos( cos(deg2rad($coords['DFW']['lat'])) * cos(deg2rad($coords['LAX']['lat'])) * cos(deg2rad($coords['LAX']['long']) - deg2rad($coords['DFW']['long'])) + sin(deg2rad($coords['DFW']['lat'])) * sin(deg2rad($coords['LAX']['lat'])) ) ); var_dump($distance); ?> if($a < 3):echo 'mniejsze'; else:echo 'nie mniejsze'; endif; ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ZRAb4
function name:  (null)
number of ops:  61
compiled vars:  !0 = $coords, !1 = $distance
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    9     1        INIT_FCALL                                               'acos'
   10     2        INIT_FCALL                                               'cos'
          3        INIT_FCALL                                               'deg2rad'
          4        FETCH_DIM_R                                      ~3      !0, 'DFW'
          5        FETCH_DIM_R                                      ~4      ~3, 'lat'
          6        SEND_VAL                                                 ~4
          7        DO_ICALL                                         $5      
          8        SEND_VAR                                                 $5
          9        DO_ICALL                                         $6      
   11    10        INIT_FCALL                                               'cos'
         11        INIT_FCALL                                               'deg2rad'
         12        FETCH_DIM_R                                      ~7      !0, 'LAX'
         13        FETCH_DIM_R                                      ~8      ~7, 'lat'
         14        SEND_VAL                                                 ~8
         15        DO_ICALL                                         $9      
         16        SEND_VAR                                                 $9
         17        DO_ICALL                                         $10     
         18        MUL                                              ~11     $6, $10
   12    19        INIT_FCALL                                               'cos'
         20        INIT_FCALL                                               'deg2rad'
         21        FETCH_DIM_R                                      ~12     !0, 'LAX'
         22        FETCH_DIM_R                                      ~13     ~12, 'long'
         23        SEND_VAL                                                 ~13
         24        DO_ICALL                                         $14     
         25        INIT_FCALL                                               'deg2rad'
         26        FETCH_DIM_R                                      ~15     !0, 'DFW'
         27        FETCH_DIM_R                                      ~16     ~15, 'long'
         28        SEND_VAL                                                 ~16
         29        DO_ICALL                                         $17     
         30        SUB                                              ~18     $14, $17
         31        SEND_VAL                                                 ~18
         32        DO_ICALL                                         $19     
         33        MUL                                              ~20     $19, ~11
   13    34        INIT_FCALL                                               'sin'
         35        INIT_FCALL                                               'deg2rad'
         36        FETCH_DIM_R                                      ~21     !0, 'DFW'
         37        FETCH_DIM_R                                      ~22     ~21, 'lat'
         38        SEND_VAL                                                 ~22
         39        DO_ICALL                                         $23     
         40        SEND_VAR                                                 $23
         41        DO_ICALL                                         $24     
   14    42        INIT_FCALL                                               'sin'
         43        INIT_FCALL                                               'deg2rad'
         44        FETCH_DIM_R                                      ~25     !0, 'LAX'
         45        FETCH_DIM_R                                      ~26     ~25, 'lat'
         46        SEND_VAL                                                 ~26
         47        DO_ICALL                                         $27     
         48        SEND_VAR                                                 $27
         49        DO_ICALL                                         $28     
         50        MUL                                              ~29     $24, $28
         51        ADD                                              ~30     ~20, ~29
         52        SEND_VAL                                                 ~30
         53        DO_ICALL                                         $31     
         54        MUL                                              ~32     $31, 6371
    9    55        ASSIGN                                                   !1, ~32
   18    56        INIT_FCALL                                               'var_dump'
         57        SEND_VAR                                                 !1
         58        DO_ICALL                                                 
   20    59        ECHO                                                     'if%28%24a+%3C+3%29%3Aecho+%27mniejsze%27%3B%0Aelse%3Aecho+%27nie+mniejsze%27%3B%0Aendif%3B%0A%3F%3E'
   23    60      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.6 ms | 1400 KiB | 23 Q