3v4l.org

run code in 300+ PHP versions simultaneously
<?php $sections = array ( 1 => array ( 'titre' => array ( 1 => array ( 'titreSection' => 'Section1' ), ), 'contenu' => array ( 1 => array ( 'titreLesson' => 'Lesson1', 'lessonContent' => 'Contenu1' ), 2 => array ( 'titreLesson' => 'Lesson2', 'lessonContent' => 'Contenu2' ) ), ), 2 => array ( 'titre' => array ( 1 => array ( 'titreSection' => 'Section2' ), ), 'contenu' => array ( 3 => array ( 'titreLesson' => 'Lesson3', 'lessonContent' => 'Contenu3' ), 4 => array ( 'titreLesson' => 'Lesson4', 'lessonContent' => 'Contenu4' ) ) ) ); foreach ($sections as $section) { echo "<h2>{$section['titre'][1]['titreSection']}</h2>\n"; foreach ($section['contenu'] as $lesson) { echo "<h3>{$lesson['titreLesson']}</h3>\n"; echo "<p>{$lesson['lessonContent']}</p>\n"; } }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 2, Position 2 = 26
Branch analysis from position: 2
2 jumps found. (Code = 78) Position 1 = 3, Position 2 = 26
Branch analysis from position: 3
2 jumps found. (Code = 77) Position 1 = 12, Position 2 = 24
Branch analysis from position: 12
2 jumps found. (Code = 78) Position 1 = 13, Position 2 = 24
Branch analysis from position: 13
1 jumps found. (Code = 42) Position 1 = 12
Branch analysis from position: 12
Branch analysis from position: 24
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 24
Branch analysis from position: 26
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 26
filename:       /in/JWPMe
function name:  (null)
number of ops:  28
compiled vars:  !0 = $sections, !1 = $section, !2 = $lesson
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   51     1      > FE_RESET_R                                       $4      !0, ->26
          2    > > FE_FETCH_R                                               $4, !1, ->26
   52     3    >   ROPE_INIT                                     3  ~9      '%3Ch2%3E'
          4        FETCH_DIM_R                                      ~5      !1, 'titre'
          5        FETCH_DIM_R                                      ~6      ~5, 1
          6        FETCH_DIM_R                                      ~7      ~6, 'titreSection'
          7        ROPE_ADD                                      1  ~9      ~9, ~7
          8        ROPE_END                                      2  ~8      ~9, '%3C%2Fh2%3E%0A'
          9        ECHO                                                     ~8
   53    10        FETCH_DIM_R                                      ~11     !1, 'contenu'
         11      > FE_RESET_R                                       $12     ~11, ->24
         12    > > FE_FETCH_R                                               $12, !2, ->24
   54    13    >   ROPE_INIT                                     3  ~15     '%3Ch3%3E'
         14        FETCH_DIM_R                                      ~13     !2, 'titreLesson'
         15        ROPE_ADD                                      1  ~15     ~15, ~13
         16        ROPE_END                                      2  ~14     ~15, '%3C%2Fh3%3E%0A'
         17        ECHO                                                     ~14
   55    18        ROPE_INIT                                     3  ~19     '%3Cp%3E'
         19        FETCH_DIM_R                                      ~17     !2, 'lessonContent'
         20        ROPE_ADD                                      1  ~19     ~19, ~17
         21        ROPE_END                                      2  ~18     ~19, '%3C%2Fp%3E%0A'
         22        ECHO                                                     ~18
   53    23      > JMP                                                      ->12
         24    >   FE_FREE                                                  $12
   51    25      > JMP                                                      ->2
         26    >   FE_FREE                                                  $4
   57    27      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
163.59 ms | 1395 KiB | 13 Q