3v4l.org

run code in 300+ PHP versions simultaneously
<?php $xml = <<< XML <?xml version="1.0" encoding="utf-8"?> <books> <book>Patterns of Enterprise Application Architecture</book> <book></book> <book>Design Patterns: Elements of Reusable Software Design</book> <book>Clean Code</book> </books> XML; $dom = new DOMDocument; $dom->loadXML($xml); $books = $dom->getElementsByTagName('book'); $length = $books->length; $break = FALSE; foreach ($books as $k => $book) { if($break){ if($k == ($length)) { echo "last iteration: " . $book->nodeValue; } else { continue; } } if(empty($book)) { var_dump($book); $break = TRUE; continue; } echo $book->nodeValue, PHP_EOL; }
Output for git.master, git.master_jit, rfc.property-hooks
Patterns of Enterprise Application Architecture Design Patterns: Elements of Reusable Software Design Clean Code

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:
125.12 ms | 401 KiB | 8 Q