Replace PHP Short Tags

Anything you want added or changed in future versions of ZoneMinder? Post here and there's a chance it will get in! Search to make sure it hasn't already been requested.
Post Reply
ferrante
Posts: 1
Joined: Tue Jun 02, 2009 1:21 pm

Replace PHP Short Tags

Post by ferrante »

ZoneMinder makes extensive use of PHP short tags. These tags (<? and <?= ) are deprecated, and some distributions (e.g. Slackware 12.2) ship with short-tag support disabled. PHP still ships with it on by default, but lists in the php.ini file:
; NOTE: Using short tags should be avoided when developing applications or
; libraries that are meant for redistribution, or deployment on PHP
; servers which are not under your control, because short tags may not
; be supported on the target server. For portable, redistributable code,
; be sure not to use short tags.
It may be as simple as a regex search & replace on the code. I was able to get functions.php converted with minor effort, but several other files utilize short tags as well. I am not familiar with ZoneMinder's codebase and don't want to submit a patch that covers (almost) every PHP file.

This is not a make-or-break feature/modification, but it would help make the codebase more compliant with newer PHP coding practices.
Post Reply