# "internal zval's" error on 'var $x=array();'

- Thread: https://externals.io/message/4160
- Original archive: https://news-web.php.net/php.internals/4160
- Started by Brad Bulger on 2003-08-24T20:30:28+00:00
- Messages: 2
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #4160 — Brad Bulger — 2003-08-24T20:30:28+00:00

URL: https://externals.io/message/4160#4160

this is with current php-src: it looks related to recent changes to 
zend_API, maybe, i haven't tracked it down yet, figured someone here
could do that faster - and fix it too, heh:

   sh-2.05a# php -v
   PHP 5.0.0b2-dev (cli) (built: Aug 24 2003 12:40:08) (DEBUG)

   sh-2.05a# php -r 'class foo { var $x = array(); }'

   Fatal error: Internal zval's can't be arrays, objects or resources in 
Unknown on line 0

---

## #4161 — Brad Bulger — 2003-08-24T22:08:59+00:00

URL: https://externals.io/message/4160#4161 · In reply to: #4160

Yes, just moving the ARRAY cases in zend_API.c and zend_variables.c
stopped the error, and so far it *seems* to work. that can't be
real fix, but i hope it is helpful (diffs attached)

Brad Bulger wrote:
> this is with current php-src: it looks related to recent changes to 
> zend_API, maybe, i haven't tracked it down yet, figured someone here
> could do that faster - and fix it too, heh:
> 
>   sh-2.05a# php -v
>   PHP 5.0.0b2-dev (cli) (built: Aug 24 2003 12:40:08) (DEBUG)
> 
>   sh-2.05a# php -r 'class foo { var $x = array(); }'
> 
>   Fatal error: Internal zval's can't be arrays, objects or resources in 
> Unknown on line 0
