pthreads icon indicating copy to clipboard operation
pthreads copied to clipboard

const arrays cause seg fault

Open RobDonovan opened this issue 10 years ago • 0 comments

Seems that if you try to use a const that is an array defined outside the thread, then it seg faults.

const ROOMS = array('room01','room02');

class Test extends Thread {
        public function run() {

                echo "thread test:".ROOMS[0]."\n";

        }
}


print "main test:".ROOMS[0]."\n";

$test = new Test();
$test->start();
$test->join();

RobDonovan avatar Mar 05 '16 20:03 RobDonovan