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 | |
# This should be a path that the user executing the script can read and write | |
PHP_PATH=/opt/php-ts | |
# This should be a sensible version of PHP | |
PHP_VERSION=7.0.0 | |
# This should be a sensible mirror for your location | |
PHP_MIRROR=uk1.php.net | |
# This should be a released version of pthreads | |
PHP_PTHREADS=3.1.5 | |
# This should be set to 0 if you do not want to remove build directories |
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 | |
define("SECOND", 1000000); | |
class Task extends Stackable { | |
public function run() { | |
/* some random data */ | |
$this->data = md5( | |
mt_rand() * microtime()); | |
} | |
} |
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 | |
/** | |
* SMP Fibonacci | |
* | |
* Fibonacci sequencing is often used to show the virtues of such things as HHVM | |
* | |
* People think of it as a task that cannot be multi-threaded, this is flat out wrong. | |
* | |
* It can be multi-threaded, even in PHP, to great effect. | |
* |
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
diff --git a/ext/opcache/Optimizer/block_pass.c b/ext/opcache/Optimizer/block_pass.c | |
index 77b02cc99f..38c2ecb124 100644 | |
--- a/ext/opcache/Optimizer/block_pass.c | |
+++ b/ext/opcache/Optimizer/block_pass.c | |
@@ -2,7 +2,7 @@ | |
+----------------------------------------------------------------------+ | |
| Zend OPcache | | |
+----------------------------------------------------------------------+ | |
- | Copyright (c) 1998-2016 The PHP Group | | |
+ | Copyright (c) 1998-2017 The PHP Group | |
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 | |
use UI\App; | |
use UI\Window; | |
use UI\Point; | |
use UI\Size; | |
use UI\Area; | |
use UI\Controls\Box; | |
use UI\Draw\Pen; | |
use UI\Draw\Brush; | |
use UI\Draw\Path; |
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
diff --git a/src/gdhelpers.c b/src/gdhelpers.c | |
index 20fff5c..a64278b 100644 | |
--- a/src/gdhelpers.c | |
+++ b/src/gdhelpers.c | |
@@ -14,6 +14,33 @@ | |
#define SEP_TEST (separators[*((unsigned char *) s)]) | |
+static inline void* gd_malloc_wrapper(size_t size) | |
+{ |
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(ticks=1); | |
/* | |
This is your container for workers, it is only used in the process itself, so there is no need to descend from pthreads | |
*/ | |
class Pool { | |
public $max; | |
public $config; | |
public $stop; |
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
diff --git a/Zend/tests/object_types/variance_in_param.phpt b/Zend/tests/object_types/variance_in_param.phpt | |
index bcc528e..cf28dd8 100644 | |
--- a/Zend/tests/object_types/variance_in_param.phpt | |
+++ b/Zend/tests/object_types/variance_in_param.phpt | |
@@ -15,6 +15,7 @@ class Bar extends Foo { | |
var_dump(new Bar); | |
?> | |
--EXPECTF-- | |
+Warning: Declaration of Bar::qux(Qux $qux) should be compatible with Foo::qux(object $object) in %s on line 10 | |
object(Bar)#%d (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
import std.random; | |
import andlabs.libui; | |
struct Star { | |
double X; | |
double Y; | |
double V; | |
bool F; | |
double G; |
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
krakjoe@fiji:/usr/src/php-src$ sapi/cli/php -n prop.php | |
empty_loop 0.060 | |
write_prop1() 0.085 0.025 | |
write_prop2() 0.070 0.010 | |
write_prop3() 0.058 -0.002 | |
------------------------ | |
Total 0.274 | |
krakjoe@fiji:/usr/src/php-src$ sapi/cli/php -n prop.php | |
empty_loop 0.059 | |
write_prop1() 0.086 0.027 |