eregi_variation_004.phpt 540 B

12345678910111213141516171819
  1. --TEST--
  2. Test eregi() function : usage variations - pass non-variable as arg 3, which is pass-by-ref.
  3. --FILE--
  4. <?php
  5. /* Prototype : proto int eregi(string pattern, string string [, array registers])
  6. * Description: Regular expression match
  7. * Source code: ext/standard/reg.c
  8. * Alias to functions:
  9. */
  10. var_dump(eregi('l{2}', 'hello', str_repeat('x',1)));
  11. echo "Done";
  12. ?>
  13. --EXPECTF--
  14. Strict Standards: Only variables should be passed by reference in %s on line %d
  15. Deprecated: Function eregi() is deprecated in %s on line %d
  16. int(2)
  17. Done