Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:38184 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 31669 invoked from network); 12 Jun 2008 11:52:46 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 12 Jun 2008 11:52:46 -0000 Authentication-Results: pb1.pair.com smtp.mail=steph@phparch.com; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=steph@phparch.com; sender-id=unknown Received-SPF: error (pb1.pair.com: domain phparch.com from 64.99.136.173 cause and error) X-PHP-List-Original-Sender: steph@phparch.com X-Host-Fingerprint: 64.99.136.173 smtprelay-virgin0173.hostedemail.com Linux 2.5 (sometimes 2.4) (4) Received: from [64.99.136.173] ([64.99.136.173:48991] helo=smtprelay-virgin.hostedemail.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id C3/28-21871-D0E01584 for ; Thu, 12 Jun 2008 07:52:46 -0400 Received: from filter.hostedemail.com (ff-bigip1 [10.5.19.254]) by smtprelay08.hostedemail.com (Postfix) with SMTP id 7A96DE06CC; Thu, 12 Jun 2008 11:52:43 +0000 (UTC) X-SpamScore: 1 Received: from foxbox (host86-143-244-1.range86-143.btcentralplus.com [86.143.244.1]) (Authenticated sender: steph.fox) by omf09.hostedemail.com (Postfix) with ESMTP; Thu, 12 Jun 2008 11:52:41 +0000 (UTC) Message-ID: <00fd01c8cc83$035a49d0$4401a8c0@foxbox> Reply-To: "Steph Fox" To: =?Windows-1252?Q?Johannes_Schl=FCter?= Cc: "internals" , "Andrei" , "Dmitry Stogov" References: <006301c8cc72$1e6235f0$4401a8c0@foxbox> <1213270500.21247.20.camel@goldfinger.johannes.nop> Date: Thu, 12 Jun 2008 12:54:01 +0100 Organization: php|architect MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="Windows-1252"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.2180 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 X-session-marker: 73746570682E666F78 X-Spam-Summary: 30,2,0,68720cb41eb6fdc6,4942521e3987156a,steph@phparch.com,,RULES_HIT:355:379:539:540:541:542:543:567:599:601:945:973:988:989:1155:1156:1260:1277:1311:1313:1314:1345:1437:1515:1516:1518:1534:1541:1587:1593:1594:1683:1711:1730:1747:1766:1792:2073:2075:2078:2393:2505:2559:2562:3027:3353:3865:3866:3867:3868:3869:3870:3871:3872:3873:3874:4250:5007:6119:6261:7875,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:,MSBL:none,DNSBL:none Subject: Re: Fw: [PHP-DEV] Dummy calls for 5.3.0 up? [Was: HEAD testsbroken under Windows] From: steph@phparch.com ("Steph Fox") Hi Johannes, > 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) Obviously... I was just thinking about the amount of stuff that would need to be added to that compatibility layer, and how it might affect portability. Not everyone uses PEAR and here we're more or less forcing a dependency on it, with the option being to knit one's own. Also, since many are only now moving from PHP 4, it seems a bit harsh to tell them they're going to have to change their code all over again in a couple of years' time for PHP 6 when they could be doing it all at one hit. > Would a const FILE_BINARY = 0; be enough or would that break the > function in some way (didn't check it) #define PHP_FILE_TEXT 32 #define PHP_FILE_BINARY 64 And again, yes you can do it in userland code (FILE_TEXT, FILE_BINARY) and it harms nothing. > 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. We'll have to agree to disagree over this... - Steph