One might say that 
```php
list($id, $attributes) = array((int) $attributes, array());
```
would be better, but php automatically casts a string containing an integer to an integer when it is assigned as an array key.