}$data = new data('');$reader = new readWorker($data);$writer = new writeWorker($data);$reader->start();$writer->start();?>Also you can use $readWorker[] = $some_data; then use $this->shift() in readWorker to share datas with readWorker, but if you do so you can't have variables in readWorker as all variales will be shift by shift();