Dmitry Stogov
cec091176c
Replace zend_hash_apply... with ZEND_HASH_FOREACH...
2018-12-19 02:49:56 +03:00
Gabriel Caruso
84b195d9fc
Fix some misspellings
2018-08-12 16:15:45 +02:00
Peter Kokot
8d3f8ca12a
Remove unused Git attributes ident
...
The $Id$ keywords were used in Subversion where they can be substituted
with filename, last revision number change, last changed date, and last
user who changed it.
In Git this functionality is different and can be done with Git attribute
ident. These need to be defined manually for each file in the
.gitattributes file and are afterwards replaced with 40-character
hexadecimal blob object name which is based only on the particular file
contents.
This patch simplifies handling of $Id$ keywords by removing them since
they are not used anymore.
2018-07-25 00:53:25 +02:00
Dmitry Stogov
b6fb584505
Replace zval_dtor() with specialized destructors
2018-07-05 13:32:39 +03:00
Dmitry Stogov
3c600e2d61
retval shouldn't be NULL
2018-06-22 14:28:29 +03:00
Dmitry Stogov
9b2d708f21
Reduce spl_autoload() overhead
2018-06-22 13:19:53 +03:00
Dmitry Stogov
5eb1f92f31
Use zend_string_release_ex() instread of zend_string_release() in places, where we sure about string persistence.
2018-05-28 16:27:12 +03:00
Dmitry Stogov
eafa92ba9d
zend_fcall_info_cache.calling_scope is not used by zend_call_function() and doesn't have to be initialized.
...
It's used only as a result of zend_is_callable() in forward_static_call and spl_autoload.
2018-05-03 19:27:04 +03:00
Gabriel Caruso
affc20f891
Use bool instead of boolean in proto
2018-02-04 17:00:24 +01:00
Xinchen Hui
a6519d0514
year++
2018-01-02 12:57:58 +08:00
Dmitry Stogov
d9f5ea691f
zend_fcall_info_cache.initialized is removed (zend_fcall_info_cache is initialized if zend_fcall_info_cache.function_handler is set).
2017-12-27 15:15:03 +03:00
Dmitry Stogov
9e709e2fa0
Move constants into read-only data segment
2017-12-14 18:43:44 +03:00
Nikita Popov
9cdd547eca
Fixed bug #74372
2017-12-06 23:36:09 +01:00
Dmitry Stogov
084c17fe0b
Use zend_string_tolower() where it's possible (to avoid reallocations).
...
Allow zend_string_tolower_ex() to create parsistent strings
2017-11-30 01:13:39 +03:00
Xinchen Hui
e7dd9c781b
Merge branch 'PHP-7.1' into PHP-7.2
...
* PHP-7.1:
Update NEWS
Fixed bug #75049 (spl_autoload_unregister can't handle spl_autoload_functions results)
2017-08-09 11:29:46 +08:00
Xinchen Hui
307acb6618
Merge branch 'PHP-7.0' into PHP-7.1
...
* PHP-7.0:
Fixed bug #75049 (spl_autoload_unregister can't handle spl_autoload_functions results)
2017-08-09 11:29:13 +08:00
Xinchen Hui
b06f8cb58b
Fixed bug #75049 (spl_autoload_unregister can't handle spl_autoload_functions results)
2017-08-09 11:28:53 +08:00
Tyson Andre
5097e2ee13
Implement spl_object_id(object $x) : int
...
spl_object_id is a new function returning the object handle,
as a signed integer.
Discussion for this new function is ongoing on php-internals, see
https://marc.info/?t=143835274500003&r=1&w=2
The object id is unique for the lifetime of the object.
When the object is garbage collected,
different objects may & will have the same object id.
- This is also the case for the string generated by spl_object_hash
It is always possible to cast the object handle to a **signed** zend_long
in php 7.2. _zend_object->handle is always of the type `uint32_t`.
(zend_long is 32 bits on 32 bit builds, 64 bits on 64 bit builds)
As of php 7.0, the object id uniquely identifies the object,
there can't be two objects with the same id but different handlers
(See the implementation of spl_object_hash)
Skip the pointless XORing, as discussed in internals.
- It was intended to avoid exposing in-memory addresses.
- The object handle is not a memory address.
- The output of var_dump() includes the object handle(id)
2017-08-02 17:54:07 +02:00
Dmitry Stogov
27e7aea412
"Countable" interface is moved from SPL to Core
2017-05-25 12:47:43 +03:00
Dmitry Stogov
c01afdb68c
spl_autoload_call() optimization
2017-05-10 13:27:49 +03:00
Nikita Popov
a381b61f03
Merge branch 'PHP-7.0' into PHP-7.1
2017-02-16 17:00:21 +01:00
Nikita Popov
708973c9bd
Fix autoload_func_info destruction
...
Can't reference the function ptr after the closure has been
destroyed.
2017-02-16 16:59:17 +01:00
Dmitry Stogov
5753a753c7
Merge branch 'PHP-7.0' into PHP-7.1
...
* PHP-7.0:
Fixed bug #73896 (spl_autoload() crashes when calls magic _call())
2017-01-09 15:12:22 +03:00
Dmitry Stogov
4f1b24d974
Fixed bug #73896 (spl_autoload() crashes when calls magic _call())
2017-01-09 15:11:33 +03:00
Sammy Kaye Powers
dac6c639bb
Update copyright headers to 2017
2017-01-04 11:23:42 -06:00
Sammy Kaye Powers
478f119ab9
Update copyright headers to 2017
2017-01-04 11:14:55 -06:00
Leigh
6d6ef7aacc
Alias rand to mt_rand
2016-07-05 15:09:49 +01:00
Leigh
eba6e7ce9a
Split rand and mt_rand into separate files
2016-07-05 11:16:37 +01:00
Dmitry Stogov
1616038698
Added ZEND_ATTRIBUTE_FORMAT to some middind functions.
...
"%p" replaced by ZEND_LONG_FMT to avoid compilation warnings.
Fixed most incorrect use cases of format specifiers.
2016-06-21 16:00:37 +03:00
Nikita Popov
8023204d21
Fixed bug #52339
...
Autoloader 101: Don't throw if you fail. PHP will throw for you.
2016-03-18 20:28:58 +01:00
Bogdan Padalko
2b4625d687
Remove obj handlers ptr value from spl_object_hash()
...
We still keep the same output length, for people who rely on the
return value having a specific format. The handler part will now
simply be always the same (it was the same nearly always anyway).
The motivation behind this change is to avoid breaking
spl_object_hash() and SplObjectStorage if an extension changes the
handlers table of an object. This has come up, for example, in
weakref implementations.
2016-01-12 16:47:21 +01: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
Xinchen Hui
8692a99551
Merge branch 'PHP-5.6' into PHP-7.0
2015-12-23 08:11:09 -08:00
Xinchen Hui
620ccc9b1a
Fixed bug #71204 (segfault if clean spl_autoload_funcs while autoloading)
2015-12-23 08:10:59 -08:00
Xinchen Hui
9cc4cdbe57
This should never fail
2015-12-23 07:52:24 -08:00
Xinchen Hui
e21cb2daea
Fixed bug #71202 (Autoload function registered by another not activated immediately)
2015-12-23 07:48:00 -08:00
Xinchen Hui
b584b51398
Fixed bug #70290 (Null pointer deref (segfault) in spl_autoload via ob_start)
2015-08-19 18:41:28 +08:00
Dmitry Stogov
4a2e40bb86
Use ZSTR_ API to access zend_string elements (this is just renaming without semantick changes).
2015-06-30 04:05:24 +03:00
Rasmus Lerdorf
28d7bb97a1
Fix more proto comments
2015-06-23 17:46:20 -04:00
Anatol Belski
663074b6b1
cleanup mod version macros and mod defs, round x
2015-03-23 21:30:22 +01:00
Dmitry Stogov
d146d15003
Optimize zend_string_realloc() add more specialized versions zend_string_extend() and zend_string_truncate()
2015-03-20 02:02:42 +03:00
Dmitry Stogov
2fa8d67a5c
Use zend_string* instead of char* for opened_patch handling. Avoid reallocations and improve string reuse.
2015-03-04 02:05:28 +03:00
Reeze Xia
f824f91ac9
Fixed bug #69141 Missing arguments in reflection info for some builtin functions
...
This include:
- setcookie (missing "httponly")
- setrawcookie (missing "httponly")
- spl_autoload_register (missing 2 optional params)
- mktime (missing "is_dst")
- gmmktime (missing "is_dst")
2015-02-28 16:37:14 +08:00
Xinchen Hui
fc33f52d8c
bump year
2015-01-15 23:27:30 +08:00
Xinchen Hui
73c1be2653
Bump year
2015-01-15 23:26:03 +08:00
Stanislav Malyshev
b7a7b1a624
trailing whitespace removal
2015-01-10 15:07:38 -08:00
Stanislav Malyshev
ee7decb7ff
Revert "Add type info for spl_autoload_register"
...
This reverts commit ad728725cb
.
Revert the change for now, probably needs better handling with account to BC
or joined with exceptions-in-engine RFC.
2014-12-29 09:50:00 -08:00
Levi Morrison
ad728725cb
Add type info for spl_autoload_register
2014-12-28 10:16:25 -07:00
Levi Morrison
9a7ee202bb
Fix bug #68641
...
Include more reflection information for spl_autoload_register
2014-12-27 19:05:16 -07:00