1.2.18. Accessing Private

List of calls to private properties/methods that will compile but yield some fatal error upon execution.

<?php

class a {
    private $a;
}

class b extends a {
    function c() {
        $this->a;
    }
}

?>

1.2.18.1. Specs

Short name

Classes/AccessPrivate

Rulesets

All, Analyze

Exakat since

0.8.4

PHP Version

All

Severity

Major

Time To Fix

Quick (30 mins)

Precision

Very high

Features

class, private

Available in

Entreprise Edition, Exakat Cloud