3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $_SERVER['REMOTE_ADDR'] = '127.0.0.1'; echo $ip; if (filter_var($ip = $_SERVER['REMOTE_ADDR'], FILTER_FLAG_IPV4)) { echo $ip; }
based on RJlCL
Output for 5.2.1 - 5.6.28, hhvm-3.12.0, 7.0.0 - 7.1.0
Notice: Undefined variable: ip in /in/fMSk6 on line 5
Output for hhvm-3.10.0

Process exited with code 153.
Output for 5.2.0
Notice: Undefined variable: ip in /in/fMSk6 on line 5 127.0.0.1
Output for 5.0.4 - 5.1.6
Notice: Undefined variable: ip in /in/fMSk6 on line 5 Fatal error: Call to undefined function filter_var() in /in/fMSk6 on line 7
Process exited with code 255.
Output for 5.0.0 - 5.0.3
Notice: Undefined variable: ip in /in/fMSk6 on line 5 Fatal error: Call to undefined function filter_var() in /in/fMSk6 on line 7
Process exited with code 255.
Output for 4.4.5 - 4.4.9
Notice: Undefined variable: ip in /in/fMSk6 on line 5 Fatal error: Call to undefined function: filter_var() in /in/fMSk6 on line 7
Process exited with code 255.
Output for 4.3.2 - 4.4.4
Notice: Undefined variable: ip in /in/fMSk6 on line 5 Fatal error: Call to undefined function: filter_var() in /in/fMSk6 on line 7
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Notice: Undefined variable: ip in /in/fMSk6 on line 5 Fatal error: Call to undefined function: filter_var() in /in/fMSk6 on line 7