bcamp1973 Posted October 31, 2006 Share Posted October 31, 2006 Can someone tell me the difference between using array_push($array,$x) and $array[]=$x ? More importantly are there positives/negatives to one or the other? Link to comment https://forums.phpfreaks.com/topic/25665-array_pusharrayx-vs-arrayx/ Share on other sites More sharing options...
btherl Posted October 31, 2006 Share Posted October 31, 2006 When using a profiler, array_push() counts as a function call, but array[] is only syntax. I haven't noticed any performance difference between them. Link to comment https://forums.phpfreaks.com/topic/25665-array_pusharrayx-vs-arrayx/#findComment-117147 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.