3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = '<a href="http://test.com">test</a><br/>test'; $encode = nl2br(htmlentities($string, ENT_QUOTES, 'UTF-8')); echo html_entity_decode($encode, ENT_QUOTES, 'UTF-8');

This is an error 500

Value for `_results` contains invalid data `array`


preferences:
161.24 ms | 3674 KiB | 11 Q