How to downgrade PHP

Using an example, I will downgrade PHP in Ubuntu 18.04, in which version 7.2 is installed by default. I do not recommend downgrading PHP, since newer versions are more productive and close vulnerabilities, but there are times when you need to run an old script or engine that does not work on newer versions of PHP, and it is very difficult to fix the code due to the fact that there are a lot of files.

Continue reading “How to downgrade PHP”

Solution PHP Notice: Use of undefined constant x — assumed ‘x’

I once noticed the following notification when writing a PHP script:

PHP Notice:  Use of undefined constant uid - assumed 'uid' in /scripts/file.php on line 31
PHP Notice:  Use of undefined constant value - assumed 'value' in /scripts/file.php on line 32

Continue reading “Solution PHP Notice: Use of undefined constant x — assumed ‘x’”