1.2.518. Has Property Hook

The analyzed code makes use of property hook. They were introduced in PHP 8.4.

<?php

class x {
     private string $p {
             get => $this->p;

             set { $this-> = mb_strtolower($p);}
     }
}

?>

1.2.518.1. Connex PHP features

1.2.518.1.1. Specs

Short name

Php/HasPropertyHook

Rulesets

All, Analyze

Exakat since

2.6.8

PHP Version

With PHP 8.4 and more recent

Severity

Minor

Time To Fix

Quick (30 mins)

Precision

Very high

Available in

Entreprise Edition, Exakat Cloud