3v4l.org

run code in 300+ PHP versions simultaneously
<?php function get_video_block($id) { return "***replacement text for $id***"; } function display_video($text) { return preg_replace_callback( '/\[VIDEO ID=(\d+)]/', function($m) { return get_video_block($m[1]); }, $text ); } echo display_video("Here is a video [VIDEO ID=33] to watch");
Output for git.master_jit, git.master, rfc.property-hooks
Here is a video ***replacement text for 33*** to watch

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