3v4l.org

run code in 300+ PHP versions simultaneously
<?php // price matrix: first index is y-axis, second is x-axis $prices = [ 600 => [ 600 => 224, 700 => 246, 800 => 266, 900 => 291, 1000 => 313 ], // here you put the rest... ]; //then echo the table; echo "<table><tr>"; echo "<td></td>"; // first empty cell; foreach ($prices[array_keys($prices)[0]] as $y_axis => $xprices){ echo "<td>".$y_axis."</td>"; } echo "</tr>";//finish setting up the header foreach ($prices as $y_axis => $xprices) { echo "<tr>"; echo "<td>".$y_axis."</td>"; foreach($xprices as $y_axis=> $price){ echo "<td>".$price."</td>"; } echo "</tr>"; } echo "</table>";
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 9, Position 2 = 15
Branch analysis from position: 9
2 jumps found. (Code = 78) Position 1 = 10, Position 2 = 15
Branch analysis from position: 10
1 jumps found. (Code = 42) Position 1 = 9
Branch analysis from position: 9
Branch analysis from position: 15
2 jumps found. (Code = 77) Position 1 = 18, Position 2 = 34
Branch analysis from position: 18
2 jumps found. (Code = 78) Position 1 = 19, Position 2 = 34
Branch analysis from position: 19
2 jumps found. (Code = 77) Position 1 = 25, Position 2 = 31
Branch analysis from position: 25
2 jumps found. (Code = 78) Position 1 = 26, Position 2 = 31
Branch analysis from position: 26
1 jumps found. (Code = 42) Position 1 = 25
Branch analysis from position: 25
Branch analysis from position: 31
1 jumps found. (Code = 42) Position 1 = 18
Branch analysis from position: 18
Branch analysis from position: 31
Branch analysis from position: 34
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 34
Branch analysis from position: 15
filename:       /in/BY45N
function name:  (null)
number of ops:  37
compiled vars:  !0 = $prices, !1 = $xprices, !2 = $y_axis, !3 = $price
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   ASSIGN                                                   !0, <array>
   16     1        ECHO                                                     '%3Ctable%3E%3Ctr%3E'
   17     2        ECHO                                                     '%3Ctd%3E%3C%2Ftd%3E'
   19     3        INIT_FCALL                                               'array_keys'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $5      
          6        FETCH_DIM_R                                      ~6      $5, 0
          7        FETCH_DIM_R                                      ~7      !0, ~6
          8      > FE_RESET_R                                       $8      ~7, ->15
          9    > > FE_FETCH_R                                       ~9      $8, !1, ->15
         10    >   ASSIGN                                                   !2, ~9
   20    11        CONCAT                                           ~11     '%3Ctd%3E', !2
         12        CONCAT                                           ~12     ~11, '%3C%2Ftd%3E'
         13        ECHO                                                     ~12
   19    14      > JMP                                                      ->9
         15    >   FE_FREE                                                  $8
   22    16        ECHO                                                     '%3C%2Ftr%3E'
   23    17      > FE_RESET_R                                       $13     !0, ->34
         18    > > FE_FETCH_R                                       ~14     $13, !1, ->34
         19    >   ASSIGN                                                   !2, ~14
   24    20        ECHO                                                     '%3Ctr%3E'
   25    21        CONCAT                                           ~16     '%3Ctd%3E', !2
         22        CONCAT                                           ~17     ~16, '%3C%2Ftd%3E'
         23        ECHO                                                     ~17
   26    24      > FE_RESET_R                                       $18     !1, ->31
         25    > > FE_FETCH_R                                       ~19     $18, !3, ->31
         26    >   ASSIGN                                                   !2, ~19
   27    27        CONCAT                                           ~21     '%3Ctd%3E', !3
         28        CONCAT                                           ~22     ~21, '%3C%2Ftd%3E'
         29        ECHO                                                     ~22
   26    30      > JMP                                                      ->25
         31    >   FE_FREE                                                  $18
   29    32        ECHO                                                     '%3C%2Ftr%3E'
   23    33      > JMP                                                      ->18
         34    >   FE_FREE                                                  $13
   31    35        ECHO                                                     '%3C%2Ftable%3E'
         36      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
128.6 ms | 948 KiB | 16 Q