php helper for including a partial

When I prototype in PHP, I use this small helper function to include a partial and to import some variables.

Example:

 

wordpress php helper

Helper for including theme assets, stylesheets or javascript files: