A plugin that adds that ability to insert any PHP code into a sidebar widget.
Samsarin PHP Widgetssection. Here you can select the number of widgets you'd like for your website (default is 1).
Addlink on the Samsarin PHP widget to add it to your sidebar.
Editto set the text for the title and the body.
You may enter PHP code both in the title and the body.