Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Find the first occurrence of a string
Alias strchr
<?php strstr(string $haystack, string $needle, bool $before_needle = false): string|false
<?php         if (str_contains($content, $tag_before)) {

            $this->setResult(self::renderCallback($this->getPHPlaterObject(self::CLASS_VARIABLE), $content));

        }

        if ($iterations-- && strstr($this->getResult(), $tag_before) && strstr($this->getResult(), $tag_after)) {

            return $this->render($this->getResult(), $iterations);

        }

        return $this->getResult();