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"; } }
Output for git.master, git.master_jit, rfc.property-hooks
<h2>Section1</h2> <h3>Lesson1</h3> <p>Contenu1</p> <h3>Lesson2</h3> <p>Contenu2</p> <h2>Section2</h2> <h3>Lesson3</h3> <p>Contenu3</p> <h3>Lesson4</h3> <p>Contenu4</p>

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
54.93 ms | 401 KiB | 8 Q