3v4l.org

run code in 500+ PHP versions simultaneously
<?php $html = <<<HTML <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>header</title> </head> <body> <input id='printed_name' type='text' class='forma_input' required='' style='position: relative;top: -8px;'> </body> </html> HTML; $doc = new DOMDocument(); $doc->loadHtml($html); $el = $doc->getElementById('printed_name'); $el->setAttribute( "value", "1234" ); var_dump($doc->saveHTML());
Output for git.master, git.master_jit, rfc.property-hooks
string(222) "<!DOCTYPE html> <html><head><meta charset="utf-8"><title>header</title></head><body> <input id="printed_name" type="text" class="forma_input" required="" style="position: relative;top: -8px;" value="1234"></body></html> "

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:
48.61 ms | 1403 KiB | 4 Q