Use Wordpress Header for Discourse

Both WordPress and Discourse output HTML pages, but WordPress is PHP and Discourse is Ruby and Ember.

So no, you can’t drop PHP code into the Admin Customize CP and expect it to work.

HTML, CSS and JavaScript, yes, PHP, no,

That said, you could probably code up an API to get stuff from a PHP file if you needed to.