synchronized(function (int $value): int { return $value + 1; }); printf("Value after modifying in child process: %s\n", $value); delay(1); // Parent process should access parcel during this time. // Unwrapping the parcel now should give value from parent process. printf("Value in child process after being modified in parent process: %s\n", $parcel->unwrap()); $value = $parcel->synchronized(function (int $value): int { return $value + 1; }); printf("Value after modifying in child process: %s\n", $value); return $value; };