Zend certified PHP/Magento developer

Hello, I’ve been trying to validate over 1 million strings on an online form with PHP and a client side programming language. Link to PHP: `https://3v4l.org/AtTkO`. Problems: memory usage limit of PHP and finding the best suited client side programming language to fill in the form.