3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php if (filter_var($x, FILTER_VALIDATE_IP) === false) { $ip = explode('.', $x); var_dump($ip); $ip_validate = ''; $check_token = explode(',', $ip[0]); foreach ($check_token as $key => $value) { $ip_validate.= substr($ip[1], $value, 1); } $ip_validate($ip[sizeof($ip) - 1]); }
Output for 7.0.0 - 7.2.0
Notice: Undefined variable: x in /in/QT65r on line 2 Notice: Undefined variable: x in /in/QT65r on line 3 array(1) { [0]=> string(0) "" } Notice: Undefined offset: 1 in /in/QT65r on line 8 Warning: substr() expects parameter 2 to be integer, string given in /in/QT65r on line 8 Fatal error: Uncaught Error: Call to undefined function () in /in/QT65r:10 Stack trace: #0 {main} thrown in /in/QT65r on line 10
Process exited with code 255.
Output for 5.5.0 - 5.6.28
Notice: Undefined variable: x in /in/QT65r on line 2 Notice: Undefined variable: x in /in/QT65r on line 3 array(1) { [0]=> string(0) "" } Notice: Undefined offset: 1 in /in/QT65r on line 8 Warning: substr() expects parameter 2 to be long, string given in /in/QT65r on line 8 Fatal error: Call to undefined function () in /in/QT65r on line 10
Process exited with code 255.