Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:55454 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 57880 invoked from network); 15 Sep 2011 15:06:00 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 15 Sep 2011 15:06:00 -0000 Authentication-Results: pb1.pair.com smtp.mail=hannes.magnusson@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=hannes.magnusson@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.213.170 as permitted sender) X-PHP-List-Original-Sender: hannes.magnusson@gmail.com X-Host-Fingerprint: 209.85.213.170 mail-yx0-f170.google.com Received: from [209.85.213.170] ([209.85.213.170:52882] helo=mail-yx0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 0A/3A-29375-554127E4 for ; Thu, 15 Sep 2011 11:05:57 -0400 Received: by yxi13 with SMTP id 13so2541102yxi.29 for ; Thu, 15 Sep 2011 08:05:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=x6iubSRraIh1irGRRNeIRr2ULs/ga+4L4WF6ZDZZg4g=; b=R1YLZ4rB9Vx/VcaKvVm4kC4aXNspam7XsNbqcmdni5X2qKSDH23x0yJZM7XgLIa/JF YwGm5lxK4tNb8tSRyPWSyqh0mH1fl2pHaN7AoQtI/kRkHHnnAX2ecI/I/K1qciOhDupK uXibYwbVGSN9kw713YfwiY+6mmAtOy4/5A/7k= MIME-Version: 1.0 Received: by 10.236.201.137 with SMTP id b9mr7346903yho.46.1316099155214; Thu, 15 Sep 2011 08:05:55 -0700 (PDT) Received: by 10.147.167.7 with HTTP; Thu, 15 Sep 2011 08:05:55 -0700 (PDT) In-Reply-To: References: <4E6FB55E.4060906@oracle.com> Date: Thu, 15 Sep 2011 17:05:55 +0200 Message-ID: To: Nikita Popov Cc: Ferenc Kovacs , Christopher Jones , internals@lists.php.net Content-Type: text/plain; charset=UTF-8 Subject: Re: [PHP-DEV] Revert Tokenizer behavior for 5.4 From: hannes.magnusson@gmail.com (Hannes Magnusson) On Thu, Sep 15, 2011 at 16:51, Nikita Popov wrote: > Hi Hannes, thanks for your response! > > On Thu, Sep 15, 2011 at 9:22 AM, Hannes Magnusson > wrote: >> the change to ext/tokenizer/tests/token_get_all_variation16.phpt seems >> really weird? > I changed the test to not include a __halt_compiler statement anymore, > as it didn't make sense in this context, and included a function call > instead. The file would have been just a parse error, as > __halt_compiler can only occur in the outermost scope or in namespace > declaration score. Additionally the behavior of token_get_all on > __halt_compiler is already tested in the other test (bug54089.phpt), > so I though it wasn't necessary to test it there again. > >> And I'm unsure how this should actually work. >> >> A file containing: >> > >> __halt_compiler() >> >> ?> >> stuff >> >> Will return "stuff" after this patch.. that doesn't seem expected. > First of all: The second patch (the _full one) isn't that important to > me, as you can fetch the data after __halt_compiler(); quite easily in > userland code, too (concat all tokens and calculate the offset from > that, then substr it from the code). So if you think it doesn't make > sense, I would be okay without it. The original reasoning was, that > fetching the contents after __halt_compiler(); is the most probable > thing you want to do if you are using token_get_all on a file with Wait wait wait. Thats the point here? __COMPILER_HALT_OFFSET__ already tells you where the data starts. -Hannes