<?php
echo preg_match('/a.*b/', str_repeat('a', 10000));