Xinchen Hui
9712a974be
Also protects object to array cast
2016-03-21 19:12:50 +08:00
Xinchen Hui
97a9470d97
bump year which is missed in rev 49493a2
2016-01-02 17:56:11 +08:00
Anatol Belski
d59eb9fcc3
fix decrement_function regarding bug #70863
2015-11-06 23:07:21 +01:00
Anatol Belski
8155ecba61
Fixed bug #70863 Incorect logic to increment_function for proxy objects
2015-11-06 23:07:16 +01:00
Xinchen Hui
8732ead953
Double declaration
2015-10-12 10:42:04 +08:00
Dmitry Stogov
b8b335c492
Restored the original (php-5) behavior of convert_to_cstring(). It was broken in php7 by mistake and caused problems in ext/pgsql/tests/bug46408.phpt.
2015-10-07 04:26:26 +03:00
Dmitry Stogov
24e88348f3
Revert "Merge branch 'array_keys_strict_refs' of https://github.com/tony2001/php-src "
...
This reverts commit a6be0f3fd6
.
2015-10-06 23:48:12 +03:00
Bob Weinand
a6be0f3fd6
Merge branch 'array_keys_strict_refs' of https://github.com/tony2001/php-src
2015-10-05 14:50:04 +02:00
Xinchen Hui
f3e8675d38
Added folder marks
2015-09-10 15:01:28 +08:00
Dmitry Stogov
c174e4cd73
Change array sorting implementation to avoid two level callbacks system.
...
Simplify zval comparion API.
2015-09-10 02:51:23 +03:00
Dmitry Stogov
2ea18cd431
Better array_compare improvement
2015-09-09 15:11:03 +03:00
Dmitry Stogov
37f0c6b5cb
Add myself into list of authors of the most refactored files.
2015-08-31 11:38:16 +03:00
Dmitry Stogov
9d31b29705
Avoid array duplication
2015-08-25 22:40:33 +03:00
Nikita Popov
0039a3e96f
Fixed signed/unsigned warnings in wddx
...
Also added extra const annotation to zend_memnstr.
2015-07-17 17:19:23 +02:00
Xinchen Hui
e5a996f268
Fixed bug #70057 (Build failure on 32-bit Mac OS X 10.6.8: recursive inlining)
2015-07-13 16:22:55 +08:00
Aaron Piotrowski
5df893ce3c
Use NULL where possible for exception class
...
Matches usage of zend_throw_exception()/zend_throw_exception_ex().
2015-07-07 12:10:55 -05:00
Anatol Belski
a97f764472
bring back the division by zero warning
2015-07-05 20:18:17 +02:00
Aaron Piotrowski
22c38b2ef5
Remove need to pass error level
2015-07-03 17:53:41 -05:00
Aaron Piotrowski
5a99c07ecc
Enable throwing custom exceptions from errors
2015-07-03 17:53:40 -05:00
Bob Weinand
94722e12cf
Introduce ArithmeticError
2015-07-02 20:47:44 +02:00
Xinchen Hui
ba91bc36cd
Same here
2015-07-02 12:23:50 +08:00
Xinchen Hui
ba711aec30
Use one_char_string
2015-07-02 12:19:55 +08:00
Xinchen Hui
0e68e27854
Use one_char_string
2015-07-02 12:18:23 +08:00
Bob Weinand
007d7ac7ca
Use DivisionByZeroError instead of exception for %/intdiv()
2015-07-02 02:20:58 +02:00
Bob Weinand
f9724b93f6
Remove warning upon division by zero
2015-07-02 02:20:58 +02:00
Dmitry Stogov
d2d326a381
Cleanup (avoid reallocatios and side effects in php_strip_tags)
2015-07-01 19:04:18 +03:00
Dmitry Stogov
7aa7627172
Use ZSTR_ API to access zend_string elements (this is just renaming without semantick changes).
2015-06-30 13:59:27 +03:00
Dmitry Stogov
4bd22cf1c1
Improved zend_string API (Francois Laupretre)
...
Squashed commit of the following:
commit d96eab8d79
Author: Francois Laupretre <francois@tekwire.net>
Date: Fri Jun 26 01:23:31 2015 +0200
Use the new 'ZSTR' macros in the rest of the code.
Does not change anything to the generated code (thanks to compat macros) but cleaner.
commit b352643910
Author: Francois Laupretre <francois@tekwire.net>
Date: Thu Jun 25 13:45:06 2015 +0200
Improve zend_string API
Add missing methods
2015-06-29 16:44:54 +03:00
Dmitry Stogov
1bba4452e7
Reverted wrong fb08798c9f
2015-06-29 12:20:09 +03:00
Bob Weinand
fb08798c9f
Fix bug #69957 (Different ways of handling div/mod by zero)
2015-06-28 18:22:59 +02:00
Nikita Popov
8a83aed458
Drop duplicate object-to-type notices
...
We already generate a recoverable fatal for these earlier, no need
to throw an additional notice.
2015-06-22 16:25:32 +02:00
Dmitry Stogov
b97df475df
Fixed crash in Zend/tests/bug69891.phpt on x86 (32-bit).
...
compare_function() now has to be compatible with binary_op_type (use fastcall convention).
Introduced new zval_compare_function() to be used as zval comparison callback instead of compare_function().
2015-06-22 12:53:52 +03:00
Dmitry Stogov
4a6e1345e2
Use COW to prevent unnecessary duplication of dynamic propertyes of stdClass (and other classes without predefined properties).
2015-06-17 12:50:16 +03:00
Nikita Popov
fb346c8f93
Support references in convert_to_*
...
conver_to_* functions now accept REFERENCE values, which will be
unwrapped before performing the usual conversion. This is consistent
with convert_scalar_to_number and matches the expected behavior in
a couple random use-sites I checked.
Also includes a couple fixes/cleanups elsewhere and two tests for
cases that previously didn't work (though the reference issue existed
all over the place).
2015-06-16 19:55:33 +02:00
Nikita Popov
183c00ddb6
Fix references handling in convert_scalar_to_number
2015-06-16 18:02:45 +02:00
Nikita Popov
5d3cf577aa
Make convert_to_* safe with rc>1
...
This only involves switching zval_dtor to zval_ptr_dtor for arrays
and making the convert_to_object for arrays a bit more generic.
All the other changes outside zend_operators.c just make use of
this new ability (use COPY instead of DUP).
What's still missing: Proper references handling. I've seen many
convert_to* calls that will break when a reference is used.
Also fixes bug #69788 .
2015-06-11 23:23:57 +02:00
Bob Weinand
9ca564d5f3
fix bitwise object operations
2015-06-04 16:09:22 +02:00
Bob Weinand
8a1c5d15d2
Use CG(one_char_string) if possible in bitwise string operations
...
emalloc() is not cheap... Also, a good part of bitwise string ops out there are on single bytes.
2015-06-03 02:57:16 +02:00
Dmitry Stogov
5fc88a9968
Inline IS_LONG value calculation and avoid strtol() call.
2015-05-05 11:09:18 +03:00
Dmitry Stogov
d880ead8a7
Improve fast_is_[not_]identical() functions to teturn value instead of takeing additional arguments.
...
Pair INSTANCEOF with the following JMPZ/JMPNZ.
2015-04-29 16:43:23 +03:00
Nikita Popov
23c7f19e41
Undef results for new arithmetic exceptions
...
For the compound assing case (e.g. $a <<= $b) the result is going
to be dtored, so we have to set *some* value.
2015-04-06 21:52:20 +02:00
Dmitry Stogov
5820be029a
0.0 / 0.0 = NaN
2015-04-06 22:03:44 +03:00
Anatol Belski
f0c533f421
fix build
2015-04-06 13:56:47 +02:00
Dmitry Stogov
cae0147ed3
Fixed weird operators behavior. Division by zero now emits warning and returns +/-INF, modulo by zero and intdid() throws an exception, shifts by negative offset throw exceptions. Compile-time evaluation of division by zero is disabled.
2015-04-06 14:30:05 +03:00
Dmitry Stogov
53d20140fb
Fixed performance degradation introduced with lateast EnfineException related changes.
...
Restore original errors order in executor.
2015-04-02 03:56:42 +03:00
Dmitry Stogov
ec760d8fff
Convert fatal errors into EngineExceptions
2015-04-01 20:01:57 +03:00
Dmitry Stogov
780a8123fe
Convert fatal errors into EngineExceptions
2015-04-01 16:48:15 +03:00
Dmitry Stogov
e8672deefc
Convert "Unsupported operands" fatal error into EngineException (exceptions can't be thrown at compile-time yet, so unsuported operands in constant expressions are still lead to fatal error).
2015-03-31 13:25:26 +03:00
Dmitry Stogov
0ce7b4c8c6
Removed unused functions
2015-03-24 23:40:20 +03: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