Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/php-zts
<?php
# By: https://github.com/zheltikov
# Used in: https://www.youtube.com/watch?v=L_FdpmJatdw
# Define a custom Thread class
class MyThread extends Thread {
private $name = "";
private $duration = 0;
#!/bin/bash
# By: https://github.com/zheltikov
# Based on: http://blog.programster.org/ubuntu16-04-compile-php-7-2-with-pthreads
# Used in: https://www.youtube.com/watch?v=L_FdpmJatdw
# Download the necessary packages
sudo apt update
sudo apt install libzip-dev bison autoconf build-essential pkg-config git-core libltdl-dev libbz2-dev libxml2-dev libxslt1-dev libssl-dev libicu-dev libpspell-dev libenchant-dev libmcrypt-dev libpng-dev libjpeg8-dev libfreetype6-dev libmysqlclient-dev libreadline-dev libcurl4-openssl-dev
PPA:
sudo add-apt-repository ppa:ondrej/php-zts || sudo add-apt-repository ppa:nhojohl/php7-zts
sudo apt-get update
sudo apt-get install php7.0-zts php7.0-zts-dev
PHTHREADS:
cd ~/
git clone git://github.com/krakjoe/pthreads.git
cd pthreads