Fixed php error for "in" operator

I have added the tests and also fixed the php error ``An exception has been thrown during the rendering of a template ("strlen() expects parameter 1 to be string, array given")``.
This test does not make sense to me as you are not testing the `in` operator here, just the fact that a PHP resource string representation contains `resource`. I would be more interested in a test where you test `foo in resource`, which  should always returns false.