In discussion at https://habr.com/ru/articles/797343/#comment_26565719 was an idea to implement internal functions as they are through `php -r "echo $function_name();"`, instead of using Bash.