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-1)) { echo "last iteration: " . $book->nodeValue; } else { contiune; } } if(empty($book->nodeValue)) { $break = TRUE; contiune; } echo $book->nodeValue, PHP_EOL; }
Output for git.master, git.master_jit, rfc.property-hooks
Patterns of Enterprise Application Architecture Fatal error: Uncaught Error: Undefined constant "contiune" in /in/9ba49:32 Stack trace: #0 {main} thrown in /in/9ba49 on line 32
Process exited with code 255.

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