Offline PHP for iOS
Using DraftCode you can write and run PHP on your iPad and iPhone without requiring an internet connection.
DraftCode includes the standard open source PHP stack (v5.6.30 and v7.2.12*) with all typically available PHP extensions like MySQL, GD*, SQLite, PDO, OpenSSL, Curl, FTP, XML, SOAP and more (Here is DraftCode's
php5 phpinfo output and
php7 phpinfo output with a complete list of available extensions). All code execution happens right inside DraftCode and therefore works completely offline.
(*PHP 7.2.2 requires an additional in-app purchase which then allows you to switch between both PHP versions. Only the PHP 7 runtime includes the GD extension.)
Webkit preview built in
DraftCode includes a WebKit based preview that displays your WebApp exactly like Mobile Safari would. It of course also supports all browser side code (HTML, CSS and Javascript, including Javascript that in turn calls a PHP page).
Runtime
DraftCode's runtime provides the webserver environment your PHP code runs in. It behaves exactly like your normal webserver environment, handles cookies, sessions, POST/GET/PUT, but is faster and more tightly integrated for development purposes. During execution the DraftCode runtime allows inspection of session content or PHP errors, including highlighting of lines causing errors back in the code editor.