Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

cpu usage for idle php script

Discussion in 'General Discussion' started by walt, Feb 10, 2016.

  1. walt

    walt Member

    Joined:
    Oct 30, 2015
    Messages:
    13
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Houston, Tx
    cPanel Access Level:
    Website Owner
    Hello, I have a php script that runs from a terminal window. Most of the time it's waiting for a user selection:
    Code:
    $selection = stream_get_line(STDIN, 1024, PHP_EOL);
    Is the script using up cpu time, or is counted as cpu time, while waiting for the user input?

    Thanks!
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    43,885
    Likes Received:
    1,811
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello :)

    You will receive more feedback to this type of question on a forum dedicated to discussions of PHP itself. For example, I found the following third-party URL that you may find helpful:

    Stopping while waiting for user input

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice