Skip to content

Dynamic properties are deprecated in PHP 8.2 #99

@markseuffert

Description

@markseuffert

Hi, I tested the highlighter with PHP 8.2 today and found two potential issues.

Code in Highlighter::__construct() initialises two properties which don't exist in class RegExMatch:

$this->lastMatch = new RegExMatch(array());
$this->lastMatch->type = "";
$this->lastMatch->rule = null;

Code in Terminators::exec() initialises another property RegExMatch::extra, but apparently is never used:

$match->extra = array($this->mode->illegal, $this->mode->terminator_end);

Let me know if you need more information. Thanks for investigating.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugphp-versionIssues dealing with different PHP versions

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions