Format poorly formatted PHP code
You're recovering some old PHP code; you want to answer a question asked on a forum and the person who posted the PHP question didn't take care to ensure that it was properly formatted; ... there are too many occasions when the syntactic quality of a code can be rotten.
You'd like to have an online tool that you can use to quickly retrieve code with a much more polished layout, just by copying and pasting. Without having to install anything and without any headaches.
For example, how do you make the code below look cleaner in five seconds?
<?php
abstract class mycollection implements Iterator
{
protected function populate($array, $dataobject){
foreach($array as $item){
$object = new $dataobject();
foreach($item as $key => $val){$object->$key = $val;}
$this->storage[] = $object;
}}
}