kalessil / phpinspectionsea

A Static Code Analyzer for PHP (a PhpStorm/Idea Plugin)

Home Page:https://plugins.jetbrains.com/plugin/7622?pr=phpStorm

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Substring comparison flaws with hex characters

Stevehans opened this issue · comments

Subject Details
Plugin Php Inspections (EA Ultimate), 2023.1
Language level e.g. PHP 7.3

Current behaviour

if(substr($fileContents,0,3) === "\xff\xd8\xff")

Reports that the length doesn't match

Expected behaviour

Should not complain as the length is correct.