You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Unexpected results with output buffering in JIT #16408
Notably, the two ECHO opcodes get merged. Tbh, I don't think you should be relying on precisely when output buffering is flushed automatically. That seems extremely volatile. If you do need the output to be flushed at a certain point in time, then there's always ob_flush(). So, IMO this is a #wontfix.
The second report may be worth fixing.
001- 3
001+ Warning: Array to string conversion in Unknown on line 0
002+
003+ Warning: Array to string conversion in Unknown on line 0
004+ 1
Opcache is converting some constant operands to strings using convert_to_string() at optimization time. However, this 1. prevents the warnings from being printed at runtime 2. prints the warning at optimization time, at which point the handler isn't installed yet. We should probably only convert operands that don't emit errors.
Activity
YuanchengJiang commentedon Oct 13, 2024
Another case:
Expected: 3 Actual: 1
iluuu1994 commentedon Oct 13, 2024
The first case is caused not by the JIT but by the optimizer:
Notably, the two
ECHOopcodes get merged. Tbh, I don't think you should be relying on precisely when output buffering is flushed automatically. That seems extremely volatile. If you do need the output to be flushed at a certain point in time, then there's alwaysob_flush(). So, IMO this is a #wontfix.The second report may be worth fixing.
Opcache is converting some constant operands to strings using
convert_to_string()at optimization time. However, this 1. prevents the warnings from being printed at runtime 2. prints the warning at optimization time, at which point the handler isn't installed yet. We should probably only convert operands that don't emit errors.Fix array to string conversion warning emitted in optimizer
Fix array to string conversion warning emitted in optimizer