You could not execute php in a bbcode as far as I know. But yiu could execute javascript and you should use javascript for any task like this. By the way... Not anything that sounds not logical for anybody isn't logical for someone!
I didn't mean to imply the customer doesn't need it, only that it's not going to be easy to code if it genuinely is necessary to whatever ends are trying to be served. When you start getting into trying to reverse engineer code to make it work you're asking for problems. Security would be the primary one. If you can backdoor into the core code then so can someone else.