reverse engineering for php apps, right in your browser

Reverse engineer
your PHP app
into JS source.

drop a folder of up to ten php files and porter reverse engineers the logic, arrays, classes and builtins back out as clean javascript source. no signup, no api keys, and your code never leaves the tab.

(01)

Feed it php. Get the source.

input.php edit me
source.js
let crew = {'ada': 36, 'linus': 28};

for (const [name, age] of Object.entries(crew)) {
    console.log(name.charAt(0).toUpperCase() + name.slice(1) + ` is ${age}`);
}
(02)

Three moves, zero setup.

  1. 01

    Drop a folder

    drag a project in. porter picks up to ten .php files and skips vendor and node_modules.

  2. 02

    Read the source

    flip between files, tweak the php and watch the recovered js update. notes flag what needs a human.

  3. 03

    Take the zip

    download the whole js source in one zip, same folder layout, .php swapped for .js.

(03)

What it actually recovers.

Variables & scope

adds let where a variable is born and hoists the ones php lets you set inside blocks.

Strings

concat dots, single quotes, "$interpolation", {$complex} and heredocs become clean template literals.

Arrays

lists stay arrays, associative arrays become objects, $arr[] becomes push.

Classes

properties, constants, static methods, constructors, $this and parent:: all carry over.

Templates

mixed html and <?= ?> files work, including if: / endif; style blocks.

70+ builtins

count, explode, array_filter, in_array, json_decode, intval and friends map to native js.

porter is rule based, so it hands you a solid first draft of your js source, not a magic button. database calls, sessions, sprintf, dates and file io get flagged for you to finish by hand.