Repository navigation
Fix highlight_string Zend 8.4 HTML and assert() warning parity (#23733, #23731) - #23767
Merged
Merged
Conversation
Match php-src highlight.c <pre><code> wrapper with literal spaces instead of nbsp/br, and emit E_WARNING with assert(): … failed for failing assertions when assert.exception=0. Co-authored-by: Cursor <cursoragent@cursor.com>
This was referenced Jul 27, 2026
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.
Summary
highlight_string()/highlight_file()/show_source()now emit Zend 8.4<pre><code style="color: #000000">wrapper with literal spaces (no , no<br />newline conversion).assert()withassert.exception=0now reportsE_WARNING(2) and message shapeassert(): … failedinstead ofE_USER_WARNING/Assertion failed: …. VM + JIT paths updated.php-src reference
ext/standard/highlight.c/php_highlight.h— HTML emitter (Regression: highlight_string() HTML still lacks Zend <pre> wrapper / uses nbsp (re-#10308, ext/standard/highlight.c) #23733)ext/standard/assert.c—assert_handle_failurewarning channel (Stdlib: assert() failure warns E_USER_WARNING "Assertion failed" — Zend E_WARNING "assert(): … failed" (ext/standard/assert.c) #23731)Verification
Closes #23733
Closes #23731
Made with Cursor