php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #55412 static call on non static method
Submitted: 2011-08-12 11:13 UTC Modified: 2011-08-13 04:09 UTC
From: dev at catalint dot ro Assigned:
Status: Not a bug Package: Class/Object related
PHP Version: 5.3.6 OS: CentOs
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: dev at catalint dot ro
New email:
PHP Version: OS:

 

 [2011-08-12 11:13 UTC] dev at catalint dot ro
Description:
------------
$this->me in class "a" should not have 'cata' as a value.

Test script:
---------------
<?php
error_reporting(E_ALL);
ini_set('display_erros','on');
class a{
	public function bar(){
		echo $this->me;
	}
}

class b{
	function foo(){
		a::bar();
	}
}

$b=new b();
$b->me='cata';
$b->foo();

Expected result:
----------------
no echo or error thrown

Actual result:
--------------
cata

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2011-08-13 04:09 UTC] laruence@php.net
-Status: Open +Status: Bogus
 [2011-08-13 04:09 UTC] laruence@php.net
Closing as bogus, this thing is not a static call,  see #55311
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Nov 01 01:01:28 2024 UTC