Fixed PHP-813: IS_SCALAR_*() doesn't account for resources.