You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Function returns exit code (0 - OK, >0 - error) and writes stdout, stderr to reference variables. The timeout variable allows you to limit the number of seconds the command can run.
You can use the `Console::loop` command to create your PHP daemon. The `loop` method already handles CPU consumption using a configurable sleep function and calls the PHP garbage collector every 5 minutes.
139
-
140
-
```php
141
-
<?php
142
-
143
-
use Utopia\CLI\Console;
144
-
145
-
include './vendor/autoload.php';
146
-
147
-
Console::loop(function() {
148
-
echo "Hello World\n";
149
-
}, 1 /* 1 second */);
150
-
```
151
-
152
86
## System Requirements
153
87
154
88
Utopia Framework requires PHP 7.4 or later. We recommend using the latest PHP version whenever possible.
155
89
156
-
157
-
158
90
## Copyright and license
159
91
160
92
The MIT License (MIT) [http://www.opensource.org/licenses/mit-license.php](http://www.opensource.org/licenses/mit-license.php)
0 commit comments