PHP does not use cache by default, it can be done using the header();
function, but as you said you removed the browser cache and even then continued to display the same results then the problem should be some extension of <
Bytecode (also read on just-in-time (JIT)
PHP is an interpreted language, ie every request and every person accessing the script will have to be interpreted, the extensions < in> Bytecode "save" the various "interpretations" of the script in the "memory", a "compiled" version of the code, causing the script not to be completely processed, process a few things, this often brings advantages in running a script and less time consuming server resources which is a big advantage for the production environment .
Examples of bytecode extensions for PHP:
-
Opcache
Default in php 5.5 onwards and can only be installed in versions 5.2, 5.3 and 5.4 through PECL ) / p>
-
APC (not to be confused with APCu )
Can be installed from PHP 5.1 using PECL
-
Xcache
It is supported by the same group that maintains lighttpd, can be installed in PHP 5.1, 5.2, 5.3, 5.4, 5.5 and 5.6
That is when you change the code as:
$stmt = mysqli_prepare($link, 'SELECT foo FROM bar WHERE foo=?');
mysqli_stmt_bind_param($stmt, 's', $_GET['foo']);
For something like:
$stmt = mysqli_prepare($link, 'SELECT foo,nome,sobrenome FROM bar WHERE foo=?');
mysqli_stmt_bind_param($stmt, 's', $_GET['foo']);
Depending on the extension the script will still work as first, the only thing that changes the behavior is $_GET['foo']
, because the language was compiled for probably an intermediate language (it does not have to be a complete language ), so the dynamic values continue to change, but the script script does not.
The extension itself usually detects changes, but usually takes a few seconds or will require or restart the Apache server (ngnix, lighttp, etc.).
If you are in development environment it is recommended that you disconnect the extension in php.ini
by commenting extensions with a semicolon.
If you are developing and using internal APC features you can try switching to APCu or memcache
-
To turn off Opcache you can comment on lines like this (if it's Unix-like):
;zend_extension=opcache.so
If it's Windows:
;zend_extension=php_opcache.dll
You can also do this:
opcache.enabled=0
-
To turn off the APC you can comment on lines like this (if it's Unix-like):
;extension=apc.so
If it's Windows:
;extension=php_apc.dll
You can also do this:
apc.enabled=0
-
To turn off Xcache you can comment on lines like this (if it's Unix-like):
;extension=xcache.so
If it's Windows:
;extension=php_xcache.dll
Note: HHVM already has JIT itself
Note: The bytecode compilers although it takes a few seconds to clear the "compiled" versions' cache yet is great in the production environment if you update the server files it is likely to have to restart for updates to be affected immediately.