<?php declare(strict_types = 1);
/**
* Created by PhpStorm.
* User: gourab
* Date: 5/5/16
* Time: 10:28 PM
* About: Trying to reproduce the result when, trying to unserialize an object
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
lelouch@Geass ~/php-7.1.0RC2 $ sudo pecl install pthreads | |
downloading pthreads-3.1.6.tar ... | |
Starting to download pthreads-3.1.6.tar (455,168 bytes) | |
....done: 455,168 bytes | |
28 source files, building | |
running: phpize | |
Configuring for: | |
PHP Api Version: 20160303 | |
Zend Module Api No: 20160303 | |
Zend Extension Api No: 320160303 |
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
<?php declare(strict_types = 1); | |
/** | |
* Created by PhpStorm. | |
* User: lelouch | |
* Date: 21/9/16 | |
* Time: 5:52 PM | |
*/ | |
//$pair = stream_socket_pair(AF_UNIX, SOL_SOCKET, 0); | |
$pair = stream_socket_pair(1, 1, 0); |
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
<?php declare(strict_types = 1); | |
$server = stream_socket_server("tcp://127.0.0.1:47806"); | |
$serverId = (int)$server; | |
$readSockets = [$serverId => $server]; | |
$writeSockets = $pendingWriteData = []; | |
while (true) { | |
// do anything you might need to do at the beginning of each loop tick | |
$r = $readSockets; // create copies of all watchable socket arrays | |
$w = $writeSockets; | |
$e = null; // we still don't care about OOB data. Very few applications do. |
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
<?php declare(strict_types = 1); | |
/** | |
* Created by PhpStorm. | |
* User: lelouch | |
* Date: 21/9/16 | |
* Time: 5:52 PM | |
*/ | |
$client = stream_socket_client("tcp://127.0.0.1:47806"); |
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
<?php declare(strict_types = 1); | |
$socket = stream_socket_client("tcp://127.0.0.1:47806"); | |
$response = fread($socket, 1024); | |
echo "Got response: {$response}\n"; |
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
<?php declare(strict_types = 1); | |
$socket = stream_socket_client("tcp://127.0.0.1:47806"); | |
fwrite($socket, 'HELLO'); |
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
<?php | |
namespace Potatoes; | |
class Wrapper { | |
private $definition; | |
private $options; | |
public function __construct(Definition $definition) { | |
$this->definition = $definition; | |
$this->options = $definition->getOptions(); |
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
[18:47:04] debug GET /Resources/Code_Geass/01_Episode.mp4 HTTP/1.1 @ ::1:60904 | |
[18:47:04] error LogicException: Promise already resolved in /home/lelouch/Videos/vendor/amphp/amp/lib/Placeholder.php:70 | |
Stack trace: | |
#0 /home/lelouch/Videos/vendor/amphp/amp/lib/PrivatePromisor.php(20): Amp\PrivatePlaceholder->resolve(NULL, NULL) | |
#1 /home/lelouch/Videos/vendor/amphp/amp/lib/PrivatePromisor.php(57): Amp\PrivatePlaceholder->Amp\{closure}(NULL, NULL) | |
#2 /home/lelouch/Videos/vendor/amphp/aerys/lib/Server.php(479): Amp\Deferred->succeed() | |
#3 /home/lelouch/Videos/vendor/amphp/aerys/lib/Server.php(443): Aerys\Server->onWritable('000000005b0dd18...', Resource id #118, Object(Aerys\Client)) | |
#4 /home/lelouch/Videos/vendor/amphp/aerys/lib/Http1Driver.php(125): Aerys\Server->writeResponse(Object(Aerys\Client)) | |
#5 [internal function]: Aerys\Http1Driver->writer(Object(Aerys\InternalRequest)) | |
#6 /home/lelouch/Videos/vendor/amphp/aerys/lib/functions.php(373): Generator->send('4000\r\nS\xD4\xEF\xBB0w\x82\xB8\x9A...') |
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
/home/ragedwiz/php-src-php-7.1.0RC5/ext/standard/info.c:1037: undefined reference to `executor_globals_id' | |
/home/ragedwiz/php-src-php-7.1.0RC5/ext/standard/info.c:1040: undefined reference to `_tsrm_ls_cache' | |
/home/ragedwiz/php-src-php-7.1.0RC5/ext/standard/info.c:1040: undefined reference to `executor_globals_id' | |
collect2: error: ld returned 1 exit status | |
Makefile:324: recipe for target 'sapi/cgi/php-cgi' failed | |
make: *** [sapi/cgi/php-cgi] Error 1 | |
make: *** Waiting for unfinished jobs.... | |
collect2: error: ld returned 1 exit status | |
Makefile:269: recipe for target 'sapi/cli/php' failed | |
make: *** [sapi/cli/php] Error 1 |