This file contains hidden or 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 http\Client, http\Client\Request; | |
use http\QueryString; | |
$params = new QueryString; | |
$params["foo"] = "bar"; | |
$params["bar"] = "foo"; | |
$request = new Request("POST", "http://example.com"); |
This file contains hidden or 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/config9.m4 b/config9.m4 | |
index ce63132..73b2298 100644 | |
--- a/config9.m4 | |
+++ b/config9.m4 | |
@@ -353,6 +353,8 @@ dnl ---- | |
AC_DEFINE([PHP_HTTP_HAVE_PHP_RAPHF_H], [1], [Have ext/raphf support]) | |
PHP_ADD_INCLUDE([$HTTP_EXT_RAPHF_INCDIR]) | |
fi | |
+ ], [ | |
+ AC_MSG_ERROR([Please install pecl/raphf]) |
This file contains hidden or 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 | |
require "vendor/autoload.php"; | |
require "vendor/rdlowrey/after/lib/functions.php"; | |
$promises = (new Artax\Client)->requestMulti(array_fill(0, 100, "http://www.google.com")); | |
$responses = After\all($promises)->wait(); | |
foreach ($responses as $response) { |
This file contains hidden or 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 pq | |
{ | |
interface ConverterInterface | |
{ | |
abstract public function convertTypes(); | |
abstract public function convertFromString($data); |
This file contains hidden or 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 | |
class Foo { | |
const FOO = 'Foo'; | |
const FOOBAR = self::FOO.'Bar'; | |
function baz() { | |
echo $segfault = self::FOOBAR.'Baz'; | |
} | |
} |
This file contains hidden or 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 http\Encoding\Stream; | |
$stream = new Stream\Deflate( | |
Stream::FLUSH_SYNC | | |
Stream\Deflate::TYPE_RAW ); | |
$encoded = ""; | |
$threshold = 500; |
This file contains hidden or 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/zend_API.c b/Zend/zend_API.c | |
index 10efd7a..369852f 100644 | |
--- a/Zend/zend_API.c | |
+++ b/Zend/zend_API.c | |
@@ -3504,7 +3504,7 @@ ZEND_API int zend_fcall_info_argp(zend_fcall_info *fci TSRMLS_DC, int argc, zval | |
fci->params = (zval *) erealloc(fci->params, fci->param_count * sizeof(zval)); | |
for (i = 0; i < argc; ++i) { | |
- ZVAL_COPY_VALUE(&fci->params[i], &argv[i]); | |
+ ZVAL_COPY(&fci->params[i], &argv[i]); |
This file contains hidden or 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/zend_object_handlers.h b/Zend/zend_object_handlers.h | |
index ac0965a..40bb3cb 100644 | |
--- a/Zend/zend_object_handlers.h | |
+++ b/Zend/zend_object_handlers.h | |
@@ -158,6 +158,9 @@ extern ZEND_API zend_object_handlers std_object_handlers; | |
#define zend_get_function_root_class(fbc) \ | |
((fbc)->common.prototype ? (fbc)->common.prototype->common.scope : (fbc)->common.scope) | |
+#define zend_get_custom_obj_ptr(zobjp) \ | |
+ (void *)((char *) (zobjp) - (zobjp)->handlers->offset) |
This file contains hidden or 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/zend_operators.c b/Zend/zend_operators.c | |
index 0173251..d6d6a9f 100644 | |
--- a/Zend/zend_operators.c | |
+++ b/Zend/zend_operators.c | |
@@ -713,6 +713,9 @@ try_again: | |
case IS_REFERENCE: | |
op = Z_REFVAL_P(op); | |
goto try_again; | |
+ case IS_INDIRECT: | |
+ op = Z_INDIRECT_P(op); |
This file contains hidden or 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/main/streams/streams.c b/main/streams/streams.c | |
index 204c33b..fe42cf2 100644 | |
--- a/main/streams/streams.c | |
+++ b/main/streams/streams.c | |
@@ -397,8 +397,9 @@ PHPAPI int _php_stream_free(php_stream *stream, int close_options) /* {{{ */ | |
#if STREAM_DEBUG | |
{ | |
char out[200] = ""; | |
- fprintf(stderr, "stream_free: %s:%p[%s] in_free=%d opts=%s\n", | |
- stream->ops->label, stream, stream->orig_path, stream->in_free, _php_stream_pretty_free_options(close_ |
OlderNewer