3v4l.org

run code in 300+ PHP versions simultaneously
<?php // This code is vulnerable when cmd == 1 and text contains a script // ?cmd=1&text=%3Cscript%3Ewindow.location%20=%20%22http://www.google.com/%22%3C/script%3E function get($c){ if ($c == 1) return $_GET['text']; else return htmlspecialchars($_GET['text']); } $cmd = (int) $_GET["cmd"]; if ($cmd == 0) echo "0"; else echo ($cmd . " " . get($cmd)); ?>
Output for git.master, git.master_jit, rfc.property-hooks
Warning: Undefined array key "cmd" in /in/oVU3U on line 10 0

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
39.53 ms | 401 KiB | 8 Q