#31516 [NEW]: Clear screen or ScreenSize
From: csaba at alum dot mit dot edu
Operating system: Windows
PHP version: 5.0.3
PHP Bug Type: Feature/Change Request
Bug description: Clear screen or ScreenSize
Description:
------------
From a command line php.exe invoked from a cmd prompt under Win XP Pro,
I'd like to be able to blank the screen and/or determine the screen
height.
Motivation:
I have a program that takes several hours to run and it shows several
lines of progress statistics, which are periodically updated. I'd like to
keep this presentation professional.
I could simulate what I'm asking by interspersing 1000 "\n" whenever I'm
printing an updated set of stats. However, this puts the info at the
bottom of the screen. If I could programatically determine the height
(since it might be changed/stretched/shrunk by the user) of the DOS (CMD)
screen in lines then I could compensate for it (and if you give me that,
I'd like to know the width, too, please).
Alternately, if there was a simple way to blank the screen with the cursor
starting off at the top left, that might be another way to go (sort of a
PHP issued CLS).
Thanks for considering whether this is possible/reasonable,
Csaba Gabor from Vienna
Note: This is distinct from http://bugs.php.net/bug.php?id=24109 because
(1) as I understand it, ncurses does not apply here because it does not
work for DOS/cmd prompts. (2) I want to reuse the current window.
Apropos: Perhaps an alternate approach (Ie. feature request) is to ask
PHP to return a handle to its parent process. Perhaps it is possible to
query that (using Windows APIs) for its properties.
--
Edit bug report at http://bugs.php.net/?id=31516&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=31516&r=trysnapshot4
Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=31516&r=trysnapshot50
Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=31516&r=trysnapshot51
Fixed in CVS: http://bugs.php.net/fix.php?id=31516&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=31516&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=31516&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=31516&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=31516&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=31516&r=support
Expected behavior: http://bugs.php.net/fix.php?id=31516&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=31516&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=31516&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=31516&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=31516&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=31516&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=31516&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=31516&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=31516&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=31516&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=31516&r=mysqlcfg
Thread (6 messages)
- csaba at alum dot mit dot edu