/hphp/test/slow/ext_socket/ftell.php

http://github.com/facebook/hiphop-php · PHP · 12 lines · 11 code · 1 blank · 0 comment · 0 complexity · 306988b50f01d80f8d8d3f516850ab0a MD5 · raw file

  1. <?hh
  2. <<__EntryPoint>>
  3. function main_ftell() {
  4. $errno = null;
  5. $errstr = null;
  6. $s = fsockopen("udp://127.0.0.1", 12345, inout $errno, inout $errstr);
  7. var_dump(fwrite($s, "foomeme"));
  8. var_dump(ftell($s));
  9. var_dump(fseek($s, 7, SEEK_CUR));
  10. var_dump(fseek($s, 3));
  11. }