- substr: documentation ( source)
- var_dump: documentation ( source)
- json_last_error_msg: documentation ( source)
- json_encode: documentation ( source)
<?php
$test = "Hello 🤖";
$chop = substr($test, 0, 8); //Doh! This will crash almost all multibyte aware functions...
$json = json_encode($chop);
var_dump(json_last_error_msg(), $json);