php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #69760 segmentation fault php5.5.9
Submitted: 2015-06-05 16:11 UTC Modified: 2015-06-06 00:16 UTC
From: sett1ngs at hotmail dot com Assigned: cmb (profile)
Status: Not a bug Package: Scripting Engine problem
PHP Version: 5.5.9 OS: Linux
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: sett1ngs at hotmail dot com
New email:
PHP Version: OS:

 

 [2015-06-05 16:11 UTC] sett1ngs at hotmail dot com
Description:
------------
The script can't choose between outputs function , because there 2 function called outputs and each one in another class ...


host@localhost:/var/www/$ php test.php 
Segmentation fault


Test script:
---------------
<?php
class Connection{

	public $from;
	protected $to;
	private $user = "sub";

	protected function outputs(){

		echo "{$this->user} has connected by {$this->from} to {$this->to}<br>";

	}
}
class Connection2 extends Connection{

	protected $to = "192.168.1.1";

	public function outputs(){

		echo "{$this->user} has connected by {$this->from} to {$this->to} !!!!!!!!<br>";
		$this->outputs();

	}


}

$opject = new Connection2;
$opject->from = "127.0.0.1";
$opject->outputs();
//$opject->outputs();

?>

Expected result:
----------------
declare error 


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2015-06-05 16:12 UTC] sett1ngs at hotmail dot com
-PHP Version: 5.5Git-2015-06-05 (Git) +PHP Version: 5.5.9
 [2015-06-05 16:12 UTC] sett1ngs at hotmail dot com
PHP Version:5.5.9
 [2015-06-05 16:41 UTC] cmb@php.net
-Status: Open +Status: Not a bug -Package: PHP Language Specification +Package: Scripting Engine problem -Assigned To: +Assigned To: cmb
 [2015-06-05 16:41 UTC] cmb@php.net
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.

I suggest you learn about the visibility of members: <http://php.net/manual/en/language.oop5.visibility.php>.
 [2015-06-05 16:46 UTC] cmb@php.net
And wrt. the segfault about object inheritance: <http://php.net/manual/en/language.oop5.inheritance.php>.
 [2015-06-06 00:16 UTC] datibbaw@php.net
You're doing infinite recursion. Did you mean to invoke parent::outputs(); instead?
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Wed Jul 09 11:01:34 2025 UTC