Common PHP/Laravel Pitfalls: Understanding Array Slicing
hackerone.com | blog | #php | #secure-coding | #tutorial | #laravel | #array-slice | #coding-pitfalls
Summary
A common PHP/Laravel pitfall: array_slice and Collection::slice take a length as the second argument, unlike end-index slicing in JavaScript and Python, causing subtle off-by-one bugs.
- Published
- Collected
Skip to content