Real life example
Write and fix a function from inline chat
Here’s an example function that GitHub Copilot wrote for me:

Fix a function from chat
We’ll use the same function as the previous example but we’ll just tell Copilot Chat to fix it with very few words.
Explain a function
You can ask Copilot to explain code to you. Here’s how it explains our example function.
Generate automated tests
You can even ask Copilot to create tests for you. Here’s how it creates a simple unit test for our PHP function.