3v4l.org

run code in 300+ PHP versions simultaneously
<?php class workerThread extends \Thread { public function __construct($i){ $this->i=$i; } public function run(){ while(true){ echo $this->i; sleep(1); } } } for($i=0;$i<5;$i++){ $workers[$i]=new workerThread($i); $workers[$i]->start(); }

preferences:
30.57 ms | 402 KiB | 5 Q