Tagged articles
4 articles
Page 1 of 1
Laravel Tech Community
Laravel Tech Community
Apr 12, 2022 · Information Security

Common PHP Weak‑Type Vulnerabilities: MD5 Collision, is_numeric, in_array, switch, and intval Issues

This article explains several PHP weak‑type pitfalls—including MD5 hash collisions, improper handling by is_numeric, unexpected behavior of in_array and switch, and intval casting quirks—showing how they can lead to security problems such as hash collisions, SQL injection, and logic errors.

Hash CollisionPHPWeak Typing
0 likes · 4 min read
Common PHP Weak‑Type Vulnerabilities: MD5 Collision, is_numeric, in_array, switch, and intval Issues
Laravel Tech Community
Laravel Tech Community
Apr 29, 2021 · Backend Development

Understanding PHP Weak Typing Pitfalls and Secure Comparison Practices

The article explains how PHP's weak typing can lead to security vulnerabilities through loose comparisons, demonstrates dangerous examples such as hash, bool, numeric, switch, and array comparisons, and provides safer alternatives using strict operators, hash_equals, input validation, and proper type checks.

ComparisonSecurityWeak Typing
0 likes · 10 min read
Understanding PHP Weak Typing Pitfalls and Secure Comparison Practices