php / php/php-src

`print_r` should not produce a fatal error

Open
#7,922 4 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

  • #7964 by @cmb69 — closed without merging
Category: Engine Feature Status: Verified
Dominant language
C
Stars
40.4k
Forks
8.1k
Avg merge
2d 13h
Merged PRs (30d)
96

Description

Description

print_r (and any function calling __debugInfo()) should not produce a fatal error, it should generate an \Error exception instead

demo https://3v4l.org/YTfSl

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the reproduction at https://3v4l.org/YTfSl and trace the print_r and __debugInfo() entry points in the PHP source; no repository file or test is named in the issue. Done means these calls generate an Error exception instead of a fatal error, with regression coverage for the demonstrated case.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.