Gina Peter Banyard
b4ed215299
core: Warn when non-representable floats are coerced to int ( #19760 )
...
RFC: https://wiki.php.net/rfc/warnings-php-8-5#casting_out_of_range_floats_to_int
2025-09-21 23:53:16 +01:00
Jorg Sowa
23afe57f01
Added deprecation Division by zero when using power with zero as base and negative exponent
...
RFC: https://wiki.php.net/rfc/raising_zero_to_power_of_negative_number
Closes GH-13128
2024-05-22 15:05:47 +02:00
Jorg Adam Sowa
f1f33ee3a1
Added missing case 0.0 to the test runtime_compile_time_binary_operands.phpt ( #13010 )
2023-12-24 01:06:32 +01:00
Ilija Tovilo
743d3780c6
Add clang ASAN/UBSAN push job
...
Closes GH-9507
2022-09-14 23:55:46 +02:00
Nikita Popov
16b9f19678
Fix compile-time/run-time discrepancies with unary operators
...
This addresses two issues:
* ~ throws for a number of types, and we should not compile-time
evaluate in that case. Add a check similar to what we do for
binary ops.
* Unary +/- may produce a different error message due to
canonicalization of the constant operand to the RHS. To avoid
this, put the constant operand on the RHS right away.
Fixes oss-fuzz #25649 .
2020-09-15 15:08:55 +02:00
Nikita Popov
3a7c716249
Remove unnecessary check in runtime_compile_time_binary_operands.phpt
...
Now that operator errors are detected more accurately, we no longer
have any cases where we throw a compile-time error instead of a
run-time exception, so we can drop this check now.
2020-04-01 14:49:52 +02:00
Nikita Popov
1ed132e2e5
Unify checks for binary operator errors for ct eval
...
Move everything into one function and share it with opcache.
This fixes some discrepancies.
2020-04-01 14:42:58 +02:00
Nikita Popov
cdaf35033d
Improve "unsupported operands" error
...
By mentioning the operand types. We can do that now, as the
original operand types now remain available.
Closes GH-5330.
2020-04-01 11:26:43 +02:00
Nikita Popov
f8d795820e
Reindent phpt files
2020-02-03 22:52:20 +01:00
Fabien Villepinte
a555cc0b3d
Clean DONE tags from tests
...
Remove most of the `===DONE===` tags and its variations.
Keep `===DONE===` if the test output otherwise becomes empty.
Closes GH-4872.
2019-11-07 21:31:47 +01:00
Nikita Popov
59522c5a85
Generate less code in compile time binary op test
...
Don't generate try {} blocks for the operations that don't throw.
2019-07-01 17:27:42 +02:00
Fabien Villepinte
26dfce7f36
Replace dirname(__FILE__) by __DIR__ in tests
2019-03-15 22:55:30 +01:00
Gabriel Caruso
6c4e2079c0
Use EXPECT when possible
...
EXPECTF logic in run-tests.php is considerable, so let's avoid it.
2019-03-11 00:05:44 -03:00
Bob Weinand
94d3e40102
Delay array to string conversion notice until runtime
2019-02-27 18:46:31 +01:00
Bob Weinand
a72c741624
Uncomment cleanup for runtime_compile_time_binary_operands.phpt
2019-02-27 13:02:14 +01:00
rjhdby
fcfec9102b
Add runtime_compile_time_binary_operands.phpt
2019-02-27 12:59:06 +01:00