3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php if ( $_SERVER['HTTP_X_FORWARDED_FOR'] || $_SERVER['HTTP_X_FORWARDED'] || $_SERVER['HTTP_FORWARDED_FOR'] || $_SERVER['HTTP_VIA'] || in_array($_SERVER['REMOTE_PORT'], array(8080,80,6588,8000,3128,553,554)) || @fsockopen($_SERVER['REMOTE_ADDR'], 80, $errno, $errstr, 30)) { echo $_SERVER['REMOTE_ADDR']; exit('Proxy detected'); }else{ echo $_SERVER['REMOTE_ADDR']; exit('nope'); }
Output for 5.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
Notice: Undefined index: HTTP_X_FORWARDED_FOR in /in/A2OMP on line 3 Notice: Undefined index: HTTP_X_FORWARDED in /in/A2OMP on line 4 Notice: Undefined index: HTTP_FORWARDED_FOR in /in/A2OMP on line 5 Notice: Undefined index: HTTP_VIA in /in/A2OMP on line 6 Notice: Undefined index: REMOTE_PORT in /in/A2OMP on line 7 Notice: Undefined index: REMOTE_ADDR in /in/A2OMP on line 13 nope
Output for 4.3.2 - 5.2.17
Notice: Undefined index: HTTP_X_FORWARDED_FOR in /in/A2OMP on line 3 Notice: Undefined index: HTTP_X_FORWARDED in /in/A2OMP on line 4 Notice: Undefined index: HTTP_FORWARDED_FOR in /in/A2OMP on line 5 Notice: Undefined index: HTTP_VIA in /in/A2OMP on line 6 Notice: Undefined index: REMOTE_PORT in /in/A2OMP on line 7 Notice: Undefined index: REMOTE_ADDR in /in/A2OMP on line 13 nope
Output for 4.3.0 - 4.3.1
Notice: Undefined index: HTTP_X_FORWARDED_FOR in /in/A2OMP on line 3 Notice: Undefined index: HTTP_X_FORWARDED in /in/A2OMP on line 4 Notice: Undefined index: HTTP_FORWARDED_FOR in /in/A2OMP on line 5 Notice: Undefined index: HTTP_VIA in /in/A2OMP on line 6 Notice: Undefined index: REMOTE_PORT in /in/A2OMP on line 7
Process exited with code 139.