We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a2610b5 commit 319d60bCopy full SHA for 319d60b
1 file changed
README.md
@@ -43,13 +43,13 @@ use Terremoth\Async\PhpFile;
43
use Terremoth\Async\Process;
44
45
$process = new Process();
46
-$process->send(function () {
+$age = 30;
47
+$name = 'John Doe';
48
+$fruits = ['orange', 'apple', 'grape'];
49
+
50
+$process->send(function () use ($age, $name, $fruits) {
51
/*
- // anything you want to process here
- // Important note: do not use closure vars, like:
- // $process->send(function () use ($var1, $var2, ...) { ... });
- // since the closure will be processed in another file.
52
- // Write everything you want without outside dependencies here
+ // Anything you want to process here, you can use closure vars
53
// In a future version I will create communications variables between both processes
54
*/
55
});
0 commit comments