Always wrap PHP code inside script tags
<script language="PHP">echo phpversion()</script>
also remember to make the change explained here: https://bbpress.org/forums/topic/admin-can-paste-php-code-in-post?replies=28#post-71965
Can you please explain what do you mean about production environment?
A public site. The code isn’t tested at all.
Ok Thanks I got it,
also add this plugin to bbPress plugins directory
https://bbpress.org/plugins/