php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #44195 Calling object method from itself results in Internal Server Error
Submitted: 2008-02-20 23:06 UTC Modified: 2008-02-20 23:30 UTC
From: Denis dot D dot Gorbachev at gmail dot com Assigned:
Status: Not a bug Package: Class/Object related
PHP Version: 5.2.5 OS: WinXP Pro
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: Denis dot D dot Gorbachev at gmail dot com
New email:
PHP Version: OS:

 

 [2008-02-20 23:06 UTC] Denis dot D dot Gorbachev at gmail dot com
Description:
------------
While editing source, I findreplaced by mistake a tiny piece of my code in one of my files. I have then modified other files. When I tried to run my code, it crashed with Internal Server Error.

Reproduce code:
---------------
EXAMPLE CODE:
<?php
class foo {
	public function bar() {
		return $this->bar();	
	}
}

$f = new foo();
$f->bar();
?>

Expected result:
----------------
Internal Server Error

Actual result:
--------------
PHP Fatal Error or PHP Warning

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-02-20 23:30 UTC] felipe@php.net
See#37612
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Wed Mar 12 10:01:31 2025 UTC