Skip to content

Stdlib: array_pop, array_shift, array_values, sizeof - #22

Merged
PurHur merged 1 commit into
masterfrom
feat/stdlib-array-pop-shift-values
May 18, 2026
Merged

Stdlib: array_pop, array_shift, array_values, sizeof#22
PurHur merged 1 commit into
masterfrom
feat/stdlib-array-pop-shift-values

Conversation

@PurHur

@PurHur PurHur commented May 18, 2026

Copy link
Copy Markdown
Owner

Summary

  • Add VM implementations for array_pop, array_shift, array_values, and sizeof (alias of count)
  • Extend HashTable with popLast, shiftFirst, and valuesCopy for packed list arrays
  • Add compliance PHPT specs, integration test, and unit tests for HashTable helpers

Test plan

  • php8.2 vendor/bin/phpunit (242 tests, all passing; 105 JIT/macro skipped as before)
  • New compliance specs: array_pop, array_shift, array_values, sizeof
  • Integration: test/real/cases/stdlib_array_stack.phpt

Made with Cursor

Extend HashTable with pop/shift for packed lists and implement
array_pop, array_shift, array_values, and sizeof (count alias) with
compliance and integration PHPT specs.

Co-authored-by: Cursor <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant