3v4l.org

run code in 300+ PHP versions simultaneously
<?php $ip = getenv("REMOTE_ADDR") ; echo "Your IP Address Is : <b><u>$ip</u></b> "; ?></br> [ <?php GetHostByName($REMOTE_ADDR); echo php_uname(); ?> ] </br> [ <?php function getip() { if (isSet($_SERVER)) { if (isSet($_SERVER["HTTP_X_FORWARDED_FOR"])) { $realip = $_SERVER["HTTP_X_FORWARDED_FOR"]; } elseif (isSet($_SERVER["HTTP_CLIENT_IP"])) { $realip = $_SERVER["HTTP_CLIENT_IP"]; } else { $realip = $_SERVER["REMOTE_ADDR"]; } } else { if ( getenv( 'HTTP_X_FORWARDED_FOR' ) ) { $realip = getenv( 'HTTP_X_FORWARDED_FOR' ); } elseif ( getenv( 'HTTP_CLIENT_IP' ) ) { $realip = getenv( 'HTTP_CLIENT_IP' ); } else { $realip = getenv( 'REMOTE_ADDR' ); } } return $realip; } //print out the ip and browser information echo $_SERVER["HTTP_USER_AGENT"] ?> ]
Output for git.master, git.master_jit, rfc.property-hooks
Your IP Address Is : <b><u></u></b> </br> [ Warning: Undefined variable $REMOTE_ADDR in /in/Y6kkq on line 7 Deprecated: gethostbyname(): Passing null to parameter #1 ($hostname) of type string is deprecated in /in/Y6kkq on line 7 Linux php_shell 4.8.6-1-ARCH #1 SMP PREEMPT Mon Oct 31 18:51:30 CET 2016 x86_64 ] </br> [ Warning: Undefined array key "HTTP_USER_AGENT" in /in/Y6kkq on line 37 ]

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:
50.25 ms | 402 KiB | 8 Q