Php mysqli fetch_all()

I just uploaded my php codes written for php 5.3 syntax. However I have noticed that even thought DreamHost support php 5.3 I got error for new array syntax, eg $myarray = []

Also mysqli->fetch_all() doesn’t seem to work. Do I miss something? Please let me know. Thank you.

Short array syntax (e.g, [] instead of array()) was introduced in PHP 5.4, not 5.3. We’re currently in the process of rolling out PHP 5.4, so you’ll need to wait a little bit for it to become available (or avoid that syntax for now).

Can you give an example of the mysqli code that isn’t working?

I was looking at mysqli->fetch_all() – I believe this function is only available for php compiled with mysql native driver; no wonder it was not working.

Do you have a timeframe for php 5.4?

Thanks for your quick reply.

From other threads that touch on the availability of PHP5.4, it sounds like we’re looking at a matter of weeks before we can use it. AndrewF will have better info than me.