🚀 NOW LIVE ON CHROME WEB STORE!

PHPLocator

Click to Code for PHP
Alt+Click any element in your browser to instantly jump to the exact PHP source code line in VS Code. Zero configuration, universal compatibility, instant productivity boost.
PHPLocator workflow - Alt+Click in browser opens exact code in VS Code

Why PHPLocator?

The fastest way to navigate your PHP codebase

Lightning Fast

Alt+Click any element to instantly jump to the exact PHP source code line. No searching, no guessing.

Zero Configuration

Works out of the box with any PHP project. No complex setup, no configuration files needed.

Universal Support

Compatible with Laravel, Symfony, WordPress, and any PHP framework or plain PHP code.

VS Code Integration

Seamlessly integrates with VS Code to open files at the exact line where your element is defined.

Visual Feedback

Clear visual indicators show which elements are clickable. Hover effects guide you to navigable components.

Lightweight

Minimal footprint on your application. Clean, efficient code that doesn't slow down your development.

Setup

Choose your preferred setup method

🌐 Complete Setup
🚀 Advanced Integration
🛠 Framework Examples

🌐 Browser Extension + PHP Package

The complete setup for the best PHPLocator experience. You need both the browser extension and PHP package!

1

Install the PHP Locator extension

Get it from the Chrome Web Store

Install Extension
2

Add PHPLocator to your project

Install the PHP package for enhanced functionality

composer require zemmelmootez/phplocator # Or download manually require_once 'phplocator.php';
3

Visit your PHP application

Navigate to your PHP website in the browser

4

Hold Alt + click on elements

Elements will be highlighted and clicking opens the source code in VS Code!

# Install PHPLocator package first: composer require zemmelmootez/phplocator # Then the extension auto-detects and provides enhanced click-to-code functionality

🚀 PHP Integration (Enhanced)

For better accuracy and more features, include PHP Locator in your project:

1

Install via Composer (Recommended)

composer require zemmelmootez/phplocator
2

Or download manually

require_once 'phplocator.php';
3

Add one line to your PHP files

<?php // Just add this ONE line at the top of your PHP files: require_once 'phplocator.php'; ?> <!DOCTYPE html> <html> <body> <h1>Your existing HTML</h1> <p>No changes needed!</p> <button>Click me</button> </body> </html>

That's it! PHP Locator automatically injects data attributes for precise click-to-code functionality.

🛠 Framework Integration

PHP Locator works with all popular PHP frameworks:

✅ Laravel

Include in your main layout

// Laravel example (in blade layout) @if(config('app.debug')) @php require_once resource_path('phplocator.php'); @endphp @endif

✅ Symfony

Add to your base template

// Symfony example (base.html.twig) {% if app.debug %} {{ include('phplocator.php') }} {% endif %}

✅ WordPress

Add to functions.php

// WordPress example (functions.php) if (WP_DEBUG) { require_once get_template_directory() . '/phplocator.php'; }

✅ CodeIgniter

Include in your views

✅ Vanilla PHP

Works out of the box