File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -43,13 +43,13 @@ use Terremoth\Async\PhpFile;
4343use Terremoth\Async\Process;
4444
4545$process = new Process();
46- $process->send(function () {
46+ $age = 30;
47+ $name = 'John Doe';
48+ $fruits = ['orange', 'apple', 'grape'];
49+
50+ $process->send(function () use ($age, $name, $fruits) {
4751 /*
48- // anything you want to process here
49- // Important note: do not use closure vars, like:
50- // $process->send(function () use ($var1, $var2, ...) { ... });
51- // since the closure will be processed in another file.
52- // Write everything you want without outside dependencies here
52+ // Anything you want to process here, you can use closure vars
5353 // In a future version I will create communications variables between both processes
5454 */
5555});
You can’t perform that action at this time.
0 commit comments