// WITHOUT $regs (3rd argument)$int=mb_ereg('abcde','_abcde_');// [5 bytes match]var_dump($int);// int(1)$int=mb_ereg('ab','_ab_');// [2 bytes match]var_dump($int);// int(1)$int=mb_ereg('^','_ab_');// [0 bytes match]var_dump($int);// int(1)$int=mb_ereg('ab','__');// [not match]var_dump($int);// bool(false)$int=mb_ereg('','_ab_');// [error : empty pattern]
// Warning: mb_ereg(): empty pattern in ...var_dump($int);// bool(false)$int=mb_ereg('ab');// [error : fewer arguments]
// Warning: mb_ereg() expects at least 2 parameters, 1 given in ...var_dump($int);// bool(false)
// Without 3rd argument, mb_ereg() returns either int(1) or bool(false).
// WITH $regs (3rd argument)$int=mb_ereg('abcde','_abcde_',$regs);// [5 bytes match]var_dump($int);// int(5)var_dump($regs);// array(1) { [0]=> string(5) "abcde" }$int=mb_ereg('ab','_ab_',$regs);// [2 bytes match]var_dump($int);// int(2)var_dump($regs);// array(1) { [0]=> string(2) "ab" }$int=mb_ereg('^','_ab_',$regs);// [0 bytes match]var_dump($int);// int(1)var_dump($regs);// array(1) { [0]=> bool(false) }$int=mb_ereg('ab','__',$regs);// [not match]var_dump($int);// bool(false)var_dump($regs);// array(0) { }$int=mb_ereg('','_ab_',$regs);// [error : empty pattern]
// Warning: mb_ereg(): empty pattern in ...var_dump($int);// bool(false)var_dump($regs);// array(0) { }$int=mb_ereg('ab');// [error : fewer arguments]
// Warning: mb_ereg() expects at least 2 parameters, 1 given in ...var_dump($int);// bool(false)var_dump($regs);// array(0) { }
// With 3rd argument, mb_ereg() returns either int(how many bytes matched) or bool(false)
// and 3rd argument is a bit complicated.?>