3v4l.org

run code in 300+ PHP versions simultaneously
<?php echo "<div>ip: " . $_SERVER['REMOTE_ADDR'] . "</div>"; echo "<div>http-x-ip: " . $_SERVER['HTTP_X_FORWARDED_FOR'] . "</div>"; foreach (getallheaders() as $name => $value) { echo "<div>$name: $value</div>"; } ?>
Output for git.master, git.master_jit, rfc.property-hooks
Warning: Undefined array key "REMOTE_ADDR" in /in/u26QU on line 3 <div>ip: </div> Warning: Undefined array key "HTTP_X_FORWARDED_FOR" in /in/u26QU on line 4 <div>http-x-ip: </div> Fatal error: Uncaught Error: Call to undefined function getallheaders() in /in/u26QU:5 Stack trace: #0 {main} thrown in /in/u26QU on line 5
Process exited with code 255.

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:
45.77 ms | 401 KiB | 8 Q