php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #37905 some method's class which extends with interface crash
Submitted: 2006-06-24 08:10 UTC Modified: 2006-06-24 08:44 UTC
From: sf at cut dot hyh dot pl Assigned:
Status: Not a bug Package: Class/Object related
PHP Version: 5.1.4 OS: all
Private report: No CVE-ID: None
 [2006-06-24 08:10 UTC] sf at cut dot hyh dot pl
Description:
------------
see code

Reproduce code:
---------------
interface test
{
	public function display();
}

class A
{
	function display($sTpl)
	{
		echo $sTpl;
	}
}

class B extends A implements test
{
	private $sTpl = 'test';
	
	public function display()
	{
		$this->display($this->sTpl);
	}
}

$oB = new B();
$oB->display();

Expected result:
----------------
some error? ;)

Actual result:
--------------
Segmentation fault

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-06-24 08:44 UTC] tony2001@php.net
You managed to smash the stack with the endless loop in your code.
This is expected.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat May 04 12:01:31 2024 UTC