<?php

/// Change this if you want, but 99999 is the limit in my system (Darwin mbp 8.10.1)
    $numchars = 99999;

/// Test begins here
    echo 'PHP: ' . phpversion() . '<br />';
    echo 'OS: ' . php_uname() . '<br />';
    $all = '';

    for($i=0; $i<$numchars-2; $i++) {
        $all .= 'x';
    }
    $all = '@' . $all . '@';
    preg_match_all('/@(.*?)@/is', $all, $results);
    if ($results[0]) {
        echo 'OK, preg_match_all() has been able to capture one text of ' . strlen($results[0][0]) . ' bytes.<br />';
    } else {
        echo 'ERROR, preg_match_all() has NOT been able to capture one text of ' . strlen($all) . ' bytes.<br />';
    }

?>

