Cause:
If your string contains a $, PHP interprets it as the start of a variable. For example:
<?php
display("$vhkvdov#jqlydk#p*_L#1qrlws|ufqh#KWLZ#1hwdgsX");
?>
Here, PHP will try to replace $vhkvdov with the value of a variable named $vhkvdov. Since that variable likely doesn’t exist, it evaluates to nothing, breaking the string.
Solution:
Use single quotes to prevent variable interpolation:
<?php
display('$vhkvdov#jqlydk#p*_L#1qrlws|ufqh#KWLZ#1hwdgsX');
?>
Additional Tip:
Enable error reporting during development to catch such issues early. In your php.ini, set:
error_reporting = E_ALL | E_NOTICE
display_errors = On
; or alternatively
log_errors = On
error_log = PATH/TO/YOUR/LOG.file ; ensure this file is writable by the web server
With this, PHP will show helpful messages such as:
PHP Notice: Undefined variable: vhkvdov