Hi,
On Thu, 2008-06-12 at 10:53 +0100, Steph Fox wrote:
> There is far too much of this kind of thing. Can we please consider adding
> dummies into at least 5.3.0 and possibly even the 5_2 branch for:
>
> is_binary()
> is_unicode()
These can be easily emulated using PHP like
if (!function_exists("is_binary")) {
function is_binary($s) { return is_string($s); }
}
> file_put_contents(FILE_BINARY)
Would a const FILE_BINARY = 0; be enough or would that break the
function in some way (didn't check it)
> and any other major 'gotchas' that people can think of that will make it
> impossible to write future-compatible PHP 5 code?
as long as such an emulation is possible I'd prefer putting them in a
compatibility layer (like PEAR PHP_Compat) using PHP instead of putting
"useless" (mind the quotes ...) functions into PHP.
Stuff like the b prefix or (binary) casts are different as they can't be
emulated using userland stuff.
johannes
> Thanks,
>
> - Steph
>
>
> ----- Original Message -----
> From: "Steph Fox" <[EMAIL PROTECTED]>
> To: "internals" <[email protected]>
> Sent: Thursday, June 12, 2008 3:32 AM
> Subject: [PHP-DEV] HEAD tests broken under Windows
>
>
> >
> >
> > Hi all,
> >
> > I'm hopeful that run-tests.php will now work as advertised under CVS HEAD
> > in most places. However it's still not right under Windows, and I finally
> > tracked that down to the fact that file_put_contents() in PHP 6 will
> > insist on creating a file with DOS line endings. The test files are
> > created from .phpt --FILE-- sections using file_put_contents(), so there
> > are a vast number of fails under doze due to an extra character in output
> > strings there.
> >
> > There's a *closed* PHP bug on this which was raised by Zoe over a year
> > ago, see http://bugs.php.net/bug.php?id=41609. For some obscure reason it
> > was seen as a documentation problem at the time. This is an extreme change
> > in behaviour, not a documentation problem, and needs proper analysis.
> >
> > Could someone please look into it?
> >
> > Thanks,
> >
> > - Steph
> >
> > --
> > PHP Internals - PHP Runtime Development Mailing List
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
> >
>
>
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php