3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php if( ! function_exists('will_bontrager_insert_php') ) { function will_bontrager_insert_php($content) { $will_bontrager_content = $content; preg_match_all('!\[insert_php[^\]]*\](.*?)\[/insert_php[^\]]*\]!is',$will_bontrager_content,$will_bontrager_matches); $will_bontrager_nummatches = count($will_bontrager_matches[0]); for( $will_bontrager_i=0; $will_bontrager_i<$will_bontrager_nummatches; $will_bontrager_i++ ) { ob_start(); eval($will_bontrager_matches[1][$will_bontrager_i]); $will_bontrager_replacement = ob_get_contents(); ob_clean(); ob_end_flush(); $will_bontrager_content = preg_replace('/'.preg_quote($will_bontrager_matches[0][$will_bontrager_i],'/').'/',$will_bontrager_replacement,$will_bontrager_content,1); } return $will_bontrager_content; } # function will_bontrager_insert_php() add_filter( 'the_content', 'will_bontrager_insert_php', 9 ); } # if( ! function_exists('will_bontrager_insert_php') ) ?>
Output for 7.0.0 - 7.2.0
Fatal error: Uncaught Error: Call to undefined function add_filter() in /in/dcNFa:22 Stack trace: #0 {main} thrown in /in/dcNFa on line 22
Process exited with code 255.
Output for 5.3.22 - 5.6.28
Fatal error: Call to undefined function add_filter() in /in/dcNFa on line 22
Process exited with code 255.