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

  1. Remove passwords, API keys, personal data and private connection strings.
  2. Paste a focused snippet or attach up to three text files, at most 256 KiB each.
  3. 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.

Try it in a chat

Help · Privacy