Run PHP online — PHP 8.4 or 8.x, real Zend engine, browser-hosted, no install.
PHP still powers WordPress (43% of the web), Laravel, Symfony, and most of the CMS-driven internet. PHP 8 is a serious modern language: types, JIT, enums, readonly, property hooks in 8.4.
ls-judge runs PHP 8.x via the standard CLI inside a Firecracker microVM. Pick PHP 8.4 for the current line, or the generic 8.x for the shipped LTS-adjacent build.
Clicking "Run now" opens the playground with this exact code and a matching test case pre-loaded — passes on first Run.
<?php $n = (int)trim(fgets(STDIN)); echo ($n * 2) . "\n";
21
42