Well before Mike Myers voiced the 15th sequel of the animated series of Shrek movies, Chris Farley was set to do the voice. In a video that has recently resurfaced, we can hear Farley's recorded dialogue with Eddie Murphy, who did eventually voice the Donkey:
Video is no longer available: www.youtube.com/watch?v=IcqJgC0WZ3o
For reference, here is the Mike Myers version:
There is quite a long history with this character, as can be read here from Wikipedia:
Shrek originally cast Chris Farley to do the voice for the title character, recording about 80%–90% of his dialogue. After Farley died in 1997 before he could finish, Mike Myers was brought in to work for the character, who after his first recording decided to record his voice in a Scottish accent. The film was also originally planned to be motion-captured, but after poor results, the studio decided to get PDI to help Shrek get its final computer-animated look.
There's quite a difference between the two, and it's clear that the first film would have been very different not only with Farley voicing, but with the character of the ogre not being such a big friendly green guy. The dialogue was apparently changed a bit to accommodate Myers when Farley left the project, but what's interesting is that Myers decided to change the way he did his own version late in the game, choosing instead to go Scottish with Shrek's sound.
This just shows how many different interpretations one can have for a particular piece. Not only would different casting have probably changed the way the Shrek franchise was received, but if the film had been released with the first version that Myers had done, it very well might not have had the same response. It just goes to show how important casting is, and how important it is to let your actors have the space they need to find a character. It's impossible to say which version would be better, but it's clear that the Shrek franchise has been a complete hit.
There is also a movie about Chris that includes some of these details called I Am Chris Farley, and you can watch the trailer here:
Video is no longer available: www.youtube.com/watch?v=r835keCmzHM