Does PHP do a lot of type checking to slow down your code?

I have a couple of classes that deal with objects, arrays and strings.

I was wondering what kind of performance impact type checks should do, for example:

is_object (), is_array () and is_string ();

I use them quite a lot in my code.

In functions that are called many thousands of times, is it better to assume that the arguments passed are the correct type or check to prevent errors?

Is there any resource where you can see the performance weight of php functions?

+3
source share
2 answers

You can find out for yourself.

script, , , script script.

+2

. , . , - .

. - , , . .

, .

+2

All Articles