Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:38183 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 25930 invoked from network); 12 Jun 2008 11:35:06 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 12 Jun 2008 11:35:06 -0000 Authentication-Results: pb1.pair.com smtp.mail=johannes@schlueters.de; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=johannes@schlueters.de; sender-id=unknown Received-SPF: error (pb1.pair.com: domain schlueters.de from 83.243.58.163 cause and error) X-PHP-List-Original-Sender: johannes@schlueters.de X-Host-Fingerprint: 83.243.58.163 mail4.netbeat.de Received: from [83.243.58.163] ([83.243.58.163:56638] helo=mail4.netbeat.de) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 6E/07-21871-8E901584 for ; Thu, 12 Jun 2008 07:35:06 -0400 Received: (qmail 2749 invoked by uid 507); 12 Jun 2008 11:35:01 -0000 Received: from unknown (HELO ?192.168.1.100?) (postmaster%schlueters.de@82.135.81.168) by mail4.netbeat.de with ESMTPA; 12 Jun 2008 11:35:01 -0000 To: Steph Fox Cc: internals , Andrei , Dmitry Stogov In-Reply-To: <006301c8cc72$1e6235f0$4401a8c0@foxbox> References: <006301c8cc72$1e6235f0$4401a8c0@foxbox> Content-Type: text/plain Date: Thu, 12 Jun 2008 13:35:00 +0200 Message-ID: <1213270500.21247.20.camel@goldfinger.johannes.nop> Mime-Version: 1.0 X-Mailer: Evolution 2.12.3 (2.12.3-4.fc8) Content-Transfer-Encoding: 7bit Subject: Re: Fw: [PHP-DEV] Dummy calls for 5.3.0 up? [Was: HEAD tests broken under Windows] From: johannes@schlueters.de (Johannes =?ISO-8859-1?Q?Schl=FCter?=) 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" > To: "internals" > 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 > > > > > > > >