Javascript function in PHP fromCharCode()
Try the chr()
function:
Returns a one-character string containing the character specified by ascii.
http://php.net/manual/en/function.chr.php
PHP has chr function which would return one-character string containing the character specified by ascii
To fit your java script style you can create your own class
$string = String::fromCharCode(112, 108, 97, 105, 110);
print($string);
Class Used
class String {
public static function fromCharCode() {
return array_reduce(func_get_args(),function($a,$b){$a.=chr($b);return $a;});
}
}