Php array string or var string? -



Php array string or var string? -

i've been wooking strings in php create own framework... there's "bothers" me.

$var = "hello!"; $arr = array("h","e","l","l","o","!");

can tell me 1 ($var or $arr) uses more memory other one? , why?

at first sight array utilize more memory since has position each character within array itself, i'm not sure.

the array utilize more memory string

a string , array zval structures in own right, each element in array string well, each own zval; arrays take surprising amount of memory. there fact array element comprises both key , value, each using memory

take read of article see how much memory used array structure

php arrays string var

Comments

Popular posts from this blog

xslt - DocBook 5 to PDF transform failing with error: "fo:flow" is missing child elements. Required content model: marker* -

mediawiki - How do I insert tables inside infoboxes on Wikia pages? -

Local Service User Logged into Windows -