php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #64217 Method Declared with one parameter, Called with Two parameter , No warnings.
Submitted: 2013-02-15 13:46 UTC Modified: 2013-02-15 13:54 UTC
From: jana dot sriramulu at gmail dot com Assigned:
Status: Not a bug Package: Class/Object related
PHP Version: Irrelevant OS: Windows xp
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: jana dot sriramulu at gmail dot com
New email:
PHP Version: OS:

 

 [2013-02-15 13:46 UTC] jana dot sriramulu at gmail dot com
Description:
------------
<?php
// PHP Version 5.3.3
ini_set('display_errors', '1');
error_reporting(-1);

class a {
    
    public function func1($a)
    {
        echo "<br>A = " . $a;
    }
    
    public function func2()
    {
        $this->func1(5, 6);
    }
    
}


$c = new a();
$c->func2();

Test script:
---------------
<?php
// PHP Version 5.3.3
ini_set('display_errors', '1');
error_reporting(-1);

class a {
    
    public function func1($a)
    {
        echo "<br>A = " . $a;
    }
    
    public function func2()
    {
        $this->func1(5, 6);
    }
    
}


$c = new a();
$c->func2();

Expected result:
----------------
Fatal Error / Warning / Notices.

Actual result:
--------------
No Warnings/ Notices/ Fatal error.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2013-02-15 13:54 UTC] johannes@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 is documented behavior and a feature which won't be changed in the foreseeable future.

See also func_get_args().
 [2013-02-15 13:54 UTC] johannes@php.net
-Status: Open +Status: Not a bug
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Feb 28 14:01:28 2024 UTC