1
0
mirror of https://github.com/php/php-src.git synced 2026-04-21 06:51:18 +02:00
Commit Graph

83 Commits

Author SHA1 Message Date
George Peter Banyard ec53e17adf Use more appropriate types in JSON extension (#8194)
Mainly zend_result
2022-03-16 22:53:41 +00:00
KsaR 01b3fc03c3 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 |
2021-05-06 12:16:35 +02:00
Ilija Tovilo 269c8dac1d Implement enums
RFC: https://wiki.php.net/rfc/enumerations

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

Closes GH-6489.
2021-03-17 19:08:03 +01:00
Nikita Popov 3e01f5afb1 Replace zend_bool uses with bool
We're starting to see a mix between uses of zend_bool and bool.
Replace all usages with the standard bool type everywhere.

Of course, zend_bool is retained as an alias.
2021-01-15 12:33:06 +01:00
twosee 88355dd338 Constify char * arguments of APIs
Closes GH-5676.
2020-06-08 10:38:45 +02:00
Gabriel Caruso 5d6e923d46 Remove mention of PHP major version in Copyright headers
Closes GH-4732.
2019-09-25 14:51:43 +02:00
Peter Kokot dee243d475 Bump PHP_JSON_VERSION to PHP_VERSION
Closes GH-4459
2019-07-24 22:19:33 +02:00
Peter Kokot 92ac598aab 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.
2019-02-03 21:03:00 +01:00
Zeev Suraski 0cf7de1c70 Remove yearly range from copyright notice 2019-01-30 11:03:12 +02:00
Jakub Zelenka f3ef13e1d6 Bump PHP_JSON_VERSION to 1.7.0 2018-06-14 20:25:59 +01:00
Xinchen Hui a6519d0514 year++ 2018-01-02 12:57:58 +08:00
Andrea Faulds e823770515 Merge JSON_THROW_ON_ERROR 2017-10-22 19:41:23 +01:00
Jakub Zelenka 18180bb161 Bump PHP_JSON_VERSION to 1.6.0 2017-07-16 15:53:02 +01:00
Jakub Zelenka 0f047f60f0 [ci skip] Remove CSV leftovers from json code - $Id$ 2017-07-16 15:51:39 +01:00
Jakub Zelenka 9c58822653 Introduce internal php_json_encode_ex to allow extensions setting depth 2017-07-16 15:47:23 +01:00
Jakub Zelenka 0d0f7cde8c Add JSON_INVALID_UTF8_SUBSTITUTE and JSON_INVALID_UTF8_IGNORE
It implements request #65082 and adds options for replacing resp.
ignoring invalid UTF-8 sequences for json_encode and json_decode.
2017-07-16 12:35:24 +01:00
Sammy Kaye Powers 9e29f841ce Update copyright headers to 2017 2017-01-02 09:30:12 -06:00
Jakub Zelenka c4961fa8b6 Bump PHP_JSON_VERSION to 1.5.0 2016-08-29 15:18:00 +01:00
Jakub Zelenka bea131f0bc Add return code from json API functions
It will allow fix few json bugs in a better way
2016-06-28 20:49:38 +01:00
Nikita Popov f57c0b3249 Merge branch 'PHP-7.0' 2016-03-03 16:50:47 +01:00
Nikita Popov 1ac152938c Move semicolon into TSRMLS_CACHE_EXTERN/DEFINE
Also re bug #71575.
2016-03-03 16:50:01 +01:00
James Titcumb c4b188871e Fix bug #71575 removing extra semicolons outside macros 2016-03-03 16:41:03 +01:00
Eddie Kohler 104876dd8e json_encode: Escape U+2028 and U+2029 more often.
These characters are illegal in Javascript, so leaving them unescaped
is risky. The default encoder ($flags = 0) is fine, but the encoder
with JSON_UNESCAPED_UNICODE flag is not.

In case anyone wants the ability to leave these characters unescaped,
provide JSON_UNESCAPED_LINE_TERMINATORS.
2016-01-22 19:40:58 +00:00
Lior Kaplan ed35de784f Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  Happy new year (Update copyright to 2016)
2016-01-01 19:48:25 +02:00
Lior Kaplan 49493a2dcf Happy new year (Update copyright to 2016) 2016-01-01 19:21:47 +02:00
Jakub Zelenka 7fe2646be3 Move json_decode options macros bellow encode options 2015-09-04 19:37:12 +01:00
Ryan McCullagh 45fdff1c85 json: fix formating of PHP_JSON* option bitshifts 2015-09-04 19:29:54 +01:00
Joe Watkins 26e619b192 these need to be exported for extensions that use json 2015-09-03 19:28:34 +01:00
Anatol Belski 4e66cce87c switch to the unified globals accessor where appropriate 2015-07-29 13:26:35 +02:00
Jakub Zelenka f3df3df873 Fix bug #68546 (json_decode cannot access property started with \0) 2015-06-21 15:30:33 +01:00
Jakub Zelenka 3ddc246b5a Set PHP_JSON_VERSION to 1.4.0 2015-02-17 20:52:06 +00:00
Michael Wallner 09a3e7377a fix json globals 2015-02-09 17:57:18 +01:00
Jakub Zelenka 20bae2a503 Give me credit 2015-02-02 19:33:48 +00:00
Jakub Zelenka 3159d518d0 Merge branch 'master' into jsond
Conflicts:
	ext/json/JSON_parser.c
	ext/json/json.c
2015-01-25 18:43:15 +00:00
Stanislav Malyshev 1fdd558e39 Merge branch 'PHP-5.6'
* PHP-5.6:
  Fixed bug #50224 where float without decimals were converted to integer
  Updated NEWS for #68371
2015-01-19 10:05:57 -08:00
Juan Basso ac7cfad3b5 Fixed bug #50224 where float without decimals were converted to integer 2015-01-19 00:46:02 -08:00
Xinchen Hui fc33f52d8c bump year 2015-01-15 23:27:30 +08:00
Xinchen Hui 0579e8278d bump year 2015-01-15 23:26:37 +08:00
Juan Basso 95cef47afb Porting implementation of RFC json_preserve_fractional_part 2015-01-12 21:29:52 -05:00
Jakub Zelenka b68da91d52 Merge branch 'master' into jsond
Conflicts:
	ext/json/JSON_parser.c
	ext/json/JSON_parser.h
	ext/json/config.m4
	ext/json/config.w32
	ext/json/json.c
	ext/json/php_json.h
2014-12-27 19:42:04 +00:00
Anatol Belski bdeb220f48 first shot remove TSRMLS_* things 2014-12-13 23:06:14 +01:00
Jakub Zelenka a4e59c39a7 Add missing bits to php_json.h 2014-11-25 20:36:41 +00:00
Jakub Zelenka 432b73fdee Add error codes to php_json.h 2014-11-16 15:13:15 +00:00
Anatol Belski fea10f6a5e ext/iconv, ext/json and ext/session use static tsrmls pointer 2014-10-17 14:16:40 +02:00
Nikita Popov e33f3d3b7c Move smart_str implementation into Zend/
So we can use it there as well...

For now I've retained the zend_smart_str_public.h header, though
it would probably be better to just move that one struct into
zend_types.h.
2014-09-21 20:49:39 +02:00
Johannes Schlüter d0cb715373 s/PHP 5/PHP 7/ 2014-09-19 18:33:14 +02:00
Anatol Belski 232459efd0 fix signature 2014-08-27 22:13:01 +02:00
Anatol Belski 074c68e9ce fix signature 2014-08-27 22:05:26 +02:00
Anatol Belski c3e3c98ec6 master renames phase 1 2014-08-25 19:24:55 +02:00
Anatol Belski 1958857225 ported ext/json 2014-08-19 20:15:59 +02:00