3v4l.org

run code in 200+ php & hhvm versions
<?php var_dump( filter_var('example.org/wat',FILTER_VALIDATE_DOMAIN), filter_var('example.org/wat',FILTER_VALIDATE_DOMAIN,FILTER_FLAG_HOSTNAME) );
Output for 7.0.0 - 7.3.0
string(15) "example.org/wat" bool(false)
Output for hhvm-3.22.0
Notice: Use of undefined constant FILTER_VALIDATE_DOMAIN - assumed 'FILTER_VALIDATE_DOMAIN' in /in/QRW3K on line -1 Warning: filter_var() expects parameter 2 to be integer, string given in /in/QRW3K on line -1 Notice: Use of undefined constant FILTER_VALIDATE_DOMAIN - assumed 'FILTER_VALIDATE_DOMAIN' in /in/QRW3K on line -1 Notice: Use of undefined constant FILTER_FLAG_HOSTNAME - assumed 'FILTER_FLAG_HOSTNAME' in /in/QRW3K on line -1 Warning: filter_var() expects parameter 2 to be integer, string given in /in/QRW3K on line -1 NULL NULL
Output for hhvm-3.19.2 - 3.21.3
Notice: Use of undefined constant FILTER_VALIDATE_DOMAIN - assumed 'FILTER_VALIDATE_DOMAIN' in /in/QRW3K on line 4 Warning: filter_var() expects parameter 2 to be integer, string given in /in/QRW3K on line 6 Notice: Use of undefined constant FILTER_VALIDATE_DOMAIN - assumed 'FILTER_VALIDATE_DOMAIN' in /in/QRW3K on line 5 Notice: Use of undefined constant FILTER_FLAG_HOSTNAME - assumed 'FILTER_FLAG_HOSTNAME' in /in/QRW3K on line 5 Warning: filter_var() expects parameter 2 to be integer, string given in /in/QRW3K on line 6 NULL NULL
Output for hhvm-3.10.1 - 3.18.5
Notice: Use of undefined constant FILTER_VALIDATE_DOMAIN - assumed 'FILTER_VALIDATE_DOMAIN' in /in/QRW3K on line 4 Warning: filter_var() expects parameter 2 to be integer, string given in /in/QRW3K on line 4 Notice: Use of undefined constant FILTER_VALIDATE_DOMAIN - assumed 'FILTER_VALIDATE_DOMAIN' in /in/QRW3K on line 5 Notice: Use of undefined constant FILTER_FLAG_HOSTNAME - assumed 'FILTER_FLAG_HOSTNAME' in /in/QRW3K on line 5 Warning: filter_var() expects parameter 2 to be integer, string given in /in/QRW3K on line 5 NULL NULL
Output for 5.2.0 - 5.6.38
Notice: Use of undefined constant FILTER_VALIDATE_DOMAIN - assumed 'FILTER_VALIDATE_DOMAIN' in /in/QRW3K on line 4 Warning: filter_var() expects parameter 2 to be long, string given in /in/QRW3K on line 4 Notice: Use of undefined constant FILTER_VALIDATE_DOMAIN - assumed 'FILTER_VALIDATE_DOMAIN' in /in/QRW3K on line 5 Notice: Use of undefined constant FILTER_FLAG_HOSTNAME - assumed 'FILTER_FLAG_HOSTNAME' in /in/QRW3K on line 5 Warning: filter_var() expects parameter 2 to be long, string given in /in/QRW3K on line 5 NULL NULL
Output for 5.0.0 - 5.1.6
Fatal error: Call to undefined function filter_var() in /in/QRW3K on line 4
Process exited with code 255.
Output for 4.4.5 - 4.4.9
Fatal error: Call to undefined function: filter_var() in /in/QRW3K on line 4
Process exited with code 255.
Output for 4.3.2 - 4.4.4
Fatal error: Call to undefined function: filter_var() in /in/QRW3K on line 4
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Call to undefined function: filter_var() in /in/QRW3K on line 4