If I had:
$string = \"PascalCase\";
I need
\"pascal_case\"
Does PHP offer a function for this purpose?>
There is a library providing this functionality:
SnakeCaseFormatter::run('CamelCase'); // Output: "camel_case"