Nikita Popov [Mon, 18 Mar 2019 15:55:25 +0000 (16:55 +0100)]
Don't use random mode in mysqli_query test
MYSQLI_ASYNC is also valid here, at least with mysqlnd. Rather than
using a random mode that is prone to failing once in a blue moon,
use a fixed invalid value.
Nikita Popov [Mon, 18 Mar 2019 11:57:43 +0000 (12:57 +0100)]
Fixed bug #72685
We currently have a large performance problem when implementing lexers
working on UTF-8 strings in PHP. This kind of code tends to perform a
large number of matches at different offsets on a single string. This
is generally fast. However, if /u mode is used, the full string will
be UTF-8 validated on each match. This results in quadratic runtime.
This patch fixes the issue by adding a IS_STR_VALID_UTF8 flag, which
is set when we have determined that the string is valid UTF8 and
further validation is skipped.
A limitation of this approach is that we can't set the flag for interned
strings. I think this is not a problem for this use-case which will
generally work on dynamic data. If we want to use this flag for other
purposes as well (mbstring?) then it might be worthwhile to UTF-8 validate
strings during interning. But right now this doesn't seem useful.
twosee [Sat, 16 Mar 2019 05:21:48 +0000 (13:21 +0800)]
Don't disable object slot reuse while running shutdown functions
We only need to do this once we're running destructors. The current
approach interferes with some event loop code that runs everything
inside a shutdown function.
Peter Kokot [Thu, 14 Mar 2019 22:21:17 +0000 (23:21 +0100)]
Sync AC_CHECK_SIZEOF m4 macro calls
- AC_CHECK_SIZEOF is now called mostly only in PHP_CHECK_STDINT_TYPES()
macro except for some parts checking for the 32 or 64 bit architecture.
- SIZEOF_CHAR removed since it is always 1
- ZEND_BIN_ID is now of a more logical pattern `BIN_48888` on 64bit
architectures and `BIN_44444` on 32bit instead of literal string
`BIN_SIZEOF_CHAR48888` on 64bit and `BIN_SIZEOF_CHAR44444` on 32bit.
The unneeded SIZEOF_CHAR part has been removed.
- XMLRPC_TYPE_CHECKS removed
- The `long long int` is the same as `long long` and redundant checks
removed accordingly.
- Removed PHP_CHECK_64BIT macro. Checking if current platform is 64bit
or not can be also done simply by using a check of the long type on
place. This removes redundant m4 macro PHP_CHECK_64BIT.
Peter Kokot [Sun, 17 Mar 2019 19:10:26 +0000 (20:10 +0100)]
Remove outdated README for ext/json
The php manual already includes introduction to the JSON extension. The
re2c and bison version required to build parser and lexer files have
changed so to move this info on a central place this removes the README.
Peter Kokot [Sun, 24 Feb 2019 12:01:57 +0000 (13:01 +0100)]
Move distribution generator script to scripts/dev
The more proper place for shell scripts dedicated for development, and
releasing PHP should be the scripts/dev directory. Having a cleaner root
project directory helps find the main README.md and files relevant to
install PHP.
These scripts are also used by the release managers mostly who create
release packages and aren't used often by the majority of developers
working on and installing PHP.
Peter Kokot [Sat, 16 Feb 2019 19:29:42 +0000 (20:29 +0100)]
Enhance the buildconf script
Changes:
- Added a short introduction what this script does
- Added usually the expected -h and --help options with explanation
for a reason for this script and its usage.
- Messages changed a bit so the PHP installation procedure becomes
simpler without needing to constantly remind the reader what to run
and what not in the documentations and installation instructions.
- cd into current working directory of the buildconf (this enables
running the script from other locations and inside other scripts).
- check if make exists
Peter Kokot [Sat, 16 Mar 2019 17:37:49 +0000 (18:37 +0100)]
[ci skip] Remove make install step from README
The `make install` step touches files outside of the source directory
and might cause confusions with people. It should be mentioned in more
details elsewhere in the installation chapter instead and how to
override it.
Some of these are entirely unnecessary. Some specify an associativity
for operators where the concept doesn't make sense and has no effect:
Explicit associativity is only meaningful for binary operators. For
unary operators and constrained operations like instanceof or assignment
the associativity specification has no effect and only serves to confuse.
For example assignments were specified as %left, even though they will
actually behave as right-associative due to the variable requirement on
the LHS. Similarly instanceof was specified as %nonassoc, but it will
behave as left-associative, due to the restrictions places on the RHS.
Peter Kokot [Wed, 13 Mar 2019 21:50:53 +0000 (22:50 +0100)]
Clean build system
Changes:
- AC_TYPE_SIZE_T called on only one place (configure.ac)
- AC_FUNC_ALLOCA called on only one place (configure.ac)
- AC_TYPE_UID_T called on only one place (configure.ac)
- HAVE_STRSTR removed since strstr is part of C89 standard [1]
- Remove checks for strtol and strpbrk
- Checking for the presence of perror function is not needed anymore
since it is part of C89 standard and PHP calls it unconditionally.
- Checking for functions strdup, setenv, strerror, and memmove done only
on one place (configure.ac)
- outdated check for snprintf removed
Nikita Popov [Thu, 14 Mar 2019 16:24:50 +0000 (17:24 +0100)]
Fixed bug #77742
By avoiding integer overflow in the implementation entirely. The
multiplication was already explicitly checked for overflow, so also
add a check for the addition and remove the overflow checks after
the calculation.
Peter Kokot [Mon, 11 Mar 2019 01:01:25 +0000 (02:01 +0100)]
Integrate README.EXT_SKEL to help option
- Sync help output using heredoc
- Add extension building instructions
- Building with phpize is preferred option. Mention also tests
- Refactor print_success()