3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $var1 = 'teste/teste'; $request = htmlentities(trim($var1), ENT_COMPAT | ENT_HTML5, SYS_ENCODING); var_dump($request); var_dump(strpos($request, '/'));
based on oA4li
Output for 7.2.0
Warning: Use of undefined constant SYS_ENCODING - assumed 'SYS_ENCODING' (this will throw an Error in a future version of PHP) in /in/DXU6d on line 3 Warning: htmlentities(): charset `SYS_ENCODING' not supported, assuming utf-8 in /in/DXU6d on line 3 string(15) "teste&sol;teste" bool(false)
Output for 5.4.1 - 7.1.10
Notice: Use of undefined constant SYS_ENCODING - assumed 'SYS_ENCODING' in /in/DXU6d on line 3 Warning: htmlentities(): charset `SYS_ENCODING' not supported, assuming utf-8 in /in/DXU6d on line 3 string(15) "teste&sol;teste" bool(false)
Output for 5.3.18 - 5.3.29
Notice: Use of undefined constant ENT_HTML5 - assumed 'ENT_HTML5' in /in/DXU6d on line 3 Notice: Use of undefined constant SYS_ENCODING - assumed 'SYS_ENCODING' in /in/DXU6d on line 3 Warning: htmlentities(): charset `SYS_ENCODING' not supported, assuming iso-8859-1 in /in/DXU6d on line 3 string(11) "teste/teste" int(5)