3v4l.org

run code in 300+ PHP versions simultaneously
<?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))); }

preferences:
36.61 ms | 402 KiB | 5 Q