phpBB 3.1 requires PHP 5.3.3+, so some code can be simplified.
Lines 18 to 21 (code) can be removed.
Lines 123 to 148 (code) can be replaced with:
All of this because E_DEPRECATED, date_default_timezone_set() and date_default_timezone_get() were introduced in PHP 5.3.0.
Line 772 (code) can be replaced with the following for clarity: