php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #16160 no compile-time (interpreter) error about closing parenthesis
Submitted: 2002-03-18 23:28 UTC Modified: 2002-03-19 01:12 UTC
From: php at shrock dot org Assigned:
Status: Not a bug Package: Scripting Engine problem
PHP Version: 4.1.2 OS: linux 2.2
Private report: No CVE-ID: None
 [2002-03-18 23:28 UTC] php at shrock dot org
The following code does not render a compilation error (notice the closing parenthesis in the return statement).  In fact, everything dies completely with no output at all no matter what you try until you uncomment the offending line.  Here is the code that reproduces what I am reporting:

<?php
  error_reporting(E_ALL);
  function test() {
    return "Hello");
  }
  echo test();
?>

error_reporting is set to 2047 in php.ini

Configure parameters:
'--enable-track-vars' '--with-apxs=/usr/sbin/apxs' '--with-mysql' '--with-gnu-ld'

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-03-19 01:10 UTC] mfischer@php.net
This at least gives me <b>Parse error</b>:  parse error in <b>-</b> on line <b>1</b><br>.

Though not the best hint, it's unlikely the parser will be drastically improved during this century to catch each and every user error exactly.
 [2002-03-19 01:12 UTC] mfischer@php.net
See how I fooled myself though copy & paste?

Of course the exacty message *is*: ... line <b>4</b><br>

What do you want more ? :)
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Wed Jul 16 13:01:31 2025 UTC