3v4l.org

run code in 300+ PHP versions simultaneously
<?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( getDyanmicBlockContent($content, 'guide_greeting') );
Output for git.master_jit, git.master, rfc.property-hooks
Warning: Undefined variable $str in /in/IRgNB on line 20 Deprecated: stripos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /in/IRgNB on line 20 Warning: Undefined variable $str in /in/IRgNB on line 21 Deprecated: stripos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /in/IRgNB on line 21 object(stdClass)#2 (2) { ["start"]=> bool(false) ["end"]=> bool(false) }

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