PHP

Share PHP code online.

Share PHP functions, Laravel controllers, or WordPress hooks: highlighted and shareable without spinning up a gist.

textdrop.sh/xk4mR2
1php declare(strict_types=1);23namespace App\Http\Controllers;45use App\Models\User;6use Illuminate\Http\JsonResponse;7use Illuminate\Http\Request;89final class UserController extends Controller10{11    public function show(int $id): JsonResponse12    {13        $user = User::findOrFail($id);14        $this->authorize('view', $user);1516        return response()->json([17            'id'    => $user->id,18            'name'  => $user->name,19            'email' => $user->email,20        ]);21    }22}
Every paste includes

PHP syntax highlighting

Paste PHP code and get a shareable link with full syntax highlighting, server-side rendered with no JavaScript overhead.

Burn after read

Deleted on first open. Can't be viewed twice.

Password protection

Add a password for end-to-end encryption with no raw key stored.

Configurable expiry

Set pastes to expire after 1 hour, 1 day, 7 days, or up to 30 days. Gone when you say so.

No account needed

No sign-up, no email, no ads. Paste and share in seconds.

How it works
Plain Text
Markdown
Code
DB_HOST=db-01.prod.internal
DB_USER=api_svc
DB_PASS=xK9$mP2!qR7nLw2
REDIS_URL=redis://:abc@cache:6379
delete after setup — expires 1hr
7 days
Share
textdrop.sh/
7 days · plain text
Use cases
  • 01Share Laravel controller code
  • 02Send WordPress plugin hooks
  • 03Share typed PHP function signatures
  • 04Distribute Composer package snippets
  • 05Send database migration scripts
FAQ
Does the PHP grammar support PHP 8.3 syntax?+

Yes. Named arguments, fibers, enums, intersection types, and readonly classes are all supported.

Is there a size limit?+

Pastes up to 5 MB are supported.

Is my PHP code encrypted?+

Yes. AES-256-GCM encryption runs in your browser before upload. Non-password pastes store the raw data key server-side for simple sharing and raw access; password-protected pastes keep the raw key out of the server.

Other languages
Drop your code