GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing devtoolry.com — Online PHP Compiler — Run PHP 8.4 Code | Devtoolry Online PHP CompilerRun PHP 8.4 code online and see the output instantly, with stdin input and mbstring. PHP runs in your browser with WebAssembly, so your code stays private. Runs in your browser · Nothing uploaded · No sign-up Something not working, or missing a feature? Send feedback About the PHP CompilerThe PHP Compiler runs PHP 8.4 in your browser, compiled to WebAssembly, so your code never leaves your device. It is useful for testing snippets, functions and modern PHP syntax, with stdin input for scripts that read it. Use it as a PHP online compiler or a quick PHP tester: run PHP code online and see the output in a second. Your code runs in an isolated Web Worker in your browser, so it never leaves your device. How to use the PHP Compiler
ExampleInput <?php
$prices = ['apple' => 1.2, 'pear' => 0.8];
foreach ($prices as $fruit => $price) {
printf("%s: %.2f\n", $fruit, $price);
}
echo array_sum($prices), PHP_EOL;Result apple: 1.20 pear: 0.80 2 array_sum returns the float 2.0, which echo prints as 2. Use number_format() or printf() to control decimals. Common mistakes
Works well with the PHP Compiler
Frequently asked questions›Is it safe to run untrusted code?Code runs in an isolated Web Worker with a time limit and no network access, separate from the page and your data on this site. ›Which PHP version is used?PHP 8.4, so named arguments, match expressions, enums, readonly properties and property hooks are available. ›Can I read input with fgets(STDIN)?Yes. Text in the stdin box is passed to the script, so fgets(STDIN) and stream_get_contents(STDIN) read it line by line. ›Which extensions are available?The core extensions plus mbstring: bcmath, calendar, ctype, date, exif, filter, hash, json, libxml, pcre, PDO, random, Reflection, session, SPL and tokenizer. Network and system extensions such as curl, openssl and mysqli are not available in the browser. ›Is my code uploaded?No. PHP is compiled to WebAssembly and runs in a Web Worker in your browser. The runtime (about 5 MB) downloads on the first run and is cached. ›Can I run PHP without XAMPP or a web server?Yes. PHP 8.4 runs in your browser with WebAssembly, so you can test functions, arrays and string handling without installing XAMPP, WAMP or PHP itself. Output from echo and print_r appears in the output panel. ›Is PHP compiled or interpreted?PHP compiles your script to opcodes and runs them immediately in the Zend engine, with no separate build step, so it behaves like an interpreted language. "PHP compiler" is just the name most people search for. ›Can I connect to MySQL from the online PHP compiler?No. The sandbox has no network access, so mysqli and PDO cannot reach a database server. To practise SQL, use the SQL playground and keep the PHP code for the logic around it. Guides and tutorials
Related tools
|
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |