{"slug": "vibephp", "title": "VibePHP", "summary": "VibePHP, a satirical PHP runtime that uses AI to simulate code execution without actually running it, was announced. The runtime invents database results, system calls, and other data on the fly, trading correctness and performance for perceived value. Its creators claim the 700,000% increase in perceived value offsets the $0.0063 per request cost and 7-second latency.", "body_md": "VibePHP is a next-generation PHP runtime and web server that runs PHP faster* and better*.\n\nThere is no interpreter. There is no compiler. When a request comes in, your PHP source is handed to an AI that reads it, runs it **in its head**, makes up whatever it needs to (the database, the clock, the network, the truth), and hands back the HTTP response it reckons the code *would* have produced.\n\nIt is not deterministic. It is not cheap. It is not correct. It is, however, very vibe.\n\n``` php\n<?php\n$posts = $db->query('SELECT * FROM posts ORDER BY published_at DESC');\n// there is no $db. there is no database. there are no posts.\n// the AI will invent five believable ones anyway. ✨\n```\n\n** debatable*\n\nAn engine built for 2026 and beyond. PHP-FPM is stable, FrankenPHP is fast, VibePHP brings all the rest:\n\n- Hype\n- Generics\n- Async/await\n- Inline Go or Rust\n\nVibePHP has no parser. Your code is never compiled, only *understood*. The contract is void, and so is every constraint that ever held the language back. Generics work because nothing stops them. So does any syntax you can dream up.\n\n``` php\nclass Prices<K: Stringable, V>\n{\n    private Map<K, V> $store = {};\n\n    public async function fetchAll(K ...$symbols): Map<K, V>\n    {\n        // Inline Go mixed with PHP, who knows what this does except the AI\n        return go {\n            ch := make(chan V)\n            for _, sym := range $symbols { go func() { ch <- await fetchPrice(sym) }() }\n            for _, sym := range $symbols { $this->store[sym] = <-ch }\n            return $this->store\n        };\n    }\n}\n```\n\nWe benchmarked VibePHP against industry-leading runtimes. The numbers speak for themselves.\n\n| Runtime | Latency (p50) | Cost / request |\n|---|---|---|\n| nginx + PHP-FPM | ~1 ms | ~$0.00000x |\n| FrankenPHP | ~1 ms | ~$0.00000x |\nVibePHP |\n~7 s |\n~$0.0063 |\n\nThe [Labor Illusion study](https://www.hbs.edu/faculty/Pages/item.aspx?num=40158) (Buell & Norton, Harvard Business School) found that people value a service up to **8% more** when they can see it working for them, even *preferring* the slower version that returned identical results. VibePHP increases the perceived value of your PHP website by 700,000% which offsets the increased cost per request. It is a win-win.\n\n- Set an\n`OPENAI_API_KEY`\n\nin`.env`\n\n- Create an\n`index.php`\n\nfile in the`vibe/`\n\ndirectory:\n\n```\n<?php\necho \"Hello, world! The time is \" . date('H:i:s');\n```\n\n- Run\n`php artisan vibe`\n\n- Visit your PHP website at\n[http://localhost:8000](http://localhost:8000)\n\nVibePHP itself is implemented using PHP, Laravel, [ laravel/ai](https://laravel.com/ai), and GPT/Claude.\n\n```\n   GET /posts/42\n        │\n        ▼\n┌───────────────────┐     reads the file, doesn't run it\n│     Laravel       │ ───────────────────────────────────────┐\n│  routes URL→file  │                                        │\n└───────────────────┘                                        ▼\n                                              ┌──────────────────────────────┐\n   HTTP response  ◄──── {status,headers,body} │      VibePhpRuntime (AI)     │\n        ▲                                     │  \"i am the php engine now\"   │\n        │                                     │  • executes in its head      │\n        └──────────────────────────────────── │  • invents missing data      │\n                                              │  • reads includes via a tool │\n                                              └──────────────────────────────┘\n```\n\n**A request arrives.** The catch-all route maps the URL to a file in`vibe/`\n\n(`/about`\n\n→`about.php`\n\n), falling back to`index.php`\n\nas a front controller.**The source is read, not run.** Code + the full HTTP request context get handed to the`VibePhpRuntime`\n\nagent.**The AI \"executes\" it.** It follows the control flow, fetches`include`\n\n/`require`\n\nd files on demand via the`ReadVibeFile`\n\ntool, and**improvises every missing piece**— DB rows,`date()`\n\n,`rand()`\n\n, API payloads — plausibly and with full commitment.**It returns** Laravel sends that back as a real HTTP response.`{ status, headers, body }`\n\n.`header('Location: …')`\n\nbecomes a 302.`header('Content-Type: application/json')`\n\nis honored. The whole charade holds up.\n\nThe core of the engine is implemented as a [Laravel AI agent](https://laravel.com/docs/13.x/ai-sdk#agents) in [ App\\Ai\\Agents\\VibePhpRuntime](/mnapoli/vibephp/blob/main/app/Ai/Agents/VibePhpRuntime.php). It uses a\n\n[custom tool](/mnapoli/vibephp/blob/main/app/Ai/Tools/ReadVibeFile.php)to read files from the\n\n`vibe/`\n\ndirectory on demand, so that includes and requires work as expected.- Clone this repo\n- Set an\n`OPENAI_API_KEY`\n\nin`.env`\n\n- Install the project with\n`composer run setup`\n\n- Start the server with\n`php artisan vibe`\n\n- Visit\n[http://localhost:8000](http://localhost:8000)\n\nThen wander around:\n\n| Route | What \"happens\" |\n|---|---|\n`/` |\nHome page listing 5 freshly-hallucinated blog posts |\n`/about` |\nAn about page (uptime: a number the AI feels good about) |\n`/posts/42` |\nA full article that has never existed until you asked |\n`/api/status` |\nJSON endpoint with imagined load metrics |\n\nRefresh any of them. It's never the same site twice.\n\nDrop a `.php`\n\nfile in `vibe/`\n\nand it's instantly \"served.\" Write whatever PHP you want — the more it relies on a database, filesystem, or external API that **isn't there**, the better the vibe.\n\n``` php\n<?php // vibe/weather.php\nheader('Content-Type: application/json');\n$city = $_GET['city'] ?? 'Paris';\n$temp = fetchTemperatureFromSomeApiThatDoesNotExist($city);\necho json_encode(['city' => $city, 'temp_c' => $temp]);\n```\n\n`fetchTemperatureFromSomeApiThatDoesNotExist()`\n\nis not defined anywhere. It will return a believable temperature regardless. You're welcome.\n\n`config/vibe.php`\n\n:\n\n| Key | Env | Default | Meaning |\n|---|---|---|---|\n`docroot` |\n`VIBE_DOCROOT` |\n`vibe/` |\nWhere your \"executable\" PHP lives |\n`model` |\n`VIBE_MODEL` |\nprovider default | Which brain interprets your code |\n\nThe provider (OpenAI) is set on the `App\\Ai\\Agents\\VibePhpRuntime`\n\nagent via `laravel/ai`\n\n.\n\nRunning VibePHP on your own machine is fine, but it's not web scale. Vibe Cloud is fully managed, serverless VibePHP hosting. Deploy with `vibe up`\n\nand focus on running your business.\n\nVibe Cloud doesn't bill you for servers, containers, or even functions. It bills you for **particles**.\n\n**1 particle = 1 MB of memory.** Your app's footprint is measured to the megabyte, in real time.**Particles autoscale per MB.** Allocate another array, spawn another particle. Free a string, the particle decays. You pay for exactly the memory you're using, sampled continuously, billed per particle-millisecond.**Memory is quantized.** You cannot allocate half a megabyte. There is no`0.5`\n\nparticle.**Heisenberg Tier (Enterprise).** On our top tier, you can know either how much memory your app is using*or*how much it costs. Never both at once.\n\nWhile the model is \"executing\" your PHP, your CPU is sitting idle for whole seconds, politely waiting on an inference API. That's billions of wasted cycles, per request, per particle.\n\nVibe Cloud puts those idle cycles to work with **Speculative Pre-Vibing**.\n\nWhile your request is out at the inference API, every spare core races ahead to *pre-hallucinate the response to the NEXT request that might be received*. By the time the user clicks to another page, the page is already rendered. Zero perceived latency, and the cycles were *reclaimed*, which goes on the sustainability report. Vibe Cloud is proud to be **carbon-neutral-adjacent**.", "url": "https://wpnews.pro/news/vibephp", "canonical_source": "https://github.com/mnapoli/vibephp", "published_at": "2026-06-26 19:14:18+00:00", "updated_at": "2026-06-26 19:35:26.150734+00:00", "lang": "en", "topics": ["artificial-intelligence", "large-language-models", "ai-tools"], "entities": ["VibePHP", "Laravel", "OpenAI", "GPT", "Claude", "PHP", "FrankenPHP", "PHP-FPM"], "alternates": {"html": "https://wpnews.pro/news/vibephp", "markdown": "https://wpnews.pro/news/vibephp.md", "text": "https://wpnews.pro/news/vibephp.txt", "jsonld": "https://wpnews.pro/news/vibephp.jsonld"}}