Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:42325 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 85489 invoked from network); 18 Dec 2008 11:39:53 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 18 Dec 2008 11:39:53 -0000 Authentication-Results: pb1.pair.com header.from=jay.27182818@gmail.com; sender-id=pass; domainkeys=bad Authentication-Results: pb1.pair.com smtp.mail=jay.27182818@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.218.32 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: jay.27182818@gmail.com X-Host-Fingerprint: 209.85.218.32 mail-bw0-f32.google.com Received: from [209.85.218.32] ([209.85.218.32:43490] helo=mail-bw0-f32.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 74/30-18353-8863A494 for ; Thu, 18 Dec 2008 06:39:52 -0500 Received: by bwz13 with SMTP id 13so311523bwz.23 for ; Thu, 18 Dec 2008 03:39:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:subject:from:to:cc :in-reply-to:references:content-type:date:message-id:mime-version :x-mailer:content-transfer-encoding; bh=JWkdXEyfuyZ7irK3mQroKaNwbDol28ikkXXji64Kkvg=; b=efmGUYZf5E40E3yj08iGrIr8fU37YU53eTAp9QI/USgfq7rXPrsS4E0ssu6b0BGTbu kRxFhqQrRHiQF6m0wm6grgn6KCSIkb/UeQbBb7RwkZsNktuJsU96XDzqUcHr2Vac7rCG s4EKF68IV6/c++FLhd7aVD7ENaUjN6QA4W3Pg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=subject:from:to:cc:in-reply-to:references:content-type:date :message-id:mime-version:x-mailer:content-transfer-encoding; b=MP8Zki8cztl5MVeSk4Wz1w338jr6eN1WNn5wDqmAy898PV1jEroOYIzMqc4K0EXrvs 61kIiiZg3/ZlEte2nPdPYblB381rBje6AG21AgBfl7TQqH5RSP2Pc/1VUeW1x1Yg7luI NnlR9Fjn6NjW8PyXyfGebtmylVGAa3QevH24g= Received: by 10.103.121.19 with SMTP id y19mr702508mum.56.1229600389181; Thu, 18 Dec 2008 03:39:49 -0800 (PST) Received: from ?192.168.1.100? (75.98.221.62.dyn.idknet.com [62.221.98.75]) by mx.google.com with ESMTPS id w5sm5173413mue.55.2008.12.18.03.39.47 (version=SSLv3 cipher=RC4-MD5); Thu, 18 Dec 2008 03:39:48 -0800 (PST) To: Christian Schneider Cc: internals@lists.php.net In-Reply-To: <494A31E4.80006@cschneid.com> References: <1229560181.14598.13.camel@jay> <49499B34.4000300@activestate.com> <1229563116.6152.16.camel@jay> <494A31E4.80006@cschneid.com> Content-Type: text/plain Date: Thu, 18 Dec 2008 13:39:45 +0200 Message-ID: <1229600385.17198.10.camel@jay> Mime-Version: 1.0 X-Mailer: Evolution 2.24.2 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] simpler syntax for arrays From: jay.27182818@gmail.com ("Jay I.") interesting idea, thanks. but unfortunately it won't help me as i really need to pass arrays as a single argument like this: my_func($param_1,$param_2,array(...)); i'm unaware of how to make patches for php so i wonder is it possible to add a dollar sign shortcut for array keyword. like this: my_func($param_1,$param_2,$(1, 2, 3)); regards, jay On Thu, 2008-12-18 at 12:20 +0100, Christian Schneider wrote: > jay wrote: > > okey. another syntax: > > myfunc($('key1'=>'val1', 'key2'=>'val2', ...)); > > This has been discussed and rejected several times. > > If you still want to be able to use this syntax you can use my patch at > http://cschneid.com/php/ > including a script to convert from and to this syntax. > We use this in our production environment so the patch will be updated > for future PHP versions ;-) > > If you want to use it in an environment where you cannot patch PHP you > could use our toolkit which provides an auto_prepend file with > just-in-time translation from new to old syntax. > See: http://itools.search.ch/ > > Regards, > - Chris