PHP: Web Framework Of The Future
powered by trealla prolog

"php: a fractal of good design"

PHP stands for Prolog Home Page.
PHP is Prolog implemented in C, compiled to Wasm, speaking CGI Wasm components, executed by a Rust runtime, interpreting PHP-style templates

open source: github.com/guregu/php

examples

Trealla Prolog playground

✨ Run Trealla straight from your browser!

USER TESTIMONIALS


Source Code

<html>
	<head>
		<title>PHP: Prolog Home Page</title>
		<style>
		a, a:visited {
			color: navy;
		}
		</style>
	</head>
	<body>
	<marquee style='font-size: 10vh;' scrollamount=10>
		<i>PHP: Web Framework Of The Future</i>
		<br>
		powered by
		<!-- wow!! -->
		<?php current_prolog_flag(dialect, Dialect), write(Dialect). ?> prolog
	</marquee>

	<h2>
		"php: a fractal of good design"
	</h2>

	<p id="intro">
		PHP stands for Prolog Home Page.<br>
		PHP is <a href="https://github.com/trealla-prolog/trealla">Prolog implemented in C</a>,
		<a href="https://github.com/guregu/trealla">compiled to Wasm</a>,
		speaking <s>CGI</s> <a href="https://github.com/guregu/trealla-spin">Wasm components</a>,
		executed by a <a href="https://github.com/fermyon/spin">Rust runtime</a>,
		interpreting PHP-style templates
	</p>

	<p>
		open source: <a href="https://github.com/guregu/php">github.com/guregu/php</a>
	</p>

	<h3>examples</h3>
	<nav>
		<ul>
			<li>💻 <a href="/test.html">phpinfo/0</a></li>
			<li>🔮 <a href="/oracle.html">ask the oracle</a></li>
			<li>🌝 <a href="/moon.html">moon phases</a></li>
			<li>🌮 <a href="/tacos.html">taco solver</a></li>
			<li>✍️ <a href="/guestbook.html">guestbook (via postgres)</a></li>
		</ul>
	</nav>

	<section>
		<h3>Trealla Prolog playground</h3>
		<p>✨ Run <a href="trealla.html">Trealla straight from your browser</a>!</p>
	</section>

	<h3>USER TESTIMONIALS</h3>
	<ul>
		<li>"Dear god", "I'm so happy they left my beloved Python undefiled" — <a href="https://news.ycombinator.com/item?id=34287270">hacker news</a></li>
	</ul>

	<hr>

	<!-- is this a quine? -->
	<section>
		<h2>Source Code</h2>
		<pre><?=Source current_file(File), read_file_to_string(File, Source, []) ?></pre>
	</section>

	<hr>
	<footer>
		powered by <a href="https://github.com/guregu/php">php</a>
	</footer>
	</body>
</html>