3v4l.org

run code in 300+ PHP versions simultaneously
<?php libxml_use_internal_errors(true); // to disable warnings if HTML is not well formed $o = new DOMDocument(); $o->loadHTML('<a href="../plugins/re_records/somefile.php?page=something&id=45">important_name</a>'); foreach($o->getElementsByTagName('a') as $anchor_tag){ $href = $anchor_tag->getAttribute('href'); if(strpos($href,'/plugins/re_records/somefile.php?page=something&id=') !== false){ $anchor_tag->setAttribute('href','/map/'.$anchor_tag->nodeValue); } } echo $o->saveHTML();
Output for git.master, git.master_jit, rfc.property-hooks
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd"> <html><body><a href="/map/important_name">important_name</a></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:
143.09 ms | 405 KiB | 5 Q