php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #44210 Parser accepts functions in functions
Submitted: 2008-02-22 10:09 UTC Modified: 2008-02-22 11:17 UTC
From: dorthe at luebbert dot net Assigned:
Status: Not a bug Package: *Compile Issues
PHP Version: 5.2.5 OS: Linux
Private report: No CVE-ID: None
 [2008-02-22 10:09 UTC] dorthe at luebbert dot net
Description:
------------
php -l does not report any error on the code listed above(result of a unresolved merge conflict), this means functions are accepted within functions (it does not work if you add public to the doA or doB-function).


Reproduce code:
---------------
<?php
class something
{

  public function getData()
  {
     print "foo";
    function doA()
    {
     return $a;
    }


    function doB()
    {
     return $b;
    }
    print "bar";
    return $data;
  }
}
?>

Expected result:
----------------
error.

Actual result:
--------------
no error

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-02-22 11:17 UTC] felipe@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

This isn't a bug.

See http://docs.php.net/functions
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 25 22:01:29 2024 UTC