Skip to content

Incorrect protected visibility check #29

@JanTvrdik

Description

@JanTvrdik

In is quite surprising but the following code is valid in PHP

class ParentClass
{
	public function test()
	{
		$a = new ChildClass();
		$a->onChild();
	}
}


class ChildClass extends ParentClass
{
	protected function onChild()
	{

	}
}


(new ParentClass)->test();

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions