3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php ob_start(); ?> flarg blarg dlarg <!-- BEGIN DYNAMIC BLOCK: guide_greeting --> filler content <!-- END DYNAMIC BLOCK: guide_greeting --> flarg blarg dlarg <?php $content = ob_get_clean(); function getDyanmicBlockContent($content, $tag) { $boundaries = (object) [ 'start' => sprintf('<!-- BEGIN DYNAMIC BLOCK: %s -->', $tag), 'end' => sprintf('<!-- END DYNAMIC BLOCK: %s -->', $tag), ]; $results = (object) [ 'start' => stripos($str, $boundaries->start), 'end' => stripos($str, $boundaries->end), ]; return $results; } var_dump( getDynamicBlockContent($content, 'guide_greeting') );
Output for 7.0.30, 7.1.5 - 7.3.0beta1
Fatal error: Uncaught Error: Call to undefined function getDynamicBlockContent() in /in/PNfG4:28 Stack trace: #0 {main} thrown in /in/PNfG4 on line 28
Process exited with code 255.
Output for 7.1.0 - 7.1.4
Fatal error: Uncaught Error: Call to undefined function getDynamicBlockContent() in /in/PNfG4:27 Stack trace: #0 {main} thrown in /in/PNfG4 on line 27
Process exited with code 255.
Output for hhvm-3.22.0
Fatal error: Uncaught Error: Call to undefined function getDynamicBlockContent() in /in/PNfG4:-1 Stack trace: #0 {main}
Process exited with code 255.
Output for hhvm-3.18.5 - 3.21.3
Fatal error: Uncaught Error: Call to undefined function getDynamicBlockContent() in /in/PNfG4:28 Stack trace: #0 {main}
Process exited with code 255.
Output for 5.6.30
Fatal error: Call to undefined function getDynamicBlockContent() in /in/PNfG4 on line 28
Process exited with code 255.