Commit Graph

41 Commits

Author SHA1 Message Date
Ilija Tovilo
1c76da62db
Fix gc_status type info
Closes GH-11722
2023-07-17 13:49:23 +02:00
Ilija Tovilo
b3e33be443
Forward shutdown exceptions to user error handlers
Fixes GH-10695
Closes GH-110905
2023-06-15 17:11:22 +02:00
Alex Dowad
97e29bed9e Use shared, immutable array for return value of mb_list_encodings
This will allow us to easily check in other mbstring functions if the
list of all supported encodings, returned by mb_list_encodings, is
passed in as input to another function.

Co-authored-by: Ilija Tovilo <ilija.tovilo@me.com>
2023-05-16 07:01:07 -07:00
George Peter Banyard
81e59c6497
Improve handling of XML options
Mark boolean options as such
Warn on invalid types
Stubs info

Closes GH-10675
2023-02-26 14:34:39 +00:00
Ilija Tovilo
c3b9b0f9a7
Fix stub type info for posix_getrlimit 2022-10-28 10:44:08 +02:00
Tim Starling
b8811d4ff1
Add four extra fields to gc_status() (#9336)
- running: true if garbage collection is currently running
- protected: true if the garbage collector is protected and root
  additions are forbidden
- full: true if the garbage collector buffer size exceeds GC_MAX_BUF_SIZE
- buffer_size: current garbage collector buffer size

Documentation for existing fields:

- runs: the number of times the garbage collector has been run
- collected: the number of objects collected
- threshold: the number of roots in the buffer which will trigger
  garbage collection
- roots: the current number of roots in the buffer

Updated manual example output:

array(8) {
  ["running"]=>
  bool(false)
  ["protected"]=>
  bool(false)
  ["full"]=>
  bool(false)
  ["runs"]=>
  int(5)
  ["collected"]=>
  int(100002)
  ["threshold"]=>
  int(50001)
  ["buffer_size"]=>
  int(131072)
  ["roots"]=>
  int(0)
}
2022-10-04 13:56:02 +01:00
Máté Kocsis
5210872747
Regenerate optimizer func info after preprocessor condition changes 2022-09-02 17:18:42 +02:00
Ilija Tovilo
a6f489b452
Fix mb_strimwidth RC info
Closes GH-9254
2022-08-05 17:06:23 +02:00
Ilija Tovilo
d4a9cc8856
Fix rc info of iterator_to_array (#9080)
This function can now return a copy of the provided array, resulting in
a value of RC != 1.
2022-07-21 15:05:34 +02:00
Go Kudo
4d8dd8d258
Implement Random Extension
https://wiki.php.net/rfc/rng_extension
https://wiki.php.net/rfc/random_extension_improvement
2022-07-19 10:27:38 +01:00
Ilija Tovilo
63912b5ecd
Fix RC func info of str_split (#9016)
Introduced in GH-8945

With RETURN_EMPTY_ARRAY this function can now return an interned array which
has refcount 2.
2022-07-15 11:23:55 +02:00
Máté Kocsis
49d3dde211
Declare true return types (#8759) 2022-06-18 22:06:50 +02:00
Pierrick Charron
bbc0c4c5c8
Regen missing Zend/Optimizer/zend_func_infos.h 2022-06-13 09:49:41 -04:00
Máté Kocsis
3de1613b98
Regenerate optimizer function info 2022-06-01 16:09:57 +02:00
George Peter Banyard
8649cb8a96
Improve and fix stub return types (#8368) 2022-04-14 18:38:00 +01:00
George Peter Banyard
2fe35cf807 Regenerate optimized func infos
Using the --generate-optimizer-info option for ./build/gen_stubs.php
2022-04-05 13:36:14 +01:00
Christoph M. Becker
a708db9c8a
Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Fix GH-7759: Incorrect return types for hash() and hash_hmac()
2021-12-12 15:47:19 +01:00
Máté Kocsis
20fb26e55c
Add more specific array return type hints for various extensions - part 2
ext/ftp, ext/gmp, ext/intl

Closes GH-7433
2021-11-17 10:56:27 +01:00
Máté Kocsis
d02b9b953d
Add more specific array return type hints for various extensions - part 1
ext/bz2, ext/calendar, ext/dba, ext/enchant

Closes GH-7432
2021-11-07 08:46:25 +01:00
Nikita Popov
41789e1fc9 Regenerate optimizer info
While the stub definitions were updated, the generated optimizer
info was stale.
2021-10-08 11:40:38 +02:00
Máté Kocsis
d9e5e63032
Add more specific array return type hints for various extensions - part 6 (#7474) 2021-10-07 14:29:29 +02:00
Máté Kocsis
c8f858ef49
Add more specific array return type hints for various extensions - part 4 (#7469) 2021-09-06 17:14:52 +02:00
Máté Kocsis
6a47831e6e
Add more specific array return type hints for various extensions - part 3 (#7467) 2021-09-06 12:27:28 +02:00
Máté Kocsis
c19e4b9997
Generate optimizer func info from stubs for ext/standard - part 3 (#7426) 2021-08-30 15:56:47 +02:00
Máté Kocsis
1bf1481a2a
Specify a few array func info entries (#7425) 2021-08-30 14:29:18 +02:00
Máté Kocsis
8e6e9838b0
Add support for generating MAY_BE_ARRAY_OF_REF func info flag (#7416) 2021-08-30 13:50:34 +02:00
Nikita Popov
fab1222128 Ensure stub files are processed in predictable order
The zend_func_infos.h file was generated in a different order for
me.
2021-08-30 10:28:22 +02:00
Nikita Popov
0f7e0cf34b str_replace() can return the original string 2021-08-30 10:23:09 +02:00
Máté Kocsis
b49d340f74
Generate optimizer func info from stubs for ext/standard - part 2 (#7414) 2021-08-27 16:54:04 +02:00
Máté Kocsis
1ce81b6bcd
Generate optimizer func info from stubs for ext/standard - part 1 (#7413) 2021-08-27 13:11:57 +02:00
Máté Kocsis
fdc6082902
Generate optimizer func info from stubs for various extensions (#7409)
ext/hash, ext/iconv, ext/mbstring, ext/xml, ext/zlib
2021-08-26 19:52:11 +02:00
Máté Kocsis
68946bdd90
Generate optimizer func info from stubs for ext/gd and ext/pgsql (#7408) 2021-08-26 17:38:08 +02:00
Máté Kocsis
17ccabc6b6
Generate optimizer func info from stubs for ext/curl, ext/mysqli, ext/pcre (#7407) 2021-08-26 17:11:45 +02:00
Máté Kocsis
5e424d2884
Fix a few ext/date return types 2021-08-26 15:26:13 +02:00
Máté Kocsis
765aec8623
Generate optimizer func info from stubs for ext/sodium (#7404) 2021-08-26 10:44:38 +02:00
Máté Kocsis
2d248c80b9
Generate optimizer func info from stubs for ext/date (#7403) 2021-08-25 21:29:46 +02:00
Máté Kocsis
50f31829b1
Generate optimizer func info from stubs for a few extensions - part 2 (#7401)
ext/bcmath, ext/fileinfo, ext/filter, ext/gettext, ext/session
2021-08-25 15:29:46 +02:00
Máté Kocsis
d379044066
Generate a few missing optimizer function entries from stubs 2021-08-25 10:37:43 +02:00
Máté Kocsis
4a7a414735
Fix callable and iterable handling 2021-08-25 10:37:43 +02:00
Máté Kocsis
bdfe0ab505
Generate Zend, ext/spl and ext/json optimizer func info from stubs
Closes GH-7397
2021-08-25 10:37:27 +02:00
Máté Kocsis
b1822899fc
Add support for generating optimizer function info from stubs (#7367) 2021-08-24 16:35:33 +02:00