- preg_match: documentation ( source)
- print_r: documentation ( source)
<?php
preg_match("/(\w+)?/", "",$matches);
print_r($matches);
echo "\n";
preg_match("/(\w*)/", "",$matches);
print_r($matches);
$test='test';
$btest= preg_match("/^\w+$/i", $test);
print_r($test);
print_r($btest . '-');