A Brief Introduction to Multi-Threading in PHP
- Foreword
- Execution
- Sharing
- Synchronization
- Pitfalls
diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c | |
index 3f43b09..6f2ff75 100644 | |
--- a/Zend/zend_compile.c | |
+++ b/Zend/zend_compile.c | |
@@ -1845,7 +1845,7 @@ void zend_do_end_function_declaration(const znode *function_token TSRMLS_DC) /* | |
} | |
/* }}} */ | |
-void zend_do_receive_param(zend_uchar op, znode *varname, const znode *initialization, znode *class_type, zend_uchar pass_by_reference, zend_bool is_variadic TSRMLS_DC) /* {{{ */ | |
+void zend_do_receive_param(zend_uchar op, znode *varname, const znode *initialization, znode *class_type, zend_uchar pass_by_reference, zend_bool is_variadic, zend_bool is_arrayof TSRMLS_DC) /* {{{ */ |
<?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. | |
* |
diff --git a/ext/standard/string.c b/ext/standard/string.c | |
index 2f05b65..5e1db9d 100644 | |
--- a/ext/standard/string.c | |
+++ b/ext/standard/string.c | |
@@ -4210,19 +4210,20 @@ PHP_FUNCTION(hebrevc) | |
} | |
/* }}} */ | |
-/* {{{ proto string nl2br(string str [, bool is_xhtml]) | |
+/* {{{ proto string nl2br(string str [, bool is_xhtml [, integer limit]]) |
diff --git a/Zend/Zend.m4 b/Zend/Zend.m4 | |
index 945409e..ed4c0d7 100644 | |
--- a/Zend/Zend.m4 | |
+++ b/Zend/Zend.m4 | |
@@ -106,6 +106,25 @@ ZEND_FP_EXCEPT | |
ZEND_CHECK_FLOAT_PRECISION | |
+AC_MSG_CHECKING([for usable ifaddrs.h]) | |
+ AC_TRY_LINK([ |
<pre> | |
<?php | |
class Outer { | |
protected $data; | |
public function __construct(&$data) { | |
/* array access will be implemented by the time we get to here */ | |
$this->data = &$data; | |
} | |
<?php | |
/* creating 50 threads is nearly always a bad idea */ | |
class WebRequest extends Thread { | |
public $url; | |
public $data; | |
public $runtime; | |
public function __construct($url) { | |
$this->url = $url; | |
} |
<?php | |
/* | |
* This class wraps a number that should be changed exclusively by each context | |
*/ | |
class AtomicNumber extends Stackable { | |
public $value; | |
public function __construct($value) { $this->value = $value; } | |
public function run(){} | |
<?php | |
class Job extends \Stackable { | |
function run() { | |
$this->isComplete = TRUE; | |
} | |
} | |
class MyWorker extends \Worker { | |
function run() {} | |
} |
--- php-src/Zend/zend.h 2013-04-15 17:22:35.094419723 +0100 | |
+++ php-fork/Zend/zend.h 2013-04-22 15:29:38.679615669 +0100 | |
@@ -296,6 +296,34 @@ | |
# define zend_error_noreturn zend_error | |
#endif | |
+/* {{{ zend_error_t */ | |
+typedef struct zend_error_t { | |
+ zend_bool handled; | |
+ zend_ushort level; |