Could we rewrite this a little?

```php
if (function_exists('sys_get_temp_dir')) {
    $this->tmp = sys_get_temp_dir();
} elseif ( ($tmp = getenv('TMP')) || ($tmp = getenv('TEMP')) || ($tmp = getenv('TMPDIR')) ) {
    $this->tmp = realpath($tmp);
} else {
    $this->tmp = '/tmp';
}
```