In the end, it comes down to the protocol you want to use. Shoutcast IMHO is simple HTTP, so to create your own stream, you simply output the contents of the streams.
To make ogg-based webradio my Sonos system, I created a small transcoding wrapper around sox, which is actually written in PHP, so it may be useful for you to serve as an example.
You will find it here: http://www.gnegg.ch/ogg2mp3/
If after implementing your own streaming protocol - maybe even based on UDP, then I'm afraid PHP may not be the right solution to the problem - at least not as long as it has its own share of problems when used for long processes (which 5.3 may bring some help with its integrated garbage collection)
source share