3v4l.org

run code in 300+ PHP versions simultaneously
<?php $Distances = array( "Berlin" => array("Berlin" => 0, "Moscow" => 1607.99, "Paris" => 876.96, "Prague" => 280.34, "Rome" => 1181.67), "Moscow" => array("Berlin" => 1607.99, "Moscow" => 0, "Paris" => 2484.92, "Prague" => 1664.04, "Rome" => 2374.26), "Paris" => array("Berlin" => 876.96, "Moscow" => 641.31, "Paris" => 0, "Prague" => 885.38, "Rome" => 1105.76), "Prague" => array("Berlin" => 280.34, "Moscow" => 1664.04, "Paris" => 885.38, "Prague" => 0, "Rome" => 922), "Rome" => array("Berlin" => 1181.67, "Moscow" => 2374.26, "Paris" => 1105.76, "Prague" => 922, "Rome" => 0) ); $_POST = array('start' => 'Paris', 'end' => 'Berlin'); echo $Distances[$_POST['start']][$_POST['end']] ?? 'Unknown'; if (isset($_POST['start'], $_POST['end'], $Distances[$_POST['start']][$_POST['end']])) { echo $Distances[$_POST['start']][$_POST['end']]; } else { echo "Unknown"; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 46) Position 1 = 15, Position 2 = 18
Branch analysis from position: 15
2 jumps found. (Code = 46) Position 1 = 19, Position 2 = 26
Branch analysis from position: 19
2 jumps found. (Code = 43) Position 1 = 27, Position 2 = 35
Branch analysis from position: 27
1 jumps found. (Code = 42) Position 1 = 36
Branch analysis from position: 36
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 35
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 26
Branch analysis from position: 18
filename:       /in/gLuYe
function name:  (null)
number of ops:  37
compiled vars:  !0 = $Distances
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   11     1        FETCH_W                      global              $2      '_POST'
          2        ASSIGN                                                   $2, <array>
   13     3        FETCH_R                      global              ~4      '_POST'
          4        FETCH_DIM_R                                      ~5      ~4, 'start'
          5        FETCH_R                      global              ~7      '_POST'
          6        FETCH_DIM_R                                      ~8      ~7, 'end'
          7        FETCH_DIM_IS                                     ~6      !0, ~5
          8        FETCH_DIM_IS                                     ~9      ~6, ~8
          9        COALESCE                                         ~10     ~9
         10        QM_ASSIGN                                        ~10     'Unknown'
         11        ECHO                                                     ~10
   15    12        FETCH_IS                                         ~11     '_POST'
         13        ISSET_ISEMPTY_DIM_OBJ                         0  ~12     ~11, 'start'
         14      > JMPZ_EX                                          ~12     ~12, ->18
         15    >   FETCH_IS                                         ~13     '_POST'
         16        ISSET_ISEMPTY_DIM_OBJ                         0  ~14     ~13, 'end'
         17        BOOL                                             ~12     ~14
         18    > > JMPZ_EX                                          ~12     ~12, ->26
         19    >   FETCH_R                      global              ~15     '_POST'
         20        FETCH_DIM_R                                      ~16     ~15, 'start'
         21        FETCH_R                      global              ~18     '_POST'
         22        FETCH_DIM_R                                      ~19     ~18, 'end'
         23        FETCH_DIM_IS                                     ~17     !0, ~16
         24        ISSET_ISEMPTY_DIM_OBJ                         0  ~20     ~17, ~19
         25        BOOL                                             ~12     ~20
         26    > > JMPZ                                                     ~12, ->35
   16    27    >   FETCH_R                      global              ~21     '_POST'
         28        FETCH_DIM_R                                      ~22     ~21, 'start'
         29        FETCH_R                      global              ~24     '_POST'
         30        FETCH_DIM_R                                      ~25     ~24, 'end'
         31        FETCH_DIM_R                                      ~23     !0, ~22
         32        FETCH_DIM_R                                      ~26     ~23, ~25
         33        ECHO                                                     ~26
   15    34      > JMP                                                      ->36
   19    35    >   ECHO                                                     'Unknown'
   20    36    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
144.18 ms | 1008 KiB | 13 Q