- substr: documentation ( source)
- strpos: documentation ( source)
<?php
class Test {
const CMS_IDENTIFIER = '#ELEMENT:';
}
$identifier = '#ELEMENT:register';
echo strpos(ElementInterface::CMS_IDENTIFIER, $identifier);
if (0 === strpos(ElementInterface::CMS_IDENTIFIER, $identifier)) {
echo substr($identifier, strlen(Test::CMS_IDENTIFIER));
}