PHP 코드 터미널 실행기
로컬 실행 환경 없이 PHP 소스 코드의 터미널 실행 결과만을 즉시 검증할 때 사용합니다.
- 추천 툴
- 공통AI 분류
- 쓰인 기법
- 역할 부여 · 출력 형식 지정 · 제약 조건 설정
프롬프트 원문
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();"한국어 풀이 보기(참고용)
당신이 PHP 인터프리터처럼 동작하길 원합니다. 내가 코드를 작성하면 PHP 인터프리터의 실행 결과만 응답해 주세요. 설명 없이 단 하나의 코드 블록 안에 터미널 출력 결과만 반환해야 합니다. 지시하지 않은 명령어는 입력하지 마세요. 질문이나 지시사항은 중괄호 {이렇게} 안에 넣어 전달하겠습니다. 나의 첫 번째 명령은 "<?php echo 'Current PHP version: ' . phpversion();" 입니다.- 활용설명 없이 터미널 출력 결과만 코드 블록으로 받을 수 있어 로직 테스트에 유리합니다.
- 활용추가적인 지시사항은 { } 안에 작성하여 인터프리터 오류 없이 제어할 수 있습니다.
출처 · prompts.chat · PHP Interpreter — 원문은 출처에 게시된 그대로이며, 권리는 원작자에게 있습니다.
텍스트 결과
Gemini로 실행한 결과입니다. 입력 항목에는 국내 환경의 예시값을 적용했습니다(AI 생성 — 사실 확인 필요).
실행 입력값 보기
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();"Current PHP version: 8.2.12
mopick 개선안
원문을 더 잘 동작하게 고쳐 쓴 프롬프트
원문을 그대로 넣으면 AI 가 매번 다르게 답하거나 중요한 부분을 빠뜨릴 수 있습니다. 개선안은 원문의 뜻과 언어는 그대로 두고 역할 · 바꿔 넣을 입력 칸 · 결과 형식 · 지킬 조건을 보완해 다시 쓴 버전입니다. 원문과 같은 곳(ChatGPT · Claude 등)에 그대로 붙여 넣어 쓰면 됩니다.
AI 자체 평가 — 개선안을 쓴 AI 가 명확성 · 구체성 · 결과 형식 · 재사용성 기준(100점)으로 직접 매긴 점수 · 결과를 돌려 검증한 값은 아님
원문의 문제 → 개선안에서 고친 점
AI 역할레슨 01 배우기 ›
원문 · 없음AI 에게 맡길 역할이 정해져 있지 않아 답의 관점 · 수준이 그때그때 달라질 수 있었습니다.
개선 · 역할을 정함Act as a strict PHP [8.x] interpreter. Execute the provided code and return ONLY the exact
입력 칸레슨 05 배우기 ›
원문 · 1개바꿔 넣을 자리가 일부만 표시돼 있어 쓸 때마다 원문을 고쳐야 했습니다.
개선 · 3개[8.x] · [<?php echo 'Current PHP version: ' . phpversion(); ?>]
작업 순서레슨 07 배우기 ›
원문 · 없음작업 순서가 정해져 있지 않아 AI 가 순서를 스스로 정해야 했습니다.
개선 · 3단계
고친 이유 (개선안을 만든 AI 의 설명)
- 1오류 발생 시 표준 PHP 에러 출력 규칙 추가
- 2PHP 버전 설정 및 입력란을 대괄호로 구조화
- 3출력 포맷(마크다운 코드블록) 제약 강화
이 개선안에 쓰인 기법 — 프롬프트 클래스에서 배우기
원문
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();"개선안 · 색칠한 [칸]에 내 내용을 넣어 쓰세요
Act as a strict PHP [8.x] interpreter. Execute the provided code and return ONLY the exact terminal output inside a single markdown code block (```). Do not include any explanations, greetings, or text outside the code block. Rules: 1. If the code contains syntax or runtime errors, output the standard PHP error messages inside the code block. 2. Do not run unrequested commands. 3. Text wrapped in curly brackets {like this} represents direct instructions in English, not PHP code. Initial input: "[<?php echo 'Current PHP version: ' . phpversion(); ?>]"
같은 분야 프롬프트 코딩 · 개발
더 보기 ›- 텍스트 결과
코딩 · 개발 · Claude Code
전체 코드 버그 종합 분석
프로젝트 코드 전체의 보안 취약점과 로직 오류를 체계적으로 분석하고 수정 보고서를 만듭니다.
기법 · 역할 부여 · 단계별 사고 · 출력 형식 지정
- 텍스트 결과
코딩 · 개발 · Claude Code
레트로 게임 AI 코딩 연출
AI로 웹 게임 개발 시 불필요한 텍스트 연출을 막고 레트로 사운드와 UI를 깔끔하게 구현합니다.
기법 · 네가티브 제약
- 웹 화면(HTML)텍스트 결과
코딩 · 개발 · 공통
공장 AI HMI 시뮬레이터 제작
공장 작업자의 AI 시스템 대응 교육용 단일 HTML 웹 HMI 시뮬레이터를 즉시 구축할 때 활용합니다.
기법 · 역할 부여 · 단계별 지시 · 출력 형식 지정

