Is there a very very basic example of simply outputting PHP with a plugin to Twig?
Have a look at plugin template variables. You can simply create a method in your plugins variable file that returns anything you want to the template, which would be accessible via {{ craft.myplugin.customVariable }}.

&lt;?php
namespace Craft;

class MypluginVariable
{
    public function customVariable($someProperty = 'defaultValueIfNotDefined')
    {
        return 'Whatever you want!';
    };
}