Re: [PHP-DEV] [Strawpoll] Promoting redefining constant to exception

2022-01-25 Thread Rowan Tommins
On 25/01/2022 19:44, Chase Peeler wrote: If we start throwing exceptions, which can't be suppressed, it will make this much more difficult to read since the constants.php will have to be updated: if(!defined('dbserver')){ define('dbserver','productiondb.example.com'); } if(!defined('othercons

Re: [PHP-DEV] [Strawpoll] Promoting redefining constant to exception

2022-01-25 Thread Bruce Weirdan
On Tue, Jan 25, 2022 at 9:45 PM Chase Peeler wrote: > it will make this much more difficult to read since the constants.php will > have to be > updated: > > if(!defined('dbserver')){ > define('dbserver','productiondb.example.com'); > } > if(!defined('otherconstant')){ >define('otherconstan

Re: [PHP-DEV] [Strawpoll] Promoting redefining constant to exception

2022-01-25 Thread Chase Peeler
On Tue, Jan 25, 2022 at 3:08 PM Kamil Tekiela wrote: > A constant is a value that, unlike a variable, cannot be reassociated with > a different value. A properly written software should never redefine > constants. The possibility of redefining constants in PHP should be > considered a bug rather

Re: [PHP-DEV] [Strawpoll] Promoting redefining constant to exception

2022-01-25 Thread Kamil Tekiela
A constant is a value that, unlike a variable, cannot be reassociated with a different value. A properly written software should never redefine constants. The possibility of redefining constants in PHP should be considered a bug rather than a feature. Constants are not good for configuration values

Re: [PHP-DEV] [Strawpoll] Promoting redefining constant to exception

2022-01-25 Thread Chase Peeler
We have a main "constants.php" file that resides in git. The first line of constants.php includes local_constants.php, which is kept out of git. The idea is that we can "override" any of the constants on a per server basis. constants.php: @define('dbserver','productiondb.example.com'); local_cons

Re: [PHP-DEV] Long-Term Planning for PHP 9.0 Error Promotion

2022-01-25 Thread Max Semenik
On Tue, Jan 25, 2022 at 2:47 AM Mark Randall wrote: > Let's open a discussion as to what we might want to do in the future, > and depending on how things shake out, we can decide what route to take > with regards to bringing RFCs to vote. My personal opinion: there should be no old style errors