3v4l.org

run code in 300+ PHP versions simultaneously
<?php function wp_kses_split( $string, $allowed_html, $allowed_protocols ) { global $pass_allowed_html, $pass_allowed_protocols; $pass_allowed_html = $allowed_html; $pass_allowed_protocols = $allowed_protocols; return preg_replace_callback( '%((<!--.*?(-->|$))|(<[^>]*(>|$)|>))%', '_wp_kses_split_callback', $string ); } function _wp_kses_split_callback( $match ) { global $pass_allowed_html, $pass_allowed_protocols; return wp_kses_split2( $match[1], $pass_allowed_html, $pass_allowed_protocols ); } function wp_kses_split2($string, $allowed_html, $allowed_protocols) { wp_kses_split('', array(), array()); // this overrides the globals. print_r( array( $allowed_html, $allowed_protocols ) ); } wp_kses_split("<a style='color: red;'>I link this</a>", array('a'=>array( 'style' => array() )), array('http') );
Output for git.master, git.master_jit, rfc.property-hooks
Array ( [0] => Array ( [a] => Array ( [style] => Array ( ) ) ) [1] => Array ( [0] => http ) ) Array ( [0] => Array ( ) [1] => Array ( ) )

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