<?php function ccbreaker(string $input): string { return preg_replace_callback( '/[A-Z]/', fn (array $match): string => ' '. chr(ord($match[0]) + 32), $input ); } echo ccbreaker("policeSiren"). PHP_EOL; echo ccbreaker("camelCasingTest") . PHP_EOL;
You have javascript disabled. You will not be able to edit any code.