4 ms·
The first example would be better as a simple if..else. The second example is doing an instanceof check on every case where it ought to be using switch(get_clas
by onion2k 9y ago
The first example would be better as a simple if..else. The second example is doing an instanceof check on every case where it ought to be using switch(get_class($object)).