Understand code one step at a time
Give a small example and explain what you expected. The language, runtime and exact error help the assistant focus on the relevant part.
A prompt to adapt
Explain this PHP function step by step for a beginner. Describe its inputs, return value and any edge cases. Do not change it yet: [paste the function]
How to approach it
- Remove passwords, API keys, personal data and private connection strings.
- Paste a focused snippet or attach up to three text files, at most 256 KiB each.
- Ask for a minimal example or a proposed fix. Run it in your own test environment before using it in production.
A practical example
For a failing function, include a sample input, the actual result and the result you expected. Ask the assistant to explain the difference before proposing changes.
The chat does not execute your project or verify its tests. An explanation or suggested fix can be wrong.