I need to add after 1 line after match . Whenever there is a match this line should be added. In our case after '{'
:
file_put_contents('/var/www/html/ked.log', "\n match", FILE_APPEND);
=================== Example :
After
protected function wrapEJsonPath($value, $delimiter = '->')
{
I want
protected function wrapEJsonPath($value, $delimiter = '->')
{
file_put_contents('/var/www/html/ked.log', "\n protected function wrapEJsonPath", FILE_APPEND);
How can I extract function name and add it into the next line that will be added.