3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = "Please join me in this prayer. &#55357;&#56911;&#10084;&#65039;"; var_export( preg_replace_callback( "/&#(\d{5});&#(\d{5});/", function($m) { return iconv("UTF-16BE", "UTF-8", hex2bin(dechex($m[1]) . dechex($m[2]))); }, $str ) );
Output for 8.0.0 - 8.0.30, 8.1.0 - 8.1.33, 8.2.0 - 8.2.29, 8.3.0 - 8.3.27, 8.4.1 - 8.4.14
Warning: iconv(): Wrong encoding, conversion from "UTF-16BE" to "UTF-8" is not allowed in /in/DZSJ6 on line 8 Warning: iconv(): Wrong encoding, conversion from "UTF-16BE" to "UTF-8" is not allowed in /in/DZSJ6 on line 8 'Please join me in this prayer. '
Output for 7.4.33
Fatal error: Uncaught Error: Call to undefined function iconv() in /in/DZSJ6:8 Stack trace: #0 [internal function]: {closure}(Array) #1 /in/DZSJ6(10): preg_replace_callback('/&#(\\d{5});&#(\\...', Object(Closure), 'Please join me ...') #2 {main} thrown in /in/DZSJ6 on line 8
Process exited with code 255.
Output for 5.6.30, 7.3.0 - 7.3.33, 7.4.0 - 7.4.32
Notice: iconv(): Wrong charset, conversion from `UTF-16BE' to `UTF-8' is not allowed in /in/DZSJ6 on line 8 Notice: iconv(): Wrong charset, conversion from `UTF-16BE' to `UTF-8' is not allowed in /in/DZSJ6 on line 8 'Please join me in this prayer. '

preferences:
124.03 ms | 410 KiB | 5 Q