🚀 DevOps Certified Professional
📅 Starting: 1st of Every Month 🤝 +91 8409492687 | 🤝 +1 (469) 756-6329 🔍 Contact@DevOpsSchool.com

Use of multi-dimensional arrays to represent data structures

DevOps

Upgrade & Secure Your Future with DevOps, SRE, DevSecOps, MLOps!

We spend hours on Instagram and YouTube and waste money on coffee and fast food, but won’t spend 30 minutes a day learning skills to boost our careers.
Master in DevOps, SRE, DevSecOps & MLOps!

Learn from Guru Rajesh Kumar and double your salary in just one year.


Get Started Now!

one of the key questions we encountered in the final phase become, why need to we use SplFixedArray as opposed to Hypertext Preprocessor arrays? we’re now equipped to explore the answer. We came throughout the idea that personal home page arrays are without a doubt not arrays as opposed to hash maps. allow us to run a small instance code in php 5.x model to peer the memory utilization of a Hypertext Preprocessor array.


allow us to create an array with a hundred,000 specific php integers. As i am running a sixty four bit machine, I count on every integer to take eight bytes every. So we are able to have around 800,000 bytes of memory ate up for the array. right here is the code:

$startMemory = memory_get_usage();
$array = range(1,100000);
$endMemory = memory_get_usage();
echo ($endMemory - $startMemory)." bytes";

If we run this code in our command prompt, we are able to see an output of 14,649,040 bytes. yes, it is correct. The memory…

Subscribe
Notify of
guest


This site uses Akismet to reduce spam. Learn how your comment data is processed.

0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x