Re: Re: Test failure of 5.6.24 on OS X 10.11.6

From: Date: Wed, 03 Aug 2016 15:09:27 +0000
Subject: Re: Re: Test failure of 5.6.24 on OS X 10.11.6
References: 1 2 3  Groups: php.qa 
Request: Send a blank email to php-qa+get-67772@lists.php.net to get a copy of this message
On 03.08.2016 at 12:07, Kalle Sommer Nielsen wrote: > 2016-08-03 11:34 GMT+02:00 Christoph Becker <cmbecker69@gmx.de>: > >> The first test[1] is supposed to be run on Windows systems only. I'm >> rather surprised that apparently your system reports the following to be >> false: >> >> substr(PHP_OS, 0, 3) != 'WIN' > > Could be a casing issue? I believe we usually check for Windows like: > > if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') { > // Win32 > } Yes, that should indeed be fixed. However, in the case Peter reported, apparently PHP_OS starts with "WIN", and that would almost certainly be a bug for OS X. OTOH, the other test would have been skipped in this case, so I'm somewhat confused. The only thing I can faintly imagine, is that PHP_OS would be 0 on this machine (0 == "WIN" in PHP), but that would also certainly be a bug. -- Christoph M. Becker

« previous php.qa (#67772) next »