Bug #76414 [Opn->Nab]: return echo("foo"); ought to work as expected

From: Date: Tue, 05 Jun 2018 10:32:39 +0000
Subject: Bug #76414 [Opn->Nab]: return echo("foo"); ought to work as expected
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-215495@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=76414&edit=1 ID: 76414 Updated by: requinix@php.net Reported by: aleemb at gmail dot com Summary: return echo("foo"); ought to work as expected -Status: Open +Status: Not a bug Type: Bug Package: *General Issues Operating System: OSX PHP Version: 7.2.6 Block user comment: N Private report: N New Comment: Use print(). Previous Comments: ------------------------------------------------------------------------ [2018-06-05 10:30:22] aleemb at gmail dot com Description: ------------ This is either a bug or a feature request, either way the following should work as expected: return echo("foo"); It should echo "foo" and return. Test script: --------------- return echo("foo"); Expected result: ---------------- foo Actual result: -------------- PHP Parse error: syntax error, unexpected 'echo' (T_ECHO), expecting ';' ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=76414&edit=1

« previous php.bugs (#215495) next »