Close file handles and add files to included files after opening #3968
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.
Fixes bug #76801
Note: This patch largely came from @cmb69 but I discovered that the inclusion of that patch prevented the list of included files from being filled so I've fixed that too.
I also discovered whilst fixing the list of included files that the behaviour of
phpdbg
is different to that ofphp
in that the original script being run was not included viaphpdbg
but is viaphp
:Initial demonstration of files not closed
Script to demonstrate the issue of files not being closed:
Demonstration of included files being incomplete
Test script:
Expected result:
Actual result with PHP:
Actual result with PHPDBG before this patch: