i tried all i.e : - Move php_pthreads.dll to the 'bin\php\ext\' directory. - Move pthreadVC2.dll to the 'bin\php\' directory. - Move pthreadVC2.dll to the 'bin\apache\bin' directory. - Move pthreadVC2.dll to the 'C:\windows\system32' directory. - 'extension=php_pthreads.dll' placed the line in php.ini
and after all i also restarted xampp but still error Class 'Thread' not found
pthreads to NOT work with webservers like Apache. They only work with CLI.
See http://php.net/manual/en/intro.pthreads.php:
Warning: The pthreads extension cannot be used in a web server environment. Threading in PHP is therefore restricted to CLI-based applications only.
Please consider reading a bit on https://www.php.net/manual/en/intro.pthreads.php
Warning The pthreads extension cannot be used in a web server environment. Threading in PHP is therefore restricted to CLI-based applications only.
Warning pthreads (v3) can only be used with PHP 7.2+: This is due to ZTS mode being unsafe in 7.0 and 7.1.
Tip Consider using parallel instead.