Bug #80265 [Nab]: Can't use defined "Fn"

From: Date: Wed, 21 Oct 2020 06:33:20 +0000
Subject: Bug #80265 [Nab]: Can't use defined "Fn"
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-229824@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=80265&edit=1 ID: 80265 User updated by: bugs dot php dot net at ignaciollorente dot com Reported by: bugs dot php dot net at ignaciollorente dot com -Summary: Can't us defined "Fn" +Summary: Can't use defined "Fn" Status: Not a bug Type: Bug Package: *General Issues Operating System: Windows PHP Version: 7.4.11 Block user comment: N Private report: N New Comment: Edited Title Previous Comments: ------------------------------------------------------------------------ [2020-10-21 06:26:46] requinix@php.net https://www.php.net/manual/en/reserved.keywords.php ------------------------------------------------------------------------ [2020-10-21 06:25:29] sjon@php.net Sorry, but your problem does not imply a bug in PHP itself. For a list of more appropriate places to ask for help using PHP, please visit http://www.php.net/support.php as this bug system is not the appropriate forum for asking support questions. Due to the volume of reports we can not explain in detail here why your report is not a bug. The support channels will be able to provide an explanation for you. Thank you for your interest in PHP. "fn" has been a reserved keyword ever since "arrow functions" were introduced https://www.php.net/manual/en/functions.arrow.php ------------------------------------------------------------------------ [2020-10-21 06:24:43] bugs dot php dot net at ignaciollorente dot com It seems to be related to Arrow Functions https://www.php.net/manual/en/functions.arrow.php Documentation does not show results when searching "fn" https://www.php.net/manual-lookup.php?pattern=fn&scope=quickref ------------------------------------------------------------------------ [2020-10-21 06:18:55] bugs dot php dot net at ignaciollorente dot com Description: ------------ The word Fn can used after defined. It gives a syntax error. Test script: --------------- <?php define("Fn","hola"); #Parse error: syntax error, unexpected ';', expecting '(' in xxxx on line 4 echo Fn; ?> ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=80265&edit=1

« previous php.bugs (#229824) next »