3v4l.org

run code in 300+ PHP versions simultaneously
<?php // $result = $conn->query("SELECT content, sub_content FROM objectives"); $result = [ ["content" => "Demonstrate where to find the following documentation:", "sub_content" => "Operating and Safety Strategy"], ["content" => "Explain the different turbine main operating states:", "sub_content" => "0"], ["content" => "Explain the different turbine main operating states:", "sub_content" => "Power Production"], ["content" => "Explain the different turbine main operating states:", "sub_content" => "Idle"], ["content" => "Explain the different turbine main operating states:", "sub_content" => "Stop"], ["content" => "Explain how to recognise the current operating mode on the display of the operating panel", "sub_content" => "0"], ["content" => "Explain the subsystem operating modes:", "sub_content" => "Stop"], ["content" => "Explain the subsystem operating modes:", "sub_content" => "Manual"], ["content" => "Explain the subsystem operating modes:", "sub_content" => "0"], ["content" => "Explain the difference between local and remote point of operation", "sub_content" => "0"], ["content" => "Explain that only one point of operation can be active at a time", "sub_content" => "0"] ]; $categories = array(); foreach ($result as $result) { $category = $result['content']; $categories[$category][] = $result['sub_content']; } echo "<ul>\n"; foreach ($categories as $category => $subcategories): echo "\t<li>"; echo $category; echo "\n\t\t<ul>\n"; foreach ($subcategories as $subcategory): if ($subcategory !== '0') { echo "\t\t\t<li>$subcategory</li>\n"; } endforeach; echo "\t\t</ul>\n"; echo "\t</li>\n"; endforeach; echo "</ul>";
Output for git.master, git.master_jit, rfc.property-hooks
<ul> <li>Demonstrate where to find the following documentation: <ul> <li>Operating and Safety Strategy</li> </ul> </li> <li>Explain the different turbine main operating states: <ul> <li>Power Production</li> <li>Idle</li> <li>Stop</li> </ul> </li> <li>Explain how to recognise the current operating mode on the display of the operating panel <ul> </ul> </li> <li>Explain the subsystem operating modes: <ul> <li>Stop</li> <li>Manual</li> </ul> </li> <li>Explain the difference between local and remote point of operation <ul> </ul> </li> <li>Explain that only one point of operation can be active at a time <ul> </ul> </li> </ul>

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:
157.48 ms | 407 KiB | 5 Q