3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?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 5.6.28, 7.0.14 - 7.1.0
Your IP Address Is : <b><u></u></b> </br> [ Notice: Undefined variable: REMOTE_ADDR 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> [ Notice: Undefined index: HTTP_USER_AGENT in /in/Y6kkq on line 37 ]
Output for 5.5.24, 5.5.35, 7.0.6
Your IP Address Is : <b><u></u></b> </br> [ Notice: Undefined variable: REMOTE_ADDR in /in/Y6kkq on line 7 Linux php_shell 4.5.4-1-ARCH #1 SMP PREEMPT Wed May 11 22:21:28 CEST 2016 x86_64 ] </br> [ Notice: Undefined index: HTTP_USER_AGENT in /in/Y6kkq on line 37 ]
Output for 5.5.25 - 5.5.32, 5.5.34, 5.6.8 - 5.6.18, 5.6.20 - 5.6.21, hhvm-3.12.0, 7.0.0 - 7.0.3, 7.0.5
Your IP Address Is : <b><u></u></b> </br> [ Notice: Undefined variable: REMOTE_ADDR in /in/Y6kkq on line 7 Linux php_shell 4.4.5-1-ARCH #1 SMP PREEMPT Thu Mar 10 07:38:19 CET 2016 x86_64 ] </br> [ Notice: Undefined index: HTTP_USER_AGENT in /in/Y6kkq on line 37 ]
Output for 5.5.33, 5.6.19, 7.0.4
Your IP Address Is : <b><u></u></b> </br> [ Notice: Undefined variable: REMOTE_ADDR in /in/Y6kkq on line 7 Linux php_shell 4.4.1-2-ARCH #1 SMP PREEMPT Wed Feb 3 13:12:33 UTC 2016 x86_64 ] </br> [ Notice: Undefined index: HTTP_USER_AGENT in /in/Y6kkq on line 37 ]
Output for hhvm-3.10.0

Process exited with code 153.
Output for 5.3.0 - 5.4.45
Your IP Address Is : <b><u></u></b> </br> [ Notice: Undefined variable: REMOTE_ADDR in /in/Y6kkq on line 7 Linux php_shell 4.2.5-1-ARCH #1 SMP PREEMPT Tue Oct 27 08:13:28 CET 2015 x86_64 ] </br> [ Notice: Undefined index: HTTP_USER_AGENT in /in/Y6kkq on line 37 ]
Output for 5.0.4 - 5.2.17
Your IP Address Is : <b><u></u></b> </br> [ Notice: Undefined variable: REMOTE_ADDR in /in/Y6kkq on line 7 Linux php_shell 4.2.5-1-ARCH #1 SMP PREEMPT Tue Oct 27 08:13:28 CET 2015 x86_64 ] </br> [ Notice: Undefined index: HTTP_USER_AGENT in /in/Y6kkq on line 37 ]
Output for 4.3.0 - 5.0.3
Your IP Address Is : <b><u></u></b> </br> [ Notice: Undefined variable: REMOTE_ADDR in /in/Y6kkq on line 7 Linux php_shell 4.2.5-1-ARCH #1 SMP PREEMPT Tue Oct 27 08:13:28 CET 2015 x86_64 ] </br> [ Notice: Undefined index: HTTP_USER_AGENT in /in/Y6kkq on line 37 ]