Skip to content

Instantly share code, notes, and snippets.

View Makiwin's full-sized avatar

Massimiliano Vinciprova Makiwin

  • IKO international
  • Catania, Italy
  • 06:23 (UTC +02:00)
  • X @makiwin
View GitHub Profile
@scribu
scribu / test.php
Created February 8, 2013 03:12
Simulate threads in PHP using only proc_open() and co.
<?php
include __DIR__ . '/threads.php';
$commands = array();
for ( $i=0; $i<10; $i++ ) {
$commands[] = "bash -c 'sleep `shuf -i 1-5 -n 1`; echo $i'";
}