Skip to content

Deprecation compliance: null as array offset - #20857

Closed
KaseyJenkins wants to merge 1 commit into
php:masterfrom
KaseyJenkins:deprecation_compliance_null_array_offset
Closed

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

Conversation

@KaseyJenkins

Copy link
Copy Markdown
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
Copy Markdown
Member

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

@iluuu1994

Copy link
Copy Markdown
Member

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

@iluuu1994

Copy link
Copy Markdown
Member

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

@Girgias

Copy link
Copy Markdown
Member

@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
Copy Markdown
Member

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

@alexandre-daubois

Copy link
Copy Markdown
Member

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

Sign up for freeto 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

@KaseyJenkins@TimWolla@iluuu1994@Girgias@alexandre-daubois