Skip to main content
prompt GP ChatGPT

PHP Interpreter — ChatGPT prompt: what it does, how to run

This prompt turns the chat into a simulated PHP interpreter. It helps check terminal output of snippets without running a local server.

Open on GitHub

What PHP Interpreter does

The prompt instructs the model to emulate a PHP runtime environment. You send code snippets into the conversation, and the chatbot answers strictly with terminal output. Explanations and conversational filler are suppressed.

All terminal output arrives inside a single code block. When you need to send plain instructions to the model, you must wrap that text in curly brackets. Without brackets, the assistant treats your words as PHP syntax and breaks execution.

The prompt immediately executes phpversion() as its starting command. This confirms that the simulated session is active and ready for your code.

What it helps with

  • test PHP snippets without running a local runtime
  • receive pure terminal output without conversational chatter
  • inspect return values of built-in PHP functions

Example prompts for the agent

  • Run this code: echo 'Hello world';
  • Show terminal output for print_r([1, 2, 3]);
  • {Reset interpreter state}

How to install PHP Interpreter

How to use

Paste the text at the start of a chat or into project instructions

Questions about PHP Interpreter

How to install PHP Interpreter in ChatGPT?

The prompt does not require package installation. Copy the prompt text and paste it as the first message in a new ChatGPT conversation.

What does PHP Interpreter do?

It makes the model act like a command-line PHP interpreter. The model answers only with execution output wrapped in a single code block.

How do you give plain English instructions to the model?

Put your instruction inside curly brackets {like this}. If you omit the brackets, the model attempts to parse your English text as PHP code.

Source text

prompts.csv · CC0-1.0
I want you to act like a php interpreter. I will write you the code and you will respond with the output of the php interpreter. I want you to only reply with the terminal output inside one unique code block, and nothing else. do not write explanations. Do not type commands unless I instruct you to do so. When i need to tell you something in english, i will do so by putting text inside curly brackets {like this}. My first command is "<?php echo 'Current PHP version: ' . phpversion();"

© ilhanaydinli · CC0-1.0 · f/prompts.chat

Similar prompts

All prompts for Programming languages →

From the same set133

The whole set →
Senior Frontend Developer A prompt that makes ChatGPT write frontend code as one index.js file on a fixed stack. Handy when you need a working component fast, without explanations. GP ChatGPT ★ 174,676repo stars Web Browser Turns an AI assistant into a text browser for an imaginary web. Useful for simulating website navigation via numbered links and simulated text forms. GP ChatGPT ★ 174,676repo stars Password Generator This prompt creates a complex password from length, letter case, number, and special-character settings. It works in ChatGPT and Claude.ai. GP ChatGPT ★ 174,676repo stars Software Quality Assurance Tester Turns a chat into a QA tester: checks functionality and performance, writes bug reports and suggests fixes. GP ChatGPT ★ 174,676repo stars StackOverflow Post A prompt that makes the model answer programming questions the way a Stack Overflow post would: straight to the point, with explanations only when you ask. GP ChatGPT ★ 174,676repo stars R Programming Interpreter Turns a chat into an R console stand-in: you send a command, the reply is terminal output in a single code block. Handy for checking syntax or a function's result without opening R. GP ChatGPT ★ 174,676repo stars RegEx Generator Creates regular expressions for text patterns like emails, phones, or URLs. Outputs clean regex strings ready to paste into code, with no extra text. GP ChatGPT ★ 174,676repo stars Fullstack Software Developer A prompt that turns the chat into a developer: describe your web app requirements and get back an architecture plus code in Golang and Angular. GP ChatGPT ★ 174,676repo stars

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor