Last active
February 22, 2016 10:00
-
-
Save JesusTheHun/997edc8a47ac1155c79a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# PHP 7.0.2 | |
# Pthreads 3.1.5 | |
curl -LsS https://symfony.com/installer -o ./symfony | |
chmod a+x ./symfony | |
./symfony new segfault_proof 2.8.2 | |
cd segfault_proof/ | |
mkdir src/AppBundle/Command | |
echo "<?php | |
namespace AppBundle\Command; | |
use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand; | |
use Symfony\Component\Console\Input\InputInterface; | |
use Symfony\Component\Console\Output\OutputInterface; | |
class PthreadsCommand extends ContainerAwareCommand { | |
protected function configure() | |
{ | |
\$this | |
->setName('mt:test') | |
->setDescription('MT test') | |
; // End of definition | |
} | |
public function execute(InputInterface \$input, OutputInterface \$output) | |
{ | |
\$output->write('It works !'); | |
\$w = new \Thread(); | |
\$w->start(); | |
\$w->join(); | |
\$output->write('It still works !'); | |
} | |
}" > src/AppBundle/Command/PthreadsCommand.php | |
echo "Ready to reproduce." | |
echo "Run : php app/console mt:test" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment