Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,125 changes: 1,125 additions & 0 deletions public/css/app.css

Large diffs are not rendered by default.

371 changes: 371 additions & 0 deletions public/js/app.js

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions resources/views/components/feature-card.blade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
@props(['title', 'description'])
<div class="feature-card">
<h3>{{ $title }}</h3>
<p>{{ $description }}</p>
{{ $slot }}
</div>
27 changes: 27 additions & 0 deletions resources/views/partials/badge.blade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<section id="badge" class="reveal" aria-labelledby="badge-heading">
<h2 id="badge-heading">Show Your Support</h2>

<p>Add this badge to your README. Let the mass know.</p>

<div class="badge-showcase">
<a href="https://whyphp.dev" target="_blank" class="badge-preview" id="badge-preview-img">
<img src="https://img.shields.io/badge/Why_PHP-in_2026-7A86E8?style=flat-square&labelColor=18181b" alt="Why PHP in 2026">
</a>
</div>

<div class="os-selector">
<button class="os-tab active" data-format="md">Markdown</button>
<button class="os-tab" data-format="html">HTML</button>
</div>

<div class="os-selector">
<button class="os-tab active" data-style="flat-square">Flat Square</button>
<button class="os-tab" data-style="flat">Flat</button>
<button class="os-tab" data-style="for-the-badge">For the Badge</button>
</div>

<div class="code-block">
<button class="copy-btn" id="badge-copy-btn">copy</button>
<pre><code id="badge-code-output">[![Why PHP](https://img.shields.io/badge/Why_PHP-in_2026-7A86E8?style=flat-square&labelColor=18181b)](https://whyphp.dev)</code></pre>
</div>
</section>
44 changes: 44 additions & 0 deletions resources/views/partials/ecosystem.blade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
<section id="ecosystem" class="reveal" aria-labelledby="ecosystem-heading">
<h2 id="ecosystem-heading">Ecosystem</h2>

<p>Modern PHP isn't just better. It's unrecognizable from its past.</p>

<div class="terminal-container">
<div class="terminal-header">
<div class="terminal-title">~/projects/myapp</div>
</div>
<div class="terminal-body" id="terminal-output">
<div class="terminal-line prompt"><span class="dollar">$</span> <span class="cmd">laravel</span> <span class="arg">new myapp</span></div>
<div class="terminal-line output"></div>
<div class="terminal-line ascii"> <span class="info">_ _</span></div>
<div class="terminal-line ascii"> <span class="info">| | | |</span></div>
<div class="terminal-line ascii"> <span class="info">| | __ _ _ __ __ ___ _____| |</span></div>
<div class="terminal-line ascii"> <span class="info">| | / _` | '__/ _` \ \ / / _ \ |</span></div>
<div class="terminal-line ascii"> <span class="info">| |___| (_| | | | (_| |\ V / __/ |</span></div>
<div class="terminal-line ascii"> <span class="info">|______\__,_|_| \__,_| \_/ \___|_|</span></div>
<div class="terminal-line output"></div>
<div class="terminal-line output"> Creating a <span class="version">laravel/laravel</span> project...</div>
<div class="terminal-line output"></div>
<div class="terminal-line success"> <span class="checkmark">✓</span> Application ready in <span class="path">[myapp]</span>.</div>
<div class="terminal-line success"> <span class="checkmark">✓</span> Built with love.</div>
<div class="terminal-line prompt"><span class="terminal-cursor"></span></div>
</div>
<div class="terminal-tabs">
<button class="terminal-tab active" data-terminal="laravel">Laravel</button>
<button class="terminal-tab" data-terminal="symfony">Symfony</button>
<button class="terminal-tab" data-terminal="composer">Composer</button>
<button class="terminal-tab" data-terminal="phpstan">PHPStan</button>
<button class="terminal-tab" data-terminal="pest">Pest</button>
<button class="terminal-tab" data-terminal="phpunit">PHPUnit</button>
<button class="terminal-tab" data-terminal="pint">Pint</button>
<button class="terminal-tab" data-terminal="rector">Rector</button>
</div>
<div class="terminal-info" id="terminal-info">
<a href="https://laravel.com" target="_blank" rel="noopener" id="terminal-link">
<strong id="terminal-tool-name">Laravel</strong>
<span id="terminal-tool-desc">Rails/Next.js for PHP</span>
<span class="arrow">→</span>
</a>
</div>
</div>
</section>
47 changes: 47 additions & 0 deletions resources/views/partials/features.blade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
<section id="features" class="reveal" aria-labelledby="features-heading">
<h2 id="features-heading">The features that make PHP shine</h2>

<p>Not one trick. A whole toolkit for code that's type-safe, expressive, and a joy to maintain.</p>

<div class="feature-grid">
<x-feature-card title="Enums" description="Type-safe constants that carry values and behavior.">
<pre><code><span style="color:#c678dd;">enum</span> <span style="color:#e5c07b;">Status</span>: <span style="color:#e5c07b;">string</span>
{
<span style="color:#c678dd;">case</span> <span style="color:#e06c75;">Published</span> = <span style="color:#98c379;">'published'</span>;
}</code></pre>
</x-feature-card>
<x-feature-card title="Traits" description="Compose reusable behavior across unrelated classes.">
<pre><code><span style="color:#c678dd;">final class</span> <span style="color:#e5c07b;">Book</span>
{
<span style="color:#c678dd;">use</span> <span style="color:#e5c07b;">HasTimestamps</span>, <span style="color:#e5c07b;">HasSlug</span>;
}</code></pre>
</x-feature-card>
<x-feature-card title="match" description="Exhaustive, strict branching with no fall-through.">
<pre><code><span style="color:#e06c75;">$label</span> = <span style="color:#c678dd;">match</span> (<span style="color:#e06c75;">$status</span>) {
<span style="color:#e5c07b;">Status</span>::<span style="color:#e06c75;">Draft</span> => <span style="color:#98c379;">'Draft'</span>,
<span style="color:#e5c07b;">Status</span>::<span style="color:#e06c75;">Published</span> => <span style="color:#98c379;">'Live'</span>,
};</code></pre>
</x-feature-card>
<x-feature-card title="readonly" description="Immutability enforced by the language, not convention.">
<pre><code><span style="color:#c678dd;">final readonly class</span> <span style="color:#e5c07b;">Money</span>
{
<span style="color:#c678dd;">public function</span> <span style="color:#61afef;">__construct</span>(
<span style="color:#c678dd;">public</span> <span style="color:#e5c07b;">int</span> <span style="color:#e06c75;">$amount</span>,
) {}
}</code></pre>
</x-feature-card>
<x-feature-card title="Named arguments" description="Order-free, self-documenting calls.">
<pre><code><span style="color:#c678dd;">new</span> <span style="color:#e5c07b;">Book</span>(
title: <span style="color:#98c379;">'Modern PHP'</span>,
status: <span style="color:#e5c07b;">Status</span>::<span style="color:#e06c75;">Draft</span>,
);</code></pre>
</x-feature-card>
<x-feature-card title="Nullsafe" description="Chain through possibly-null values without nested checks.">
<pre><code><span style="color:#e06c75;">$country</span> = <span style="color:#e06c75;">$user</span>?-><span style="color:#e06c75;">address</span>?-><span style="color:#e06c75;">country</span>;</code></pre>
</x-feature-card>
<x-feature-card title="Attributes" description="Structured, first-class metadata read at runtime.">
<pre><code><span style="color:#5c6370;">#[</span><span style="color:#e5c07b;">Route</span>(<span style="color:#98c379;">'/books'</span>, methods: [<span style="color:#98c379;">'GET'</span>])<span style="color:#5c6370;">]</span>
<span style="color:#c678dd;">public function</span> <span style="color:#61afef;">index</span>(): <span style="color:#e5c07b;">View</span></code></pre>
</x-feature-card>
</div>
</section>
33 changes: 33 additions & 0 deletions resources/views/partials/floating.blade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<a href="https://github.com/nunomaduro/whyphp.dev" target="_blank" rel="noopener" class="floating-cta-left" aria-label="Edit this site on GitHub">
<svg viewBox="0 0 24 24"><path d="M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z"/></svg>
Edit this site
</a>

<button class="floating-cta" id="share-btn" aria-label="Share this page">
<svg viewBox="0 0 24 24"><path d="M18 16.08c-.76 0-1.44.3-1.96.77L8.91 12.7c.05-.23.09-.46.09-.7s-.04-.47-.09-.7l7.05-4.11c.54.5 1.25.81 2.04.81 1.66 0 3-1.34 3-3s-1.34-3-3-3-3 1.34-3 3c0 .24.04.47.09.7L8.04 9.81C7.5 9.31 6.79 9 6 9c-1.66 0-3 1.34-3 3s1.34 3 3 3c.79 0 1.5-.31 2.04-.81l7.12 4.16c-.05.21-.08.43-.08.65 0 1.61 1.31 2.92 2.92 2.92s2.92-1.31 2.92-2.92-1.31-2.92-2.92-2.92z"/></svg>
Spread the word
</button>

<div class="share-modal-overlay" id="share-modal">
<div class="share-modal">
<h3>Spread the word</h3>
<div class="share-modal-options">
<a href="#" class="share-modal-option" id="modal-share-twitter" target="_blank" rel="noopener">
<svg viewBox="0 0 24 24" fill="currentColor"><path d="M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z"/></svg>
Twitter / X
</a>
<a href="#" class="share-modal-option" id="modal-share-bluesky" target="_blank" rel="noopener">
<svg viewBox="0 0 24 24" fill="currentColor"><path d="M12 10.8c-1.087-2.114-4.046-6.053-6.798-7.995C2.566.944 1.561 1.266.902 1.565.139 1.908 0 3.08 0 3.768c0 .69.378 5.65.624 6.479.815 2.736 3.713 3.66 6.383 3.364.136-.02.275-.039.415-.056-.138.022-.276.04-.415.056-3.912.58-7.387 2.005-2.83 7.078 5.013 5.19 6.87-1.113 7.823-4.308.953 3.195 2.05 9.271 7.733 4.308 4.267-4.308 1.172-6.498-2.74-7.078a8.741 8.741 0 0 1-.415-.056c.14.017.279.036.415.056 2.67.297 5.568-.628 6.383-3.364.246-.828.624-5.79.624-6.478 0-.69-.139-1.861-.902-2.206-.659-.298-1.664-.62-4.3 1.24C16.046 4.748 13.087 8.687 12 10.8z"/></svg>
Bluesky
</a>
<a href="#" class="share-modal-option" id="modal-share-linkedin" target="_blank" rel="noopener">
<svg viewBox="0 0 24 24" fill="currentColor"><path d="M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433c-1.144 0-2.063-.926-2.063-2.065 0-1.138.92-2.063 2.063-2.063 1.14 0 2.064.925 2.064 2.063 0 1.139-.925 2.065-2.064 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z"/></svg>
LinkedIn
</a>
<button class="share-modal-option" id="modal-share-copy">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"/><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"/></svg>
Copy link
</button>
</div>
</div>
</div>
9 changes: 9 additions & 0 deletions resources/views/partials/footer.blade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<footer>
<div class="footer-row">
<span>Made by <a href="https://x.com/enunomaduro" target="_blank" rel="noopener">Nuno Maduro</a></span>
<div class="footer-links">
<a href="https://php.net" target="_blank" rel="noopener">php.net</a>
<a href="https://thephp.foundation" target="_blank" rel="noopener">PHP Foundation</a>
</div>
</div>
</footer>
Loading