Same — you are going to modify $width; you need to separate it first:

```c
PHALCON_SEPARATE_PARAM(width);
```

Then, what happens if $width is a string or array? ZVAL_LONG() will just **overwrite** its value but it will **not** free the memory occupied by the string or array etc. Thus you need to free the memory yourself:

```c
zval_dtor(width);
```

The full code will look like this:

```c
PHALCON_SEPARATE_PARAM(width);
zval_dtor(width);
ZVAL_LONG(width, Z_LVAL_P(image_width));
```

BTW, are you sure that image_width and image_height will always be integers? If not, `phalcon_get_intval()` is a better (and safer) solution:

```c
PHALCON_SEPARATE_PARAM(width);
zval_dtor(width);
ZVAL_LONG(width, phalcon_get_intval(image_width));
```