Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:37798 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 98235 invoked from network); 22 May 2008 11:22:17 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 22 May 2008 11:22:17 -0000 Authentication-Results: pb1.pair.com smtp.mail=sv_forums@fmethod.com; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=sv_forums@fmethod.com; sender-id=unknown Received-SPF: error (pb1.pair.com: domain fmethod.com from 69.16.228.148 cause and error) X-PHP-List-Original-Sender: sv_forums@fmethod.com X-Host-Fingerprint: 69.16.228.148 unknown Linux 2.4/2.6 Received: from [69.16.228.148] ([69.16.228.148:59042] helo=host.fmethod.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id E3/28-53818-86755384 for ; Thu, 22 May 2008 07:22:17 -0400 Received: from [83.228.56.37] (port=4784 helo=pc) by host.fmethod.com with esmtpa (Exim 4.68) (envelope-from ) id 1Jz8s9-0007UT-ER for internals@lists.php.net; Thu, 22 May 2008 06:22:13 -0500 Message-ID: <8850665E29F14C569D8880B129B2A7BB@pc> To: References: <012701c8bb44$68f8b880$4401a8c0@foxbox> <48342DB7.2020108@isdg.net> <353f2c6f0805211141m9719d58xe0a128adbc14b656@mail.gmail.com> <353f2c6f0805211146p43d6aa96u9e6e03e82490b1c@mail.gmail.com> <353f2c6f0805220351h3c043365r10892bab18ab35d0@mail.gmail.com> Date: Thu, 22 May 2008 14:22:07 +0300 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="UTF-8"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.5512 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5512 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - host.fmethod.com X-AntiAbuse: Original Domain - lists.php.net X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - fmethod.com Subject: Re: [PHP-DEV] RFC: allow_call_pass_by_reference From: sv_forums@fmethod.com ("Stan Vassilev | FM") Hi, Actually PHP ignores default values on parameters followed by required ones. You can't fetch the default value even via Reflection. This is easily detected at compile time so I wonder why the compiler doesn't warn. Regards, Stan Vassilev >>> what stops you from declaring: >>> >>> function someFunc(&$param = null) >>> { >>> } >>> >>> it works just fine >> And what if this param isn't the last param of this function, and next >> params are required? >> > > Then I would say "that is a bad design" > > -- > Alexey Zakhlestin > http://blog.milkfarmsoft.com/ > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php >