Adjusted to fit working PHP extension