The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#5
|
||||
|
||||
![]() Quote:
array1 = {23, 1, 453, 87, 6, 2, 7, 9, 10, 135, 37, 134, 64, 1975, 23,753,235,97} value1 = array1[ indexof(235) ] In order to call 235 by value (or name) instead of by index, we have to use the "index of" function which searches the array linearly until it finds 235. But if we do that search and assign it to a variable, then we don't have to keep doing that time wasting search. By calling the db object by name from the $vbulletin object - the PHP engine has to do a linear search in the $vbulletin object. But if you only do that once to assign the db object to $db, you don't have to do that linear search every single time. It is faster to lookup $db than it is to lookup $vbulletin->db. However, the difference in speed is very small, and it's only noticible if you're doing thousands upon thousands of queries at once. But as I mentioned before, and as Dismounted pointed out, $db doesn't always exist - and if it doesn't (especially in custom .php files) you would have to define it yourself. |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|