$string = 'exampleCamelCase'; $result = \TYPO3\CMS\Core\Utility\GeneralUtility::camelCaseToLowerCaseUnderscored($string); echo $result; // Output: example_camel_case
$className = '\My\Namespace\SomeClass'; $tableName = \TYPO3\CMS\Core\Utility\GeneralUtility::camelCaseToLowerCaseUnderscored($className); echo $tableName; // Output: my_namespace_some_classThis example demonstrates the use of the function in determining the name of a database table based on the name of a PHP class. Here, we have a class named SomeClass in the My\Namespace namespace, which we pass to camelCaseToLowerCaseUnderscored and get 'my_namespace_some_class' as the resulting table name. The camelCaseToLowerCaseUnderscored function is part of the TYPO3 CMS core library.