Building modern web apps shouldn't require learning 50 new concepts. Sometimes you just want to write PHP.
Don't get me wrong—Laravel, Symfony, and other frameworks are incredible. But sometimes you're building a simple web app and you find yourself:
What if there was a better way?
Lighthouse is a minimal, predictable PHP micro-framework that embraces the simplicity PHP was meant for. It's designed around one core principle: get productive immediately.
<?php // That's it. Your first route. route('/', function() { return view('home.php', ['message' => 'Hello World!']); });
Instead of forcing everything through controllers, Lighthouse lets you handle form logic directly in views—the way PHP was designed:
<?php // views/contact.php $errors = []; if ($_SERVER['REQUEST_METHOD'] === 'POST') { $email = sanitize_email($_POST['email']); $message = sanitize_string($_POST['message']); if (!validate_email($email)) { $errors[] = 'Invalid email'; } if (empty($errors)) { db_insert('contacts', ['email' => $email, 'message' => $message]); $success = 'Message sent!'; } } ?> <form method="POST"> <?php if ($success ?? false): ?> <div class="success"><?= $success ?></div> <?php endif; ?> <input type="email" name="email" required> <textarea name="message" required></textarea> <button type="submit">Send</button> </form>
Self-contained. Predictable. No magic.
# Get started in 30 seconds lighthouse new my-app cd my-app php -S localhost:8000 -t public/
// CSRF protection built-in <?= csrf_field() ?> // Input sanitization included $clean_input = sanitize_string($_POST['data']); // Rate limiting ready if (!check_rate_limit($_SERVER['REMOTE_ADDR'])) { // Handle rate limit }
// Simple, predictable database operations $users = db_select('users', ['active' => 1]); $user_id = db_insert('users', ['name' => $name, 'email' => $email]); db_update('users', ['last_login' => date('Y-m-d H:i:s')], ['id' => $user_id]);
Here's how you build a complete login system:
<?php // routes.php route('/login', function() { return view('login.php'); }); route('/dashboard', function() { if (!auth_user()) { header('Location: /login'); exit; } return view('dashboard.php'); });
<?php // views/login.php if ($_SERVER['REQUEST_METHOD'] === 'POST') { $email = sanitize_email($_POST['email']); $password = $_POST['password']; $user = db_select_one('users', ['email' => $email]); if ($user && auth_verify_password($password, $user['password'])) { auth_login($user['id']); header('Location: /dashboard'); exit; } $error = 'Invalid credentials'; } ?> <form method="POST"> <?php if ($error ?? false): ?> <div class="error"><?= $error ?></div> <?php endif; ?> <input type="email" name="email" required> <input type="password" name="password" required> <?= csrf_field() ?> <button type="submit">Login</button> </form>
That's it. No controllers, no middleware configuration, no service providers. Just PHP doing what PHP does best.
Lighthouse shines when you're building:
Lighthouse embraces pragmatic PHP development:
# Install the CLI bash -c "$(curl -fsSL https://raw.githubusercontent.com/max-yterb/Lighthouse/main/scripts/install.sh)" # Create your first app lighthouse new my-awesome-app cd my-awesome-app # Start building php -S localhost:8000 -t public/
Lighthouse is actively developed with a focus on:
If you're tired of complex frameworks for simple projects, give Lighthouse a try. It might just remind you why you fell in love with PHP in the first place.
What do you think? Are you ready to try a framework that gets out of your way? Drop a comment below with your thoughts on modern PHP development!

![QQQ short term cycle nearing end; pullback likely to attract buyers [Video]](https://i0.wp.com/editorial.fxsstatic.com/images/i/Equity-Index_Nasdaq-2_Medium.jpg)