Skip to content

Deprecation compliance: null as array offset#20857

Closed
KaseyJenkins wants to merge 1 commit intophp:masterfrom
KaseyJenkins:deprecation_compliance_null_array_offset
Closed

Deprecation compliance: null as array offset#20857
KaseyJenkins wants to merge 1 commit intophp:masterfrom
KaseyJenkins:deprecation_compliance_null_array_offset

Conversation

@KaseyJenkins
Copy link
Contributor

  • Change $a[null] to $a[''] to conform with PHP 8.5 deprecation.
  • Test still passes today; this update future-proofs and aligns with the deprecation.
  • No change in expected output; intent made explicit.

@TimWolla
Copy link
Member

TimWolla commented Jan 7, 2026

From what I see, this test is specifically designed to test the behavior with different data types, making this PR incorrect.

@iluuu1994
Copy link
Member

The question rather is why the JIT doesn't emit this deprecation. That discrepancy should be fixed.

@iluuu1994
Copy link
Member

/cc @Girgias. ext/opcache/tests/jit/fetch_dim_r_001.phpt should emit a deprecation, but doesn't.

@Girgias
Copy link
Member

Girgias commented Jan 9, 2026

@alexandre-daubois wrote the implementation for this in #19511, I'm happy to investigate and attempt a fix for the issue if he doesn't want to do it.

@alexandre-daubois
Copy link
Member

I'm having a look, I'll keep you updated. Thanks for the ping!

@alexandre-daubois
Copy link
Member

Let's close this one as the fix has been merged. Thanks for the report @KaseyJenkins!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants