3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = [['a'],['b']]; echo "<!DOCTYPE html> <html> <head> <style> table { width: 100%; max-width: 100%; margin-bottom: 20px; } th, td { white-space: nowrap } thead { text-align: left } </style> </head> <body> <table> <thead> <tr> <?php foreach (array_keys(reset($array)) as $heading): ?> <th><?php echo ucwords(strtr($heading, ['_' => ' '])); ?></th> <?php endforeach; ?> </tr> </thead> <tbody> <?php foreach ($array as $sub_array): ?> <tr> <?php foreach ($sub_array as $value): ?> <td><?php echo $value; ?></td> <?php endforeach; ?> </tr> <?php endforeach; ?> </tbody> </table> </body> </html>";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/n8Mhg
function name:  (null)
number of ops:  20
compiled vars:  !0 = $array, !1 = $heading, !2 = $sub_array, !3 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    5     1        ROPE_INIT                                    17  ~6      '%3C%21DOCTYPE+html%3E%0A%3Chtml%3E%0A%3Chead%3E%0A%3Cstyle%3E%0Atable+%7B%0A%09width%3A+100%25%3B%0A%09max-width%3A+100%25%3B%0A%09margin-bottom%3A+20px%3B%0A%7D%0Ath%2C+td+%7B%0A%09white-space%3A+nowrap%0A%7D%0Athead+%7B%0A%09text-align%3A+left%0A%7D%0A%3C%2Fstyle%3E%0A%3C%2Fhead%3E%0A%3Cbody%3E%0A%3Ctable%3E%0A%09%3Cthead%3E%0A%09%09%3Ctr%3E%0A%09%09%3C%3Fphp+foreach+%28array_keys%28reset%28'
   26     2        ROPE_ADD                                      1  ~6      ~6, !0
          3        ROPE_ADD                                      2  ~6      ~6, '%29%29+as+'
          4        ROPE_ADD                                      3  ~6      ~6, !1
          5        ROPE_ADD                                      4  ~6      ~6, '%29%3A+%3F%3E%0A%09%09%09%3Cth%3E%3C%3Fphp+echo+ucwords%28strtr%28'
   27     6        ROPE_ADD                                      5  ~6      ~6, !1
          7        ROPE_ADD                                      6  ~6      ~6, '%2C+%5B%27_%27+%3D%3E+%27+%27%5D%29%29%3B+%3F%3E%3C%2Fth%3E%0A%09%09%3C%3Fphp+endforeach%3B+%3F%3E%0A%09%09%3C%2Ftr%3E%0A%09%3C%2Fthead%3E%0A%0A%09%3Ctbody%3E%0A%09%3C%3Fphp+foreach+%28'
   33     8        ROPE_ADD                                      7  ~6      ~6, !0
          9        ROPE_ADD                                      8  ~6      ~6, '+as+'
         10        ROPE_ADD                                      9  ~6      ~6, !2
         11        ROPE_ADD                                     10  ~6      ~6, '%29%3A+%3F%3E%0A%09%09%3Ctr%3E%0A%09%09%09%3C%3Fphp+foreach+%28'
   35    12        ROPE_ADD                                     11  ~6      ~6, !2
         13        ROPE_ADD                                     12  ~6      ~6, '+as+'
         14        ROPE_ADD                                     13  ~6      ~6, !3
         15        ROPE_ADD                                     14  ~6      ~6, '%29%3A+%3F%3E%0A%09%09%09%09%3Ctd%3E%3C%3Fphp+echo+'
   36    16        ROPE_ADD                                     15  ~6      ~6, !3
         17        ROPE_END                                     16  ~5      ~6, '%3B+%3F%3E%3C%2Ftd%3E%0A%09%09%09%3C%3Fphp+endforeach%3B+%3F%3E%0A%09%09%3C%2Ftr%3E%0A%09%3C%3Fphp+endforeach%3B+%3F%3E%0A%09%3C%2Ftbody%3E%0A%3C%2Ftable%3E%0A%0A%3C%2Fbody%3E%0A%3C%2Fhtml%3E'
         18        ECHO                                                     ~5
   44    19      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.11 ms | 1394 KiB | 13 Q