3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $x = "Umläüts & test!"; $x = htmlspecialchars($x); function htmlDecode( &$subject ) { $subject = (string) $subject; do { $oldSubject = $subject; $subject = htmlspecialchars_decode($subject); } while( $subject != $oldSubject ); } $x = htmlspecialchars($x); var_dump($x); htmlDecode($x); var_dump($x);
Output for 5.1.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
string(25) "Umläüts &amp;amp; test!" string(17) "Umläüts & test!"
Output for 5.0.0 - 5.0.5
string(25) "Umläüts &amp;amp; test!" Fatal error: Call to undefined function htmlspecialchars_decode() in /in/a39o9 on line 12
Process exited with code 255.
Output for 4.4.5 - 4.4.9
string(25) "Umläüts &amp;amp; test!" Fatal error: Call to undefined function: htmlspecialchars_decode() in /in/a39o9 on line 12
Process exited with code 255.
Output for 4.3.2 - 4.4.4
string(25) "Umläüts &amp;amp; test!" Fatal error: Call to undefined function: htmlspecialchars_decode() in /in/a39o9 on line 12
Process exited with code 255.
Output for 4.3.0 - 4.3.1
string(25) "Umläüts &amp;amp; test!" Fatal error: Call to undefined function: htmlspecialchars_decode() in /in/a39o9 on line 12