Use PHP native functions where possible