Bug #74972 [Nab]: Undefined constant: Parser Tokens

From: Date: Mon, 24 Jul 2017 08:01:56 +0000
Subject: Bug #74972 [Nab]: Undefined constant: Parser Tokens
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-210254@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=74972&edit=1 ID: 74972 User updated by: php at amvc dot nl Reported by: php at amvc dot nl Summary: Undefined constant: Parser Tokens Status: Not a bug Type: Bug Package: Scripting Engine problem Operating System: Alpine Linux PHP Version: 7.1.7 Block user comment: N Private report: N New Comment: Thank you nikic! I didn't realised that Tokenizer is a php extension. Adding php7-tokenizer solves the problem. Previous Comments: ------------------------------------------------------------------------ [2017-07-22 14:58:43] nikic@php.net Parser tokens are definde by the tokenizer extension. You probably need to install and/or enable it in some way. ------------------------------------------------------------------------ [2017-07-22 14:20:38] php at amvc dot nl Description: ------------ (first of all sorry; I'm not sure if affected package is correct) Usage of parser tokens results in a undefined constant notice since (at least) 7.1.5 on Alpine Linux. alpine:3.5 is working fine, aline:3.6 and :edge are causing problems. --------- FROM alpine:edge RUN apk add --no-cache php7 RUN php7 -v RUN php7 -m RUN php7 -r 'var_dump(T_ECHO);' RUN php7 -r 'var_dump(T_PRINT);' --------- Step 3/6 : RUN php7 -v ---> Running in 17cb9b5034d5 PHP 7.1.7 (cli) (built: Jul 19 2017 03:13:06) ( NTS ) Copyright (c) 1997-2017 The PHP Group Zend Engine v3.1.0, Copyright (c) 1998-2017 Zend Technologies ---> e0fb51b72d87 Removing intermediate container 17cb9b5034d5 Step 4/6 : RUN php7 -m ---> Running in 0865a247ab4d [PHP Modules] Core date filter hash libxml pcre readline Reflection SPL standard [Zend Modules] ---> 1d44b74e76e0 Removing intermediate container 0865a247ab4d Step 5/6 : RUN php7 -r 'var_dump(T_ECHO);' ---> Running in b1a53a02f747 PHP Notice: Use of undefined constant T_ECHO - assumed 'T_ECHO' in Command line code on line 1 string(6) "T_ECHO" ---> 0c783b3043b5 Removing intermediate container b1a53a02f747 Step 6/6 : RUN php7 -r 'var_dump(T_PRINT);' ---> Running in c3d7f000fdac string(7) "T_PRINT" PHP Notice: Use of undefined constant T_PRINT - assumed 'T_PRINT' in Command line code on line 1 Test script: --------------- var_dump(T_PRINT); Expected result: ---------------- int(266) Actual result: -------------- string(7) "T_PRINT" PHP Notice: Use of undefined constant T_PRINT - assumed 'T_PRINT' in Command line code on line 1 ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=74972&edit=1

« previous php.bugs (#210254) next »