History log of /PHP-7.4/ext/standard/basic_functions.c (Results 101 – 125 of 1360)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# b204b3ab 26-Nov-2016 Anatol Belski

further normalizations, uint vs uint32_t

fix merge mistake

yet one more replacement run


# 97b65cc9 18-Nov-2016 Dmitry Stogov

Fixed memory leaks in parse_ini_file()


# 2104bea5 12-Nov-2016 Kalle Sommer Nielsen

Remove Netware support

If this does not break the Unix system somehow, I'll be amazed. This should get most of it out, apologies for any errors this may cause on non-Windows ends which I can

Remove Netware support

If this does not break the Unix system somehow, I'll be amazed. This should get most of it out, apologies for any errors this may cause on non-Windows ends which I cannot test atm.

show more ...


# 33301d5b 29-Aug-2016 Michele Locati

Add VT100 support for Windows

Fix function names prefix

Use Unicode version of GetFinalPathNameByHandle

Use EG(windows_version_info) instead of RtlGetVersion

Use t

Add VT100 support for Windows

Fix function names prefix

Use Unicode version of GetFinalPathNameByHandle

Use EG(windows_version_info) instead of RtlGetVersion

Use the specified handle_id instead of STD_OUTPUT_HANDLE

Switch from stream name to stream resource

Allow running tests capturing only stdout and/or stderr

Add tests for stream_vt100_support function

Export Win32 console functions

Fix x64 build

Use zend_long instead of long long, use GetConsole instead of GetFinalPathNameByHandleW to check if a handle is a valid console stream

Always use zend_long on any platform

Use _get_osfhandle to determine the standard handle

Accept stream names

Raise warnings in case of invalid stream parameter

Return true if disabling VT100 support on a not-console/redirected stream or on old Windows versions

Remove php_win32_console_os_supports_vt100

Differentiate stdin vs stdout/stderr

Simplify setting flag

Allow avoid piping STDIN

Let stream_vt100_support accept only resources

Fix run-tests

Revert console flags in case of failure

Simplify logic of stream_vt100_support when setting the flag

Return true if succeeded, false otherwise

Drop support for STDIN

More comprehensive tests for stream_vt100_support

Remove old tests

Fix name of included file and use absolute paths

Enable ENABLE_VIRTUAL_TERMINAL_PROCESSING on Windows by default

Remove tests for stream_vt100_support

Split stream_vt100_support into stream_isatty+sapi_windows_vt100_support

Add tests for stream_isatty

Add tests for sapi_windows_vt100_support

Return null from stream_isatty is neither Windows nor Posix

Fallback to S_ISCHR if neither Windows nor Posix

Avoid defining argc since it's only used once

Better comment about php_win32_console_fileno_is_console

Use events instead of cNumberOfEvents

Do not restore previous console mode

We need to restore previous console mode on failing SetConsole calls only for STDIN

Don't configure STDOUT/STDERR on Windows with PHP_CLI_WIN32_NO_CONSOLE

show more ...


# 1a512eed 13-Oct-2016 Andrea Faulds

Move utf8_encode and utf8_decode to ext/standard


# 02ba9d71 30-Sep-2016 Nikita Popov

Unwrap reference returns in cufa etc


# d690014b 11-Sep-2016 Andrea Faulds

Remove zpp fallback code (always use Fast ZPP)

Squashed commit of the following:

commit 3e27fbb3d22b42d181e15c345f1c59a007b6b58c
Author: Andrea Faulds <ajf@ajf.me>
Date: S

Remove zpp fallback code (always use Fast ZPP)

Squashed commit of the following:

commit 3e27fbb3d22b42d181e15c345f1c59a007b6b58c
Author: Andrea Faulds <ajf@ajf.me>
Date: Sun Sep 11 19:14:37 2016 +0100

Keep dummy FAST_ZPP macro for compatibility

commit 8a7cfd00deaa4a3c5026c97580c49c886c72a5b4
Author: Andrea Faulds <ajf@ajf.me>
Date: Mon Sep 5 22:36:03 2016 +0100

Remove FAST_ZPP macro and plain zpp fallback code

show more ...


# 434ae90e 22-Aug-2016 Xinchen Hui

Fixed bug #72920 (Accessing a private constant using constant() creates an exception AND warning)


# 872028de 20-Aug-2016 Anatol Belski

fix TS issues with url rewrite globals


# a53a6b3f 10-Aug-2016 Yasuo Ohgaki

Fix URL rewriter issues


# 9a900431 10-Aug-2016 Leigh

Preserve BC for rand() AND mt_rand() where min > max


# 6e16ea41 20-Jul-2016 Xinchen Hui

Fixed arginfo


# 9ebc9611 20-Jul-2016 Xinchen Hui

Fixed arginfo


# 2809a676 04-Jul-2016 Martin Vobruba

Pass error severity to SAPI modules and raise corresponding error level in Apache


# 98b9dfae 10-Jul-2016 Stanislav Malyshev

Fix for HTTP_PROXY issue.

The following changes are made:
- _SERVER/_ENV only has HTTP_PROXY if the local environment has it,
and only one from the environment.
- getenv('HTTP_

Fix for HTTP_PROXY issue.

The following changes are made:
- _SERVER/_ENV only has HTTP_PROXY if the local environment has it,
and only one from the environment.
- getenv('HTTP_PROXY') only returns one from the local environment
- getenv has optional second parameter, telling it to only consider
local environment

show more ...


# e4f7f00a 29-May-2016 Adam Saponara

Add optind param to getopt


# 69e7d8dc 07-Jul-2016 Leigh

Make mode selection part of mt_srand()

The mode of operation is intrinsically linked to seeding, so this makes a lot of sense


# 6d6ef7aa 05-Jul-2016 Leigh

Alias rand to mt_rand


# 8bd8a64d 05-Jul-2016 Anatol Belski

fix possible optimization bug


# 4576c412 05-Jul-2016 Anatol Belski

fix possible optimization bug


# 7981a294 05-Jul-2016 Leigh

Fix mt_rand impl. Provide legacy impl. access.


# 0cfb4765 28-Jun-2016 Dmitry Stogov

Fixed compilation warnings


# adc95c51 23-Jun-2016 Dmitry Stogov

Fixed compilation warnings


# 3d3f11ed 20-Jun-2016 Anatol Belski

Fixed the UTF-8 and long path support in the streams on Windows.

Since long the default PHP charset is UTF-8, however the Windows part is
out of step with this important point. The curre

Fixed the UTF-8 and long path support in the streams on Windows.

Since long the default PHP charset is UTF-8, however the Windows part is
out of step with this important point. The current implementation in PHP
doesn't technically permit to handle UTF-8 filepath and several other
things. Till now, only the ANSI compatible APIs are being used. Here is more
about it

https://msdn.microsoft.com/en-us/library/windows/desktop/dd317752%28v=vs.85%29.aspx

The patch fixes not only issues with multibyte filenames under
incompatible codepages, but indirectly also issues with some other multibyte
encodings like BIG5, Shift-JIS, etc. by providing a clean way to access
filenames in UTF-8. Below is a small list of issues from the bug tracker,
that are getting fixed:

https://bugs.php.net/63401
https://bugs.php.net/41199
https://bugs.php.net/50203
https://bugs.php.net/71509
https://bugs.php.net/64699
https://bugs.php.net/64506
https://bugs.php.net/30195
https://bugs.php.net/65358
https://bugs.php.net/61315
https://bugs.php.net/70943
https://bugs.php.net/70903
https://bugs.php.net/63593
https://bugs.php.net/54977
https://bugs.php.net/54028
https://bugs.php.net/43148
https://bugs.php.net/30730
https://bugs.php.net/33350
https://bugs.php.net/35300
https://bugs.php.net/46990
https://bugs.php.net/61309
https://bugs.php.net/69333
https://bugs.php.net/45517
https://bugs.php.net/70551
https://bugs.php.net/50197
https://bugs.php.net/72200
https://bugs.php.net/37672

Yet more related tickets can for sure be found - on bugs.php.net, Stackoverflow
and Github. Some of the bugs are pretty recent, some descend to early
2000th, but the user comments in there last even till today. Just for example,
bug #30195 was opened in 2004, the latest comment in there was made in 2014. It
is certain, that these bugs descend not only to pure PHP use cases, but get also
redirected from the popular PHP based projects. Given the modern systems (and
those supported by PHP) are always based on NTFS, there is no excuse to keep
these issues unresolved.

The internalization approach on Windows is in many ways different from
UNIX and Linux, while it supports and is based on Unicode. It depends on the
current system code page, APIs used and exact kind how the binary was compiled
The locale doesn't affect the way Unicode or ANSI API work. PHP in particular
is being compiled without _UNICODE defined and this is conditioned by the
way we handle strings. Here is more about it

https://msdn.microsoft.com/en-us/library/tsbaswba.aspx

However, with any system code page ANSI functions automatically convert
paths to UTF-16. Paths in some encodings incompatible with the
current system code page, won't work correctly with ANSI APIs. PHP
till now only uses the ANSI Windows APIs.

For example, on a system with the current code page 1252, the paths
in cp1252 are supported and transparently converted to UTF-16 by the
ANSI functions. Once one wants to handle a filepath encoded with cp932 on
that particular system, an ANSI or a POSIX compatible function used in
PHP will produce an erroneous result. When trying to convert that cp932 path
to UTF-8 and passing to the ANSI functions, an ANSI function would
likely interpret the UTF-8 string as some string in the current code page and
create a filepath that represents every single byte of the UTF-8 string.
These behaviors are not only broken but also disregard the documented
INI settings.

This patch solves the issies with the multibyte paths on Windows by
intelligently enforcing the usage of the Unicode aware APIs. For
functions expect Unicode (fe CreateFileW, FindFirstFileW, etc.), arguments
will be converted to UTF-16 wide chars. For functions returning Unicode
aware data (fe GetCurrentDirectoryW, etc.), resulting wide string is
converted back to char's depending on the current PHP charset settings,
either to the current ANSI codepage (this is the behavior prior to this patch)
or to UTF-8 (the default behavior).

In a particular case, users might have to explicitly set
internal_encoding or default_charset, if filenames in ANSI codepage are
necessary. Current tests show no regressions and witness that this will be an
exotic case, the current default UTF-8 encoding is compatible with any
supported system. The dependency libraries are long switching to Unicode APIs,
so some tests were also added for extensions not directly related to streams.
At large, the patch brings over 150 related tests into the core. Those target
and was run on various environments with European, Asian, etc. codepages.
General PHP frameworks was tested and showed no regressions.

The impact on the current C code base is low, the most places affected
are the Windows only places in the three files tsrm_win32.c, zend_virtual_cwd.c
and plain_wrapper.c. The actual implementation of the most of the wide
char supporting functionality is in win32/ioutil.* and win32/codepage.*,
several low level functionsare extended in place to avoid reimplementation for
now. No performance impact was sighted. As previously mentioned, the ANSI APIs
used prior the patch perform Unicode conversions internally. Using the
Unicode APIs directly while doing custom conversions just retains the status
quo. The ways to optimize it are open (fe. by implementing caching for the
strings converted to wide variants).

The long path implementation is user transparent. If a path exceeds the
length of _MAX_PATH, it'll be automatically prefixed with \\?\. The MAXPATHLEN
is set to 2048 bytes.

Appreciation to Pierre Joye, Matt Ficken, @algo13 and others for tips, ideas
and testing.

Thanks.

show more ...


# 1b29e0ca 07-Oct-2015 Nikita Popov

Switch zend_print_zval_r to use smart_str

Instead of directly writing to stdout. This allows doing a print_r
into a string, without using output buffering.

The motivation for th

Switch zend_print_zval_r to use smart_str

Instead of directly writing to stdout. This allows doing a print_r
into a string, without using output buffering.

The motivation for this is bug #67467: print_r() in return mode
will still dump the string to stdout (causing a potential information
leak) if a fatal error occurs.

show more ...


12345678910>>...55