Instead of handling shebang lines by adjusting the file pointer in
individual SAPIs, move the handling into the lexer, where this is
both a lot simpler and more robust. Whether the shebang should be
skipped is controlled by CG(skip_shebang) -- we might want to do
that in more cases.
This fixed bugs #60677 and #78066.
Since mysqlnd is solely developed in the php-src repository, it makes
not much sense to have its own version number, particularly since
nobody cares to update it. Therefore we use PHP's version number, but
stick with the "mysqlnd" prefix which can be important to distinguish
the mysqli driver (libmysqlclient vs. mysqlnd).
On this benchmark:
function simple_string_escape() {
$a = "test'asd'asd'' asd\'\"asdfasdf";
for($i=0; $i<512; $i++) {
$a .= chr($i%256);
}
for ($i = 0; $i < 100000; $i++) {
if ($a === stripslashes(addslashes($a)))
$a .= chr($i%256);
else {
echo "error at i=".$i."\n";
return;
}
}
}
the execution time goes from 21.619s to 8.139s (165% speedup) on an A1 Graviton instance.
When removing the characters that need escaping, i.e., this benchmark:
function simple_string() {
$a = "testasdasd asdasdfasdf";
for ($i = 0; $i < 10000; $i++) {
if ($a === stripslashes(addslashes($a)))
$a .= "test dedeasdf";
else {
echo "error at i=".$i."\n";
return;
}
}
}
the execution time goes from 2.932s down to 0.516s (468% speedup) on an A1 Graviton instance.
New opcache directives have been added recently which are returned
if using `ini_get_all('zend opcache')` but are not listed in the
directives if using `opcache_get_configuration()`. This fix adds
those missing directives as well as if `opcache.mmap_base` is used
instead of `opcache.lockfile_path`. Also adds a test to ensure the
directives match with both methods of fetching.
The undef PTHREADS converts to define if thread safety is configured.
This step is already done by pthreads m4 macros from TSRM so this now
removes duplicated PTHREADS defines from php_config.h.
- TIMELIB_OMIT_STDINT is not used anymore since
a171f99cf0
- HAVE_GETTIMEOFDAY was defined multiple times in Windows headers
- ext/date/lib/timelib_config.h.win32 does not seem to be used
Closes GH-4400
This test does not work on Windows, if the child process has OPcache
enabled via php.ini, since TEMP is not set in the environment, so
OPcache can't find the base address file, and terminates the childs.
To avoid this (and potentially some other issues regarding missing
environment variables, such as PATH), we force the child process to
ignore any ini files.
The fix for bug #78241 assumed that `time_t` would always be 64bit, but
actually is 32bit for x86. We therefore enforce 64bit arithmetic to
avoid wrapping.
- Checks and defines are not relevant for files that include it anymore
- Some code is not used anymore
- Defines are a bit duplicated in zend_portability.h and TSRM.h file
- MAXPATHLEN defs moved to zend_virtual_cwd.h