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