File uploader in php I can't get a peer review where I work, I was wondering how my code was and how could it be improved.

https://github.com/lamondea/uploader

Is it a good practice to use functions in classes or should it be replaced by external function that use the object returned by the class:

class _export
{   
    public $nbr;
    public $file;

    public function __construct($file,$nbr=0){
        if($nbr != 0 &amp;&amp; ($file-&gt;ext == 'jpg' || $file-&gt;ext == 'png' || $file-&gt;ext == 'gif'))
            thumbnailer($file,$nbr);
        else {
            move_uploaded_file($file-&gt;tmp_name, ($file-&gt;loc).($file-&gt;name));
            return $file-&gt;name;
        }
    }
}
I'm not sure if using classes is better or worse but I am starting to see files being called as functions more than a single file with function within. This is a more common upload script.

$allowedExts = array("gif", "jpeg", "jpg", "png");
$temp = explode(".", $_FILES["file"]["name"]);
$extension = end($temp);

if ((($_FILES["file"]["type"] == "image/gif")
    || ($_FILES["file"]["type"] == "image/jpeg")
    || ($_FILES["file"]["type"] == "image/jpg")
    || ($_FILES["file"]["type"] == "image/pjpeg")
    || ($_FILES["file"]["type"] == "image/x-png")
    || ($_FILES["file"]["type"] == "image/png"))
    &amp;&amp; ($_FILES["file"]["size"] &lt; 20000)
    &amp;&amp; in_array($extension, $allowedExts)){
    if ($_FILES["file"]["error"] &gt; 0){
        echo "Error: " . $_FILES["file"]["error"] . "&lt;br&gt;";
    }
    else{
        echo "Upload: " . $_FILES["file"]["name"] . "&lt;br&gt;";
        echo "Type: " . $_FILES["file"]["type"] . "&lt;br&gt;";
        echo "Size: " . ($_FILES["file"]["size"] / 1024) . " kB&lt;br&gt;";
        echo "Stored in: " . $_FILES["file"]["tmp_name"];
    }
}
else{
    echo "Invalid file";
}