Fixes towards PHP8 and type-hinting#47
Closed
Quix0r wants to merge 7 commits into
Closed
Conversation
- converted old-style array() initialization into "new" [] way
- added primitive type-hints
- changed {} into [] braces
- removed get_magic_quotes_gpc() as it has been removed, maybe sanitizing your input is a bad idea
- type-hints added
8 tasks
Member
|
Thanks for the substantial work here, @Quix0r — this PR was applied as the base of #48 (PHP 8.5 modernization) with credit as a co-author. Two small follow-ups were layered on top: the |
Quix0r
added a commit
to Quix0r/phproxy
that referenced
this pull request
May 27, 2026
Modernizes PHProxy to run on PHP 8.5 and ships a first-class Docker install option. Closes the PHP-8 issue bucket (PHProxy#25, PHProxy#32, PHProxy#38, PHProxy#43, PHProxy#46). PHP 8.5 fixes: - Drop removed get_magic_quotes_gpc(); set stripslashes flag to false - Replace $_iflags{$i} / $dir{$i} curly-brace string offsets with [] - Replace each($_auth_creds) with array_key_first()-based lookup - Guard $_COOKIE['userAgent'] with isset() - Cast trim() inputs for HTTP_REFERER, response headers, cookie domain - ?string nullable params (8.4 deprecation, 8.5 error-on-deprecate) - intdiv() in Punycode loop (no more float-to-int deprecations) - Drop E_STRICT (removed in 8.4) Modernization (from PR PHProxy#47): - Type hints across files/php/functions.inc.php - Short [] array syntax throughout Docker (new): - Dockerfile based on php:8.5-apache, mod_rewrite enabled - docker-compose.yml with dev bind-mount and a prod-mode note - .dockerignore CI (new): - .github/workflows/lint.yml runs php -l on every *.php in php:8.1-cli and php:8.5-cli containers README: - Docker quickstart added above standalone install - PHP requirement bumped to >= 8.1, tested on 8.5 - Modern-site limitation documented (CF/JS-gated sites won't work) Co-Authored-By: Roland Häder (Quix0r) <Quix0r@users.noreply.github.com> Co-Authored-By: dacendo <dacendo@users.noreply.github.com> Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains changes towards PHP8 compatibility:
each()is no longer available, also checking an assignment of a value/reference should not be done anymore[]for arrays instead ofarray()`