Repository navigation
Document DEBUG_BACKTRACE_PROVIDE_OBJECT as inert for debug_print_backtrace() - #5217
Merged
Merged
Conversation
lacatoire
force-pushed
the
debug_print_backtrace_document
branch
from
August 21, 2026 09:59
e9b46ef to
147506b
Compare
lacatoire
force-pushed
the
debug_print_backtrace_document
branch
from
August 21, 2026 14:21
147506b to
d7ce0c2
Compare
KentarouTakeda
added a commit
to php/doc-ja
that referenced
this pull request
Oct 4, 2026
* errorfunc を原文の変更に追従 (2ファイル) errorfunc の 2 ファイルを原文の変更に追従しました。これで errorfunc モジュールの未訳・要更新はなくなります。 原文では次の変更がありました。 - `error_get_last()` の戻り値に、PHP 8.5.0 以降は `fatal_error_backtraces` が有効なとき、致命的なエラーのバックトレースを持つ `"trace"` キーが含まれることが追記されました(php/doc-en@cd40b08、php/doc-en#5883) - `debug_print_backtrace()` の `options` に、`debug_backtrace()` との互換性のために指定できるが効果のない `DEBUG_BACKTRACE_PROVIDE_OBJECT` が追記されました(php/doc-en@41911b4、php/doc-en#5217) ## 対象ファイル reference/errorfunc/ (2) — functions/debug-print-backtrace.xml, functions/error-get-last.xml * debug_print_backtrace() の DEBUG_BACKTRACE_IGNORE_ARGS の説明の誤りを修正 「メモリを節約する」を逆の意味に訳していた誤りを修正しました。
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.
debug_print_backtrace()accepts the same$optionsasdebug_backtrace(), but the manual only documentsDEBUG_BACKTRACE_IGNORE_ARGS. The linked issue asks whetherDEBUG_BACKTRACE_PROVIDE_OBJECTdoes anything at all.It does not. Measured on PHP 8.5.4, with an object method in the stack:
ZEND_FUNCTION(debug_print_backtrace)inZend/zend_builtin_functions.cbuilds the backtrace array, renders it withzend_trace_to_string(), writes the string and frees the array. The option does populate theobjectkey of that array, but the rendering never reads it and the array is discarded, so nothing is observable. Consistently with that,debug_print_backtrace()defaults to0, whiledebug_backtrace()defaults toDEBUG_BACKTRACE_PROVIDE_OBJECT.The row therefore documents the option as accepted and inert, rather than describing an effect a reader cannot observe. Whether passing it should be deprecated is a php-src question and is not addressed here.
Fixes: #4734