[php-src] PR #16971: allow urlencode(int)

From: Date: Wed, 27 Nov 2024 19:37:38 +0000
Subject: [php-src] PR #16971: allow urlencode(int)
Groups: php.git-pulls 
Request: Send a blank email to git-pulls+get-29805@lists.php.net to get a copy of this message
Pull Request: https://github.com/php/php-src/pull/16971 Author: divinity76 in strict mode it's kindof annoying to have to cast-to-string when you have a string|int variable you need to urlencode. There is no ambiguity as to how to urlencode integers, so it shouldn't be a problem. ``` TypeError: urlencode(): Argument #1 ($string) must be of type string, int given ``` has happened to me enough times now that I bothered to make PR to allow it. Fwiw the integer path could be micro-optimized to bypass php_raw_url_encode() entirely, at least when the integer is not negative, but for brevity, I didn't bother micro-optimizing it.

« previous php.git-pulls (#29805) next »