3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = "This is a " . str_repeat("test", 2) . "!\n" . str_repeat("hello", 3) . " and Bye!\n" . "When I sleep, the thought bubble says " . str_repeat("zz", 3) . "."; echo preg_replace_callback( '~\b(\w+?)\1+\b~', function($m) { return "[{$m[1]}](" . (strlen($m[0]) / strlen($m[1])) . ")"; }, $string );
Output for git.master, git.master_jit, rfc.property-hooks
This is a [test](2)! [hello](3) and Bye! When I sleep, the thought bubble says [z](6).

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:
26.36 ms | 405 KiB | 5 Q