php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #10068 referenced objects
Submitted: 2001-03-29 19:46 UTC Modified: 2001-12-14 15:00 UTC
From: salna at ktl dot mii dot lt Assigned:
Status: Closed Package: Scripting Engine problem
PHP Version: 4.0.4pl1 OS: win98, debian 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: salna at ktl dot mii dot lt
New email:
PHP Version: OS:

 

 [2001-03-29 19:46 UTC] salna at ktl dot mii dot lt
<? 

class objekt
{
	var $property;

	function objekt()
	{
		$this->property = 'okey';
	}

	function property()
	{
		echo "<br>$this->property";
	}
	function &gb_objekt()
	{
		$obj =& $GLOBALS['gb_objekt'];
		if (get_class($obj) != 'objekt')
		{
			$obj = new objekt();
		}
		return $obj;
	}
}


$gb_objekt =& objekt::gb_objekt();

// next line crashes 
$gb_objekt->property();


$objekt =& objekt::gb_objekt();
$objekt->property = 'more okey';
$objekt->property();

$gb_objekt->property();


?>

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-03-29 20:18 UTC] salna at ktl dot mii dot lt
checked new php version
still keeps crashing
 [2001-04-28 14:57 UTC] derick@php.net
Can reproduce this with CVS of 24-04-2001:

Backtrace:
Starting program: /dat/install/php/php-4.0.6dev/php -q bug10068.php

Program received signal SIGSEGV, Segmentation fault.
0x80b7f30 in call_overloaded_function (T=0xbfffe764, arg_count=0,
    return_value=0x811da4c) at ./zend_execute.c:850#1  0x80bb7eb in execute (op_array=0x813958c) at ./zend_execute.c:1556
850#2  0x809f6b8 in zend_execute_scripts (type=8, file_count=3) at zend.c:743
#3  0x805aa28 in php_execute_script (primary_file=0xbffffab4) at main.c:1205
#4  0x8059241 in main (argc=3, argv=0xbffffb14) at cgi_main.c:735
#5  0x400b69cb in __libc_start_main (main=0x8058ba4 <main>, argc=3,
    argv=0xbffffb14, init=0x8057a50 <_init>, fini=0x80c07fc <_fini>,
    rtld_fini=0x4000ae60 <_dl_fini>, stack_end=0xbffffb0c)
    at ../sysdeps/generic/libc-start.c:92
(gdb)
 [2001-12-14 15:00 UTC] yohgaki@php.net
It seems it does not allowed anymore.
Closed.
 [2001-12-14 15:00 UTC] yohgaki@php.net
It seems it is not allowed anymore.
Closed.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Wed May 07 05:01:27 2025 UTC