3v4l.org

run code in 300+ PHP versions simultaneously
<?php $permalink = 'permalink'; $text_link = 'text_link'; $links = array( '<li><a>total</a></li>', '<li><a href="permalink">permalink</a></li>', '<li><a href="permalink">permalink</a></li>', ); $total = count($links); for($permalink=1; $permalink<=$total ;$permalink++){ $new_links[] = preg_replace('|<a>'.$total.'</a>|', '<a>'.$text_link.'</a>', $links[$permalink]); } print_r($new_links);
Output for git.master, git.master_jit, rfc.property-hooks
Warning: Undefined array key 3 in /in/j19H9 on line 13 Deprecated: preg_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /in/j19H9 on line 13 Array ( [0] => <li><a href="permalink">permalink</a></li> [1] => <li><a href="permalink">permalink</a></li> [2] => )

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:
45.13 ms | 402 KiB | 8 Q