History log of /PHP-8.1/ext/json/json_encoder.c (Results 1 – 25 of 80)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# e8a836eb 10-Apr-2023 Jakub Zelenka

Expose JSON internal function to escape string


Revision tags: php-8.1.7RC1, php-8.1.4RC1, php-8.1.3, php-8.1.2RC1, php-8.1.0, php-7.3.33, php-7.3.32
# 6057cd23 18-Oct-2021 Nikita Popov

Fixed bug #81532

Revision tags: php-7.3.31, php-7.3.30
# d28f6e69 02-Aug-2021 Nikita Popov

Move php_gcvt to zend_gcvt

Also move PHP_DOUBLE_MAX_LENGTH to ZEND_DOUBLE_MAX_LENGTH.

# d2cc7239 19-Jul-2021 Christoph M. Becker

Merge branch 'PHP-8.0'

* PHP-8.0:
Revert "Fix #79908: json_encode encodes negative zero as int"


# 18abfcb3 19-Jul-2021 Christoph M. Becker

Merge branch 'PHP-7.4' into PHP-8.0

* PHP-7.4:
Revert "Fix #79908: json_encode encodes negative zero as int"


# 2d2c001c 19-Jul-2021 Christoph M. Becker

Revert "Fix #79908: json_encode encodes negative zero as int"

This reverts commit 717f1ed5e4b4b2083907dd085e66b377edad24b7.

# 5e0874f2 13-Jul-2021 Christoph M. Becker

Merge branch 'PHP-8.0'

* PHP-8.0:
Fix #79908: json_encode encodes negative zero as int


# 1ba190bd 13-Jul-2021 Christoph M. Becker

Merge branch 'PHP-7.4' into PHP-8.0

* PHP-7.4:
Fix #79908: json_encode encodes negative zero as int


# 717f1ed5 13-Jul-2021 Christoph M. Becker

Fix #79908: json_encode encodes negative zero as int

Encoding a negative zero as `-0` is likely to loose the sign when
decoding (at least it does with `json_decode()`). Therefore, we en

Fix #79908: json_encode encodes negative zero as int

Encoding a negative zero as `-0` is likely to loose the sign when
decoding (at least it does with `json_decode()`). Therefore, we encode
it as if `JSON_PRESERVE_ZERO_FRACTION` was specified, i.e. as `-0.0`.

Closes GH-7234.

show more ...

Revision tags: php-7.3.29
# 01b3fc03 06-May-2021 KsaR

Update http->https in license (#6945)

1. Update: http://www.php.net/license/3_01.txt to https, as there is anyway server header "Location:" to https.
2. Update few license 3.0 to 3.01 as

Update http->https in license (#6945)

1. Update: http://www.php.net/license/3_01.txt to https, as there is anyway server header "Location:" to https.
2. Update few license 3.0 to 3.01 as 3.0 states "php 5.1.1, 4.1.1, and earlier".
3. In some license comments is "at through the world-wide-web" while most is without "at", so deleted.
4. fixed indentation in some files before |

show more ...

Revision tags: php-7.3.28, php-7.3.27, php-7.3.26, php-7.3.26RC1, php-7.3.25, php-7.3.25RC1, php-7.3.24, php-7.3.24RC1
# 5caaf40b 29-Sep-2020 George Peter Banyard

Introduce pseudo-keyword ZEND_FALLTHROUGH

And use it instead of comments

# 92aeda52 27-Mar-2021 Tyson Andre

Fix json_encode regression with JSON_PRETTY_PRINT

This makes the json encoding behavior the same as it was prior to the memory
optimizations added in f9f8c1c79cac1b03279190e0c5513a518816

Fix json_encode regression with JSON_PRETTY_PRINT

This makes the json encoding behavior the same as it was prior to the memory
optimizations added in f9f8c1c79cac1b03279190e0c5513a51881615f9
(for objects with declared properties)

This is based on the code for the unoptimized case below the changes.

Buggy output prior to this commit:
```
{
"prop":"value"}
```

Correct output:

```
{
"prop": "value"
}
```

Closes GH-6811

show more ...

Revision tags: php-7.3.23, php-7.3.23RC1, php-7.3.22, php-7.3.22RC1, php-7.3.21, php-7.3.21RC1, php-7.3.20, php-7.3.20RC1
# 269c8dac 10-Jun-2020 Ilija Tovilo

Implement enums

RFC: https://wiki.php.net/rfc/enumerations

Co-authored-by: Nikita Popov <nikita.ppv@gmail.com>

Closes GH-6489.

# f9f8c1c7 01-Mar-2021 Dmitry Stogov

Optimized object encoding without rebulding properties HashTable

Revision tags: php-7.3.19, php-7.4.7RC1, php-7.3.19RC1, php-7.3.18RC1, php-7.2.30, php-7.3.17, php-7.3.17RC1, php-7.3.18, php-7.3.16, php-7.3.16RC1, php-7.3.15RC1, php-7.3.15, php-7.3.14, php-7.3.14RC1, php-7.3.13, php-7.3.13RC1, php-7.2.26RC1, php-7.4.0, php-7.2.25, php-7.3.12, php-7.4.0RC6, php-7.3.12RC1, php-7.2.25RC1
# 13c430b1 04-Nov-2019 Dusk

Add array_is_list(array $array) function

This function tests if an array contains only sequential integer keys. While
list isn't an official type, this usage is consistent with the commu

Add array_is_list(array $array) function

This function tests if an array contains only sequential integer keys. While
list isn't an official type, this usage is consistent with the community usage
of "list" as an annotation type, cf.
https://psalm.dev/docs/annotating_code/type_syntax/array_types/#lists

Rebased and modified version of #4886

- Use .stub.php files
- Add opcache constant evaluation when argument is a constant
- Change from is_list(mixed $value) to array_is_list(array $array)

RFC: https://wiki.php.net/rfc/is_list

Co-Authored-By: Tyson Andre <tysonandre775@hotmail.com>
Co-Authored-By: Dusk <dusk@woofle.net>

Closes GH-6070

show more ...

# da0663a3 15-Sep-2020 Nikita Popov

Add GC_TRY_ADDREF macro

That adds a ref if not immutable. Also audit uses of GC_IMMUTABLE
to either use GC_TRY_ADDREF or GC_TRY_PROTECT_RECURSION.

Revision tags: php-7.4.0RC5, php-7.1.33, php-7.2.24, php-7.3.11, php-7.4.0RC4, php-7.3.11RC1, php-7.2.24RC1, php-7.4.0RC3
# 5d6e923d 24-Sep-2019 Gabriel Caruso

Remove mention of PHP major version in Copyright headers

Closes GH-4732.

Revision tags: php-7.2.23, php-7.3.10, php-7.4.0RC2, php-7.2.23RC1, php-7.3.10RC1, php-7.4.0RC1, php-7.1.32, php-7.2.22, php-7.3.9, php-7.4.0beta4, php-7.2.22RC1, php-7.3.9RC1, php-7.4.0beta2, php-7.1.31, php-7.2.21, php-7.3.8, php-7.4.0beta1, php-7.2.21RC1, php-7.3.8RC1, php-7.4.0alpha3, php-7.3.7, php-7.2.20, php-7.4.0alpha2, php-7.3.7RC3, php-7.3.7RC2, php-7.2.20RC2, php-7.4.0alpha1, php-7.3.7RC1, php-7.2.20RC1, php-7.2.19, php-7.3.6, php-7.1.30, php-7.2.19RC1, php-7.3.6RC1, php-7.1.29, php-7.2.18, php-7.3.5
# eb7d57eb 23-Apr-2019 Nikita Popov

Merge branch 'PHP-7.3' into PHP-7.4


# 68892410 23-Apr-2019 Nikita Popov

Merge branch 'PHP-7.2' into PHP-7.3


# 4831e150 23-Apr-2019 Nikita Popov

Fixed bug #77843

Revision tags: php-7.2.18RC1, php-7.3.5RC1, php-7.2.17, php-7.3.4, php-7.1.28, php-7.3.4RC1, php-7.2.17RC1
# 46d5551f 18-Mar-2019 Dmitry Stogov

Optimization for ASCII data

# 9f6f6fe2 10-Mar-2019 c9s

Remove function_table var from the caller

function_table var is not used in call_user_function macro anymore
hence replace the usage with NULL

Revision tags: php-7.1.27, php-7.3.3, php-7.2.16, php-7.3.3RC1, php-7.2.16RC1, php-7.2.15, php-7.3.2, php-7.2.15RC1
# 92ac598a 22-Jan-2019 Peter Kokot

Remove local variables

This patch removes the so called local variables defined per
file basis for certain editors to properly show tab width, and
similar settings. These are mainly

Remove local variables

This patch removes the so called local variables defined per
file basis for certain editors to properly show tab width, and
similar settings. These are mainly used by Vim and Emacs editors
yet with recent changes the once working definitions don't work
anymore in Vim without custom plugins or additional configuration.
Neither are these settings synced across the PHP code base.

A simpler and better approach is EditorConfig and fixing code
using some code style fixing tools in the future instead.

This patch also removes the so called modelines for Vim. Modelines
allow Vim editor specifically to set some editor configuration such as
syntax highlighting, indentation style and tab width to be set in the
first line or the last 5 lines per file basis. Since the php test
files have syntax highlighting already set in most editors properly and
EditorConfig takes care of the indentation settings, this patch removes
these as well for the Vim 6.0 and newer versions.

With the removal of local variables for certain editors such as
Emacs and Vim, the footer is also probably not needed anymore when
creating extensions using ext_skel.php script.

Additionally, Vim modelines for setting php syntax and some editor
settings has been removed from some *.phpt files. All these are
mostly not relevant for phpt files neither work properly in the
middle of the file.

show more ...

# 0cf7de1c 30-Jan-2019 Zeev Suraski

Remove yearly range from copyright notice

Revision tags: php-7.3.2RC1, php-5.6.40, php-7.1.26, php-7.3.1, php-7.2.14, php-7.2.14RC1, php-7.3.1RC1, php-5.6.39, php-7.1.25, php-7.2.13, php-7.0.33, php-7.3.0, php-7.1.25RC1, php-7.2.13RC1, php-7.3.0RC6, php-7.1.24, php-7.2.12, php-7.3.0RC5, php-7.1.24RC1, php-7.2.12RC1, php-7.3.0RC4, php-7.1.23, php-7.2.11, php-7.3.0RC3
# 7ec8087f 04-Oct-2018 Nikita Popov

Introduce get_properties_for() handler

This handler allows getting the object properties for a particular
purpose, such as array casting, serialization, etc.

1234