3v4l.org

run code in 300+ PHP versions simultaneously
<?php $html = false; $source = "<style> test_css { somerule:val; } </style>"; $source = explode('<!-- DEFAULT -->',$source); $return =(count($source)>1)?$source[1]:$source[0]; $ad_loop_regex = "/[\s\S]*\{%[\s]*for[\s]*ad[\s]*in[\s]*ads[\s]*%\}\s/"; $end_loop_regex = '/[\.\s\S]*\{%[\s\S]*endfor[\s\S]*%\}/'; if ($html==true&&preg_match($ad_loop_regex, $return)&&!$master) { $return = preg_replace($ad_loop_regex,'',$return); preg_match($end_loop_regex,$return,$temp_preg_arr); if (count($temp_preg_arr)>0) { $return = $temp_preg_arr[0]; $start_tag = strrpos($return,'{'); $return = substr($return,0,$start_tag); } } echo $return;
Output for git.master, git.master_jit, rfc.property-hooks
<style> test_css { somerule:val; } </style>

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:
47.11 ms | 401 KiB | 8 Q