Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:53770 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 18830 invoked from network); 7 Jul 2011 15:19:54 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 7 Jul 2011 15:19:54 -0000 Authentication-Results: pb1.pair.com smtp.mail=rquadling@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=rquadling@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.216.42 as permitted sender) X-PHP-List-Original-Sender: rquadling@gmail.com X-Host-Fingerprint: 209.85.216.42 mail-qw0-f42.google.com Received: from [209.85.216.42] ([209.85.216.42:42426] helo=mail-qw0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 48/14-26983-A9EC51E4 for ; Thu, 07 Jul 2011 11:19:54 -0400 Received: by qwi4 with SMTP id 4so572938qwi.29 for ; Thu, 07 Jul 2011 08:19:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:reply-to:in-reply-to:references:from:date:message-id :subject:to:cc:content-type:content-transfer-encoding; bh=PBCXeze7KZ2Bgq3ET+9vVvfLr4u+oqYpKbwnjN4S7FM=; b=CrqPlzxhl8c+xzJPjAsOLP3ov0D85hFfDMeRcZm3JjESQNBvJxE7DQM1K++KBB+TRj Ln21cQzxckWxsEOJdDXx2aArnlIa4bNuow95X+ciWXVUIbAdHGQhSzqB4rc8b02x6aQ5 QUoKlJFjBoTJcvY6GZfXoPWIDCRw56U0hK7fk= Received: by 10.229.47.18 with SMTP id l18mr711965qcf.55.1310051990128; Thu, 07 Jul 2011 08:19:50 -0700 (PDT) MIME-Version: 1.0 Received: by 10.229.122.136 with HTTP; Thu, 7 Jul 2011 08:19:30 -0700 (PDT) Reply-To: RQuadling@GMail.com In-Reply-To: References: <1309966833.3580.5.camel@guybrush> <1309968041.3580.21.camel@guybrush> Date: Thu, 7 Jul 2011 16:19:30 +0100 Message-ID: To: =?UTF-8?Q?Johannes_Schl=C3=BCter?= Cc: Adam Harvey , PHP internals Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] [RFC] -W option for CLI "strict mode" From: rquadling@gmail.com (Richard Quadling) 2011/7/7 Richard Quadling : > 2011/7/6 Johannes Schl=C3=BCter : >> On Wed, 2011-07-06 at 16:46 +0100, Richard Quadling wrote: >>> 2011/7/6 Johannes Schl=C3=BCter : >>> > On Tue, 2011-07-05 at 16:50 +0100, Richard Quadling wrote: >>> >> C:\php5\php.exe --verbose -f d:\docs\phd\render.php -- --verbose >>> > >>> > That happens with all options. >>> > =C2=A0 $ php -n run-tests.php -n >>> > >>> >>> You missed out the -- >>> >>> That separates arguments from php.exe and the script. >>> >>> As long as one remembers that, they should be OK. >> >> This is not needed usually: >> >> $ cat t.php >> > print_r($argv); >> >> >> $ php -n t.php -n >> Array >> ( >> =C2=A0 =C2=A0[0] =3D> t.php >> =C2=A0 =C2=A0[1] =3D> -n >> ) > > On windows ... > >>copy con C:\t.php > print_r($argv); > ^Z > =C2=A0 =C2=A0 =C2=A0 =C2=A01 file(s) copied. > >>php -v > PHP 5.3.7RC3-dev (cli) (built: Jul =C2=A04 2011 14:05:17) > Copyright (c) 1997-2011 The PHP Group > Zend Engine v2.3.0, Copyright (c) 1998-2011 Zend Technologies > > >>C:\PHP5\php.exe -n -f C:\t.php -n > Array > ( > =C2=A0 =C2=A0[0] =3D> C:\t.php > ) > >>C:\PHP5\php.exe -n -f C:\t.php -- -n > Array > ( > =C2=A0 =C2=A0[0] =3D> C:\t.php > =C2=A0 =C2=A0[1] =3D> -n > ) > > > php --help specifically shows this too. Aha! >C:\PHP5\php.exe -n C:\t.php -n -- -j Array ( [0] =3D> C:\t.php [1] =3D> -n [2] =3D> -- [3] =3D> -j ) Without -f, all arguments after the script name belong to the script. Without -f, argument order becomes important. --=20 Richard Quadling Twitter : EE : Zend : PHPDoc @RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY : bit.ly/lFnVea