Fix typo with #elif. PHP strings don't work with size_t. Cast from size_t to int.