Add button on block body using php
I'm not sure why you need this and you want a similar module of PHP filter which adds a new text format. 

If you are familiar with custom moduling and hooks, I would give you a straightforward solution.
You could implement this using hook_block_view_alter by defining custom patterns (tokens).

&lt;?php
function mymodule_block_view_alter(&amp;$data, $block) {
    $patterns       = array('[add button]'); # more replacement patterns here
    $replacements   = array('&lt;button type="button"&gt;Button&lt;/button&gt;');
    if(isset($data['content'])){
        $content = $data['content'];
        if(is_string($content)) {
            $data['content'] = str_replace($patterns, $replacements, $content);
        }
        elseif(is_array($content)) {
        }
    }
}




Here is the result.


You may expand the code as you like such as defining more tokens, adding criteria for certain blocks, user roles, etc. You can even create an administration page at admin/config to define token replacements from UI.