Page MenuHomePhorge

PHP Pitfalls: mention strlen() deprecation since PHP 8.1
ClosedPublic

Authored by valerio.bozzolan on Apr 2 2023, 19:26.

Details

Summary
  • expand documentation about PHP Pitfalls to mention strlen() in PHP 8.1
  • mention phutil_string_cast()
  • mention phutil_nonempty_string()
  • add a commodity link from PHP Contributors Manual

Ref T15190

Test Plan
  • check with your big eyes for typos

Diff Detail

Repository
rP Phorge
Branch
arcpatch-D25108
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 457
Build 457: arc lint + arc unit

Event Timeline

valerio.bozzolan retitled this revision from Documentation: mention strlen() deprecation since PHP 8.1 - improve a bit PHP Pitfalls to mention strlen() deprecation - mention is_string() benefits - mention phutil_nonempty_string() - link PHP Pitfalls from PHP Contributors Manual to Documentation: mention strlen() deprecation since PHP 8.1.Apr 2 2023, 19:26
valerio.bozzolan edited the summary of this revision. (Show Details)
valerio.bozzolan added inline comments.
src/docs/flavor/php_pitfalls.diviner
63

I moved this text under the section "Check for non-empty strings"

93

I just indented a bit

valerio.bozzolan retitled this revision from Documentation: mention strlen() deprecation since PHP 8.1 to PHP Pitfalls: mention strlen() deprecation since PHP 8.1.Apr 6 2023, 18:34
valerio.bozzolan edited the summary of this revision. (Show Details)
src/docs/flavor/php_pitfalls.diviner
152

↑ That part was just copy-pasted mostly from the already-existing block

↓ This part is new

Note that I like to do NOT mention the stuff phutil_nonempty_stringlike() since it causes extra headaches with incoming objects to many friends. Same for its friend phutil_nonempty_scalar() since it's broken with known scalars (T15239).

This revision is now accepted and ready to land.May 25 2023, 10:58