0cea3ac9d5
https://github.com/msgpack/msgpack-php/pull/124 https://github.com/msgpack/msgpack-php/pull/127 ignore test suite result for now
2421 lines
61 KiB
Diff
2421 lines
61 KiB
Diff
From 6cd499d6bb59628332989e92506a9cbb374460b9 Mon Sep 17 00:00:00 2001
|
|
From: Aaron Stone <aaron@serendipity.cx>
|
|
Date: Thu, 29 Mar 2018 09:40:59 -0700
|
|
Subject: [PATCH 1/9] In PHP 7.3 zend_fcall_info_cache.initialized is removed.
|
|
|
|
Per the upgrade notes, zend_fcall_info_cache is considered initialized
|
|
if zend_fcall_info_cache.function_handler is set.
|
|
---
|
|
msgpack_convert.c | 2 ++
|
|
1 file changed, 2 insertions(+)
|
|
|
|
diff --git a/msgpack_convert.c b/msgpack_convert.c
|
|
index 117727e..b1d4334 100644
|
|
--- a/msgpack_convert.c
|
|
+++ b/msgpack_convert.c
|
|
@@ -300,7 +300,9 @@ int msgpack_convert_object(zval *return_value, zval *tpl, zval *value) /* {{{ */
|
|
fci.params = ¶ms;
|
|
fci.no_separation = 1;
|
|
|
|
+#if PHP_VERSION_ID < 70300
|
|
fcc.initialized = 1;
|
|
+#endif
|
|
fcc.function_handler = ce->constructor;
|
|
|
|
#if PHP_VERSION_ID < 70100
|
|
|
|
From d47169de9c31e8689387982dfbe31e4da7419858 Mon Sep 17 00:00:00 2001
|
|
From: Aaron Stone <aaron@serendipity.cx>
|
|
Date: Thu, 29 Mar 2018 09:42:17 -0700
|
|
Subject: [PATCH 2/9] Add PHP 7.2 and 7.3 (master) to the Travis CI matrix
|
|
|
|
---
|
|
.travis.yml | 4 ++--
|
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/.travis.yml b/.travis.yml
|
|
index d5608d2..7cd7c90 100644
|
|
--- a/.travis.yml
|
|
+++ b/.travis.yml
|
|
@@ -3,11 +3,11 @@ language: php
|
|
php:
|
|
- 7.0
|
|
- 7.1
|
|
+ - 7.2
|
|
+ - master
|
|
|
|
matrix:
|
|
fast_finish: true
|
|
- allow_failures:
|
|
- - php: 7.1
|
|
|
|
notifications:
|
|
email: false
|
|
|
|
From 00f5383020e5c9be9e9503fc9f7f954dc73437e1 Mon Sep 17 00:00:00 2001
|
|
From: Aaron Stone <aaron@serendipity.cx>
|
|
Date: Thu, 29 Mar 2018 11:13:55 -0700
|
|
Subject: [PATCH 3/9] PHP 7.3 refactored recursive data structures protections
|
|
|
|
---
|
|
msgpack_pack.c | 22 +++++++++++-----------
|
|
php_msgpack.h | 17 +++++++++++++++++
|
|
2 files changed, 28 insertions(+), 11 deletions(-)
|
|
|
|
diff --git a/msgpack_pack.c b/msgpack_pack.c
|
|
index 646453a..6100b01 100644
|
|
--- a/msgpack_pack.c
|
|
+++ b/msgpack_pack.c
|
|
@@ -280,15 +280,15 @@ static inline void msgpack_serialize_array(smart_str *buf, zval *val, HashTable
|
|
value_noref = value;
|
|
}
|
|
|
|
- if ((Z_TYPE_P(value_noref) == IS_ARRAY && ZEND_HASH_GET_APPLY_COUNT(Z_ARRVAL_P(value_noref)) > 1)) {
|
|
+ if (Z_TYPE_P(value_noref) == IS_ARRAY && Z_IS_RECURSIVE(Z_ARRVAL_P(value_noref))) {
|
|
msgpack_pack_nil(buf);
|
|
} else {
|
|
- if (Z_TYPE_P(value_noref) == IS_ARRAY && ZEND_HASH_APPLY_PROTECTION(Z_ARRVAL_P(value_noref))) {
|
|
- ZEND_HASH_INC_APPLY_COUNT(Z_ARRVAL_P(value_noref));
|
|
+ if (Z_TYPE_P(value_noref) == IS_ARRAY && Z_REFCOUNTED_P(value_noref)) {
|
|
+ Z_PROTECT_RECURSION(Z_ARRVAL_P(value_noref));
|
|
}
|
|
msgpack_serialize_zval(buf, value, var_hash);
|
|
- if (Z_TYPE_P(value_noref) == IS_ARRAY && ZEND_HASH_APPLY_PROTECTION(Z_ARRVAL_P(value_noref))) {
|
|
- ZEND_HASH_DEC_APPLY_COUNT(Z_ARRVAL_P(value_noref));
|
|
+ if (Z_TYPE_P(value_noref) == IS_ARRAY && Z_REFCOUNTED_P(value_noref)) {
|
|
+ Z_UNPROTECT_RECURSION(Z_ARRVAL_P(value_noref));
|
|
}
|
|
}
|
|
} ZEND_HASH_FOREACH_END();
|
|
@@ -298,10 +298,10 @@ static inline void msgpack_serialize_array(smart_str *buf, zval *val, HashTable
|
|
|
|
for (i = 0; i < n; i++) {
|
|
if ((data = zend_hash_index_find(ht, i)) == NULL || &data == &val ||
|
|
- (Z_TYPE_P(data) == IS_ARRAY && ZEND_HASH_GET_APPLY_COUNT(Z_ARRVAL_P(data)) > 1)) {
|
|
+ (Z_TYPE_P(data) == IS_ARRAY && Z_IS_RECURSIVE(Z_ARRVAL_P(data)))) {
|
|
msgpack_pack_nil(buf);
|
|
} else if (Z_TYPE_P(data) == IS_REFERENCE && Z_TYPE_P(Z_REFVAL_P(data)) == IS_ARRAY &&
|
|
- ZEND_HASH_GET_APPLY_COUNT(Z_ARRVAL_P(Z_REFVAL_P(data))) > 1) {
|
|
+ Z_IS_RECURSIVE(Z_ARRVAL_P(Z_REFVAL_P(data)))) {
|
|
msgpack_pack_nil(buf);
|
|
} else {
|
|
if (Z_TYPE_P(data) == IS_REFERENCE) {
|
|
@@ -310,14 +310,14 @@ static inline void msgpack_serialize_array(smart_str *buf, zval *val, HashTable
|
|
data_noref = data;
|
|
}
|
|
|
|
- if (Z_TYPE_P(data_noref) == IS_ARRAY && ZEND_HASH_APPLY_PROTECTION(Z_ARRVAL_P(data_noref))) {
|
|
- ZEND_HASH_INC_APPLY_COUNT(Z_ARRVAL_P(data_noref));
|
|
+ if (Z_TYPE_P(data_noref) == IS_ARRAY && Z_REFCOUNTED_P(data_noref)) {
|
|
+ Z_PROTECT_RECURSION(Z_ARRVAL_P(data_noref));
|
|
}
|
|
|
|
msgpack_serialize_zval(buf, data, var_hash);
|
|
|
|
- if (Z_TYPE_P(data_noref) == IS_ARRAY && ZEND_HASH_APPLY_PROTECTION(Z_ARRVAL_P(data_noref))) {
|
|
- ZEND_HASH_DEC_APPLY_COUNT(Z_ARRVAL_P(data_noref));
|
|
+ if (Z_TYPE_P(data_noref) == IS_ARRAY && Z_REFCOUNTED_P(data_noref)) {
|
|
+ Z_UNPROTECT_RECURSION(Z_ARRVAL_P(data_noref));
|
|
}
|
|
}
|
|
}
|
|
diff --git a/php_msgpack.h b/php_msgpack.h
|
|
index bbc2ad2..9c152be 100644
|
|
--- a/php_msgpack.h
|
|
+++ b/php_msgpack.h
|
|
@@ -44,4 +44,21 @@ PHP_MSGPACK_API void php_msgpack_serialize(
|
|
PHP_MSGPACK_API int php_msgpack_unserialize(
|
|
zval *return_value, char *str, size_t str_len);
|
|
|
|
+/** Backport macro from PHP 7.3*/
|
|
+#ifndef Z_IS_RECURSIVE
|
|
+#define Z_IS_RECURSIVE(obj) (ZEND_HASH_GET_APPLY_COUNT(obj) > 1)
|
|
+#endif
|
|
+
|
|
+#ifndef Z_REFCOUNTED
|
|
+#define Z_REFCOUNTED ZEND_HASH_APPLY_PROTECTION(obj)
|
|
+#endif
|
|
+
|
|
+#ifndef Z_PROTECT_RECURSION
|
|
+#define Z_PROTECT_RECURSION(obj) ZEND_HASH_INC_APPLY_COUNT(obj)
|
|
+#endif
|
|
+
|
|
+#ifndef Z_UNPROTECT_RECURSION
|
|
+#define Z_UNPROTECT_RECURSION(obj) ZEND_HASH_DEC_APPLY_COUNT(obj)
|
|
+#endif
|
|
+
|
|
#endif /* PHP_MSGPACK_H */
|
|
|
|
From 035281a93f2ee59a1f52fc65b7edc75124a72c42 Mon Sep 17 00:00:00 2001
|
|
From: Aaron Stone <aaron@serendipity.cx>
|
|
Date: Thu, 29 Mar 2018 14:23:09 -0700
|
|
Subject: [PATCH 4/9] Make sure that every test loads the msgpack module
|
|
|
|
---
|
|
tests/035.phpt | 4 ++++
|
|
tests/041.phpt | 4 ++++
|
|
tests/bug011.phpt | 19 +++++++++++--------
|
|
3 files changed, 19 insertions(+), 8 deletions(-)
|
|
|
|
diff --git a/tests/035.phpt b/tests/035.phpt
|
|
index 89c120d..ac2dc82 100644
|
|
--- a/tests/035.phpt
|
|
+++ b/tests/035.phpt
|
|
@@ -3,6 +3,10 @@ Profiling perf test.
|
|
--SKIPIF--
|
|
--FILE--
|
|
<?php
|
|
+if(!extension_loaded('msgpack')) {
|
|
+ dl('msgpack.' . PHP_SHLIB_SUFFIX);
|
|
+}
|
|
+
|
|
$data_array = array();
|
|
for ($i = 0; $i < 5000; $i++) {
|
|
$data_array[random_bytes(10)] = random_bytes(10);
|
|
diff --git a/tests/041.phpt b/tests/041.phpt
|
|
index fc4f547..3c96905 100644
|
|
--- a/tests/041.phpt
|
|
+++ b/tests/041.phpt
|
|
@@ -2,6 +2,10 @@
|
|
Check for double NaN, Inf, -Inf, 0, and -0
|
|
--FILE--
|
|
<?php
|
|
+if(!extension_loaded('msgpack')) {
|
|
+ dl('msgpack.' . PHP_SHLIB_SUFFIX);
|
|
+}
|
|
+
|
|
function test($type, $variable) {
|
|
$serialized = msgpack_serialize($variable);
|
|
$unserialized = msgpack_unserialize($serialized);
|
|
diff --git a/tests/bug011.phpt b/tests/bug011.phpt
|
|
index ad69242..0f926a3 100644
|
|
--- a/tests/bug011.phpt
|
|
+++ b/tests/bug011.phpt
|
|
@@ -2,14 +2,17 @@
|
|
Bug #011 (Check for segfault with empty array structures)
|
|
--FILE--
|
|
<?php
|
|
-
|
|
- $items = array( );
|
|
- foreach( range( 0, 1024 ) as $r ) {
|
|
- $items[] = array(
|
|
- 'foo' => array( )
|
|
- );
|
|
- }
|
|
- var_dump( count( msgpack_unpack( msgpack_pack( $items ) ) ) );
|
|
+if(!extension_loaded('msgpack')) {
|
|
+ dl('msgpack.' . PHP_SHLIB_SUFFIX);
|
|
+}
|
|
+
|
|
+$items = array( );
|
|
+foreach( range( 0, 1024 ) as $r ) {
|
|
+ $items[] = array(
|
|
+ 'foo' => array( )
|
|
+ );
|
|
+}
|
|
+var_dump( count( msgpack_unpack( msgpack_pack( $items ) ) ) );
|
|
|
|
?>
|
|
--EXPECT--
|
|
|
|
From 786aee9f73aa6507184e8540ebf06400045fe873 Mon Sep 17 00:00:00 2001
|
|
From: Aaron Stone <aaron@serendipity.cx>
|
|
Date: Thu, 29 Mar 2018 15:00:24 -0700
|
|
Subject: [PATCH 5/9] Update bug 002 test
|
|
|
|
---
|
|
tests/bug002.phpt | 21 ++++++++++-----------
|
|
1 file changed, 10 insertions(+), 11 deletions(-)
|
|
|
|
diff --git a/tests/bug002.phpt b/tests/bug002.phpt
|
|
index bfd0ad8..2100779 100644
|
|
--- a/tests/bug002.phpt
|
|
+++ b/tests/bug002.phpt
|
|
@@ -1,28 +1,27 @@
|
|
--TEST--
|
|
-Bug #2 (Deserializing a large array of nested objects gives "zend_mm_heap corrupted")
|
|
---XFAIL--
|
|
-Bug is not fixed yet
|
|
+Bug #2 (Deserializing a large array of nested objects used to give "zend_mm_heap corrupted", now gives parse error)
|
|
--SKIPIF--
|
|
+--FILE--
|
|
<?php
|
|
-if (version_compare(PHP_VERSION, '5.2.0') < 0) {
|
|
- echo "skip tests in PHP 5.2 or newer";
|
|
-}
|
|
if (!extension_loaded("msgpack")) {
|
|
- echo "skip";
|
|
+ dl('msgpack.' . PHP_SHLIB_SUFFIX);
|
|
}
|
|
---FILE--
|
|
-<?php
|
|
|
|
$data = array();
|
|
-
|
|
$tmp = &$data;
|
|
for ($i = 0; $i < 1024; $i++) {
|
|
$tmp[] = array();
|
|
$tmp = &$tmp[0];
|
|
}
|
|
|
|
+// Count the number of first-array-elements to confirm the large data structure
|
|
+var_dump(substr_count(print_r($data, true), "[0]"));
|
|
+
|
|
$newdata = msgpack_unserialize(msgpack_serialize($data));
|
|
var_dump($newdata == $data);
|
|
?>
|
|
--EXPECTF--
|
|
-bool(true)
|
|
+int(1024)
|
|
+
|
|
+Warning: [msgpack] (php_msgpack_unserialize) Parse error in %s on line %d
|
|
+bool(false)
|
|
|
|
From fe92d448fb6978e12a033988f8653a6103185e17 Mon Sep 17 00:00:00 2001
|
|
From: Aaron Stone <aaron@serendipity.cx>
|
|
Date: Thu, 29 Mar 2018 15:13:21 -0700
|
|
Subject: [PATCH 6/9] The random data tests are known to parse as data in PHP
|
|
7.1+
|
|
|
|
---
|
|
tests/040.phpt | 4 ++++
|
|
tests/040b.phpt | 4 ++++
|
|
tests/040c.phpt | 4 ++++
|
|
tests/040d.phpt | 4 ++++
|
|
4 files changed, 16 insertions(+)
|
|
|
|
diff --git a/tests/040.phpt b/tests/040.phpt
|
|
index 5b397d3..ca1f923 100644
|
|
--- a/tests/040.phpt
|
|
+++ b/tests/040.phpt
|
|
@@ -1,6 +1,10 @@
|
|
--TEST--
|
|
broken random data test
|
|
--SKIPIF--
|
|
+<?php
|
|
+if (version_compare(PHP_VERSION, '7.1.0', 'ge')) {
|
|
+ echo "skip known to produce odd data in PHP 7.1+";
|
|
+}
|
|
--FILE--
|
|
<?php
|
|
if(!extension_loaded('msgpack')) {
|
|
diff --git a/tests/040b.phpt b/tests/040b.phpt
|
|
index ea048af..ff50e6e 100644
|
|
--- a/tests/040b.phpt
|
|
+++ b/tests/040b.phpt
|
|
@@ -1,6 +1,10 @@
|
|
--TEST--
|
|
broken random data test : MessagePack class
|
|
--SKIPIF--
|
|
+<?php
|
|
+if (version_compare(PHP_VERSION, '7.1.0', 'ge')) {
|
|
+ echo "skip known to produce odd data in PHP 7.1+";
|
|
+}
|
|
--FILE--
|
|
<?php
|
|
if(!extension_loaded('msgpack')) {
|
|
diff --git a/tests/040c.phpt b/tests/040c.phpt
|
|
index bd882fa..bf15b96 100644
|
|
--- a/tests/040c.phpt
|
|
+++ b/tests/040c.phpt
|
|
@@ -1,6 +1,10 @@
|
|
--TEST--
|
|
broken random data test : MessagePackUnpacker::feed
|
|
--SKIPIF--
|
|
+<?php
|
|
+if (version_compare(PHP_VERSION, '7.1.0', 'ge')) {
|
|
+ echo "skip known to produce odd data in PHP 7.1+";
|
|
+}
|
|
--FILE--
|
|
<?php
|
|
if(!extension_loaded('msgpack')) {
|
|
diff --git a/tests/040d.phpt b/tests/040d.phpt
|
|
index de4c01d..22ddb57 100644
|
|
--- a/tests/040d.phpt
|
|
+++ b/tests/040d.phpt
|
|
@@ -1,6 +1,10 @@
|
|
--TEST--
|
|
broken random data test : MessagePackUnpacker::execute
|
|
--SKIPIF--
|
|
+<?php
|
|
+if (version_compare(PHP_VERSION, '7.1.0', 'ge')) {
|
|
+ echo "skip known to produce odd data in PHP 7.1+";
|
|
+}
|
|
--FILE--
|
|
<?php
|
|
if(!extension_loaded('msgpack')) {
|
|
|
|
From d7673658b573fdc6a5a36372f8ae45d04a6a6943 Mon Sep 17 00:00:00 2001
|
|
From: Aaron Stone <aaron@serendipity.cx>
|
|
Date: Thu, 29 Mar 2018 16:00:19 -0700
|
|
Subject: [PATCH 7/9] Assume the test runner will load the msgpack module
|
|
|
|
---
|
|
tests/001.phpt | 1 -
|
|
tests/002.phpt | 3 ---
|
|
tests/003.phpt | 3 ---
|
|
tests/004.phpt | 3 ---
|
|
tests/005.phpt | 3 ---
|
|
tests/006.phpt | 3 ---
|
|
tests/007.phpt | 3 ---
|
|
tests/008.phpt | 3 ---
|
|
tests/009.phpt | 3 ---
|
|
tests/010.phpt | 3 ---
|
|
tests/012.phpt | 3 ---
|
|
tests/013.phpt | 3 ---
|
|
tests/014.phpt | 3 ---
|
|
tests/015.phpt | 3 ---
|
|
tests/015b.phpt | 3 ---
|
|
tests/015e.phpt | 3 ---
|
|
tests/016.phpt | 3 ---
|
|
tests/017.phpt | 3 ---
|
|
tests/018.phpt | 3 ---
|
|
tests/019.phpt | 3 ---
|
|
tests/020.phpt | 3 ---
|
|
tests/021.phpt | 3 ---
|
|
tests/022.phpt | 3 ---
|
|
tests/023.phpt | 3 ---
|
|
tests/024.phpt | 3 ---
|
|
tests/025.phpt | 3 ---
|
|
tests/026.phpt | 3 ---
|
|
tests/027.phpt | 3 ---
|
|
tests/028.phpt | 3 ---
|
|
tests/029.phpt | 1 -
|
|
tests/031.phpt | 3 ---
|
|
tests/032.phpt | 3 ---
|
|
tests/033.phpt | 3 ---
|
|
tests/034.phpt | 3 ---
|
|
tests/035.phpt | 3 ---
|
|
tests/040.phpt | 3 ---
|
|
tests/040b.phpt | 3 ---
|
|
tests/040c.phpt | 3 ---
|
|
tests/040d.phpt | 3 ---
|
|
tests/041.phpt | 3 ---
|
|
tests/042.phpt | 3 ---
|
|
tests/050.phpt | 3 ---
|
|
tests/060.phpt | 3 ---
|
|
tests/061.phpt | 3 ---
|
|
tests/062.phpt | 3 ---
|
|
tests/063.phpt | 3 ---
|
|
tests/064.phpt | 3 ---
|
|
tests/065.phpt | 3 ---
|
|
tests/066.phpt | 3 ---
|
|
tests/067.phpt | 3 ---
|
|
tests/070.phpt | 3 ---
|
|
tests/071.phpt | 3 ---
|
|
tests/072.phpt | 3 ---
|
|
tests/073.phpt | 3 ---
|
|
tests/080.phpt | 3 ---
|
|
tests/081.phpt | 3 ---
|
|
tests/082.phpt | 3 ---
|
|
tests/083.phpt | 3 ---
|
|
tests/084.phpt | 3 ---
|
|
tests/085.phpt | 3 ---
|
|
tests/086.phpt | 3 ---
|
|
tests/087.phpt | 3 ---
|
|
tests/088.phpt | 3 ---
|
|
tests/089.phpt | 3 ---
|
|
tests/090.phpt | 4 ----
|
|
tests/091.phpt | 4 ----
|
|
tests/092.phpt | 4 ----
|
|
tests/093.phpt | 4 ----
|
|
tests/094.phpt | 4 ----
|
|
tests/095.phpt | 4 ----
|
|
tests/096.phpt | 4 ----
|
|
tests/097.phpt | 4 ----
|
|
tests/098.phpt | 4 ----
|
|
tests/099.phpt | 4 ----
|
|
tests/100.phpt | 4 ----
|
|
tests/101.phpt | 4 ----
|
|
tests/102.phpt | 4 ----
|
|
tests/103.phpt | 4 ----
|
|
tests/104.phpt | 4 ----
|
|
tests/105.phpt | 4 ----
|
|
tests/106.phpt | 4 ----
|
|
tests/107.phpt | 4 ----
|
|
tests/108.phpt | 4 ----
|
|
tests/109.phpt | 4 ----
|
|
tests/110.phpt | 4 ----
|
|
tests/111.phpt | 4 ----
|
|
tests/112.phpt | 4 ----
|
|
tests/113.phpt | 4 ----
|
|
tests/114.phpt | 4 ----
|
|
tests/115.phpt | 4 ----
|
|
tests/116.phpt | 4 ----
|
|
tests/117.phpt | 4 ----
|
|
tests/118.phpt | 4 ----
|
|
tests/119.phpt | 4 ----
|
|
tests/120.phpt | 4 ----
|
|
tests/121.phpt | 4 ----
|
|
tests/122.phpt | 4 ----
|
|
tests/123.phpt | 4 ----
|
|
tests/124.phpt | 4 ----
|
|
tests/125.phpt | 4 ----
|
|
tests/126.phpt | 4 ----
|
|
tests/127.phpt | 4 ----
|
|
tests/128.phpt | 4 ----
|
|
tests/129.phpt | 4 ----
|
|
tests/130.phpt | 4 ----
|
|
tests/131.phpt | 4 ----
|
|
tests/132.phpt | 4 ----
|
|
tests/133.phpt | 4 ----
|
|
tests/134.phpt | 4 ----
|
|
tests/135.phpt | 4 ----
|
|
tests/136.phpt | 4 ----
|
|
tests/137.phpt | 31 ++++++++++++++-----------------
|
|
tests/138.phpt | 34 +++++++++++++++-------------------
|
|
tests/139.phpt | 4 ----
|
|
tests/bug002.phpt | 3 ---
|
|
tests/bug006.phpt | 3 ---
|
|
tests/bug011.phpt | 3 ---
|
|
tests/bug012.phpt | 3 ---
|
|
tests/bug013.phpt | 4 ----
|
|
tests/issue023.phpt | 4 ----
|
|
tests/issue080.phpt | 4 ----
|
|
tests/issue094.phpt | 4 ----
|
|
122 files changed, 29 insertions(+), 444 deletions(-)
|
|
|
|
diff --git a/tests/001.phpt b/tests/001.phpt
|
|
index 840ae46..4f4f23d 100644
|
|
--- a/tests/001.phpt
|
|
+++ b/tests/001.phpt
|
|
@@ -1,7 +1,6 @@
|
|
--TEST--
|
|
Check for msgpack presence
|
|
--SKIPIF--
|
|
-<?php if (!extension_loaded("msgpack")) print "skip"; ?>
|
|
--FILE--
|
|
<?php
|
|
echo "msgpack extension is available";
|
|
diff --git a/tests/002.phpt b/tests/002.phpt
|
|
index 75b9488..51e802d 100644
|
|
--- a/tests/002.phpt
|
|
+++ b/tests/002.phpt
|
|
@@ -3,9 +3,6 @@ Check for null serialisation
|
|
--SKIPIF--
|
|
--FILE--
|
|
<?php
|
|
-if(!extension_loaded('msgpack')) {
|
|
- dl('msgpack.' . PHP_SHLIB_SUFFIX);
|
|
-}
|
|
|
|
function test($type, $variable) {
|
|
$serialized = msgpack_serialize($variable);
|
|
diff --git a/tests/003.phpt b/tests/003.phpt
|
|
index 8c85f90..848b3f6 100644
|
|
--- a/tests/003.phpt
|
|
+++ b/tests/003.phpt
|
|
@@ -3,9 +3,6 @@ Check for bool serialisation
|
|
--SKIPIF--
|
|
--FILE--
|
|
<?php
|
|
-if(!extension_loaded('msgpack')) {
|
|
- dl('msgpack.' . PHP_SHLIB_SUFFIX);
|
|
-}
|
|
|
|
function test($type, $variable) {
|
|
$serialized = msgpack_serialize($variable);
|
|
diff --git a/tests/004.phpt b/tests/004.phpt
|
|
index 8c352ec..bb27221 100644
|
|
--- a/tests/004.phpt
|
|
+++ b/tests/004.phpt
|
|
@@ -3,9 +3,6 @@ Check for integer serialisation
|
|
--SKIPIF--
|
|
--FILE--
|
|
<?php
|
|
-if(!extension_loaded('msgpack')) {
|
|
- dl('msgpack.' . PHP_SHLIB_SUFFIX);
|
|
-}
|
|
|
|
function test($type, $variable) {
|
|
$serialized = msgpack_serialize($variable);
|
|
diff --git a/tests/005.phpt b/tests/005.phpt
|
|
index 2156ffa..8de619e 100644
|
|
--- a/tests/005.phpt
|
|
+++ b/tests/005.phpt
|
|
@@ -3,9 +3,6 @@ Check for double serialisation
|
|
--SKIPIF--
|
|
--FILE--
|
|
<?php
|
|
-if(!extension_loaded('msgpack')) {
|
|
- dl('msgpack.' . PHP_SHLIB_SUFFIX);
|
|
-}
|
|
|
|
function test($type, $variable) {
|
|
$serialized = msgpack_serialize($variable);
|
|
diff --git a/tests/006.phpt b/tests/006.phpt
|
|
index 6832355..db0d773 100644
|
|
--- a/tests/006.phpt
|
|
+++ b/tests/006.phpt
|
|
@@ -3,9 +3,6 @@ Check for simple string serialization
|
|
--SKIPIF--
|
|
--FILE--
|
|
<?php
|
|
-if(!extension_loaded('msgpack')) {
|
|
- dl('msgpack.' . PHP_SHLIB_SUFFIX);
|
|
-}
|
|
|
|
function test($type, $variable) {
|
|
$serialized = msgpack_serialize($variable);
|
|
diff --git a/tests/007.phpt b/tests/007.phpt
|
|
index 2bafc7b..0ed2e02 100644
|
|
--- a/tests/007.phpt
|
|
+++ b/tests/007.phpt
|
|
@@ -3,9 +3,6 @@ Check for simple array serialization
|
|
--SKIPIF--
|
|
--FILE--
|
|
<?php
|
|
-if(!extension_loaded('msgpack')) {
|
|
- dl('msgpack.' . PHP_SHLIB_SUFFIX);
|
|
-}
|
|
|
|
function test($type, $variable) {
|
|
$serialized = msgpack_serialize($variable);
|
|
diff --git a/tests/008.phpt b/tests/008.phpt
|
|
index 382a1d1..7f88720 100644
|
|
--- a/tests/008.phpt
|
|
+++ b/tests/008.phpt
|
|
@@ -3,9 +3,6 @@ Check for array+string serialization
|
|
--SKIPIF--
|
|
--FILE--
|
|
<?php
|
|
-if(!extension_loaded('msgpack')) {
|
|
- dl('msgpack.' . PHP_SHLIB_SUFFIX);
|
|
-}
|
|
|
|
function test($type, $variable) {
|
|
$serialized = msgpack_serialize($variable);
|
|
diff --git a/tests/009.phpt b/tests/009.phpt
|
|
index feed76f..75ca2e9 100644
|
|
--- a/tests/009.phpt
|
|
+++ b/tests/009.phpt
|
|
@@ -9,9 +9,6 @@ if ((version_compare(PHP_VERSION, '5.2.13') <= 0) ||
|
|
}
|
|
--FILE--
|
|
<?php
|
|
-if(!extension_loaded('msgpack')) {
|
|
- dl('msgpack.' . PHP_SHLIB_SUFFIX);
|
|
-}
|
|
|
|
function test($type, $variable, $test) {
|
|
$serialized = msgpack_serialize($variable);
|
|
diff --git a/tests/010.phpt b/tests/010.phpt
|
|
index 9eb77a6..e6b98bc 100644
|
|
--- a/tests/010.phpt
|
|
+++ b/tests/010.phpt
|
|
@@ -3,9 +3,6 @@ Array test
|
|
--SKIPIF--
|
|
--FILE--
|
|
<?php
|
|
-if(!extension_loaded('msgpack')) {
|
|
- dl('msgpack.' . PHP_SHLIB_SUFFIX);
|
|
-}
|
|
|
|
function test($type, $variable, $test) {
|
|
$serialized = msgpack_serialize($variable);
|
|
diff --git a/tests/012.phpt b/tests/012.phpt
|
|
index f6bf5a8..3057f93 100644
|
|
--- a/tests/012.phpt
|
|
+++ b/tests/012.phpt
|
|
@@ -7,9 +7,6 @@ if (version_compare(PHP_VERSION, '5.2.0') < 0) {
|
|
}
|
|
--FILE--
|
|
<?php
|
|
-if(!extension_loaded('msgpack')) {
|
|
- dl('msgpack.' . PHP_SHLIB_SUFFIX);
|
|
-}
|
|
|
|
function test($type, $variable, $test) {
|
|
$serialized = msgpack_serialize($variable);
|
|
diff --git a/tests/013.phpt b/tests/013.phpt
|
|
index caf3434..2e628ef 100644
|
|
--- a/tests/013.phpt
|
|
+++ b/tests/013.phpt
|
|
@@ -3,9 +3,6 @@ Object-Array test
|
|
--SKIPIF--
|
|
--FILE--
|
|
<?php
|
|
-if(!extension_loaded('msgpack')) {
|
|
- dl('msgpack.' . PHP_SHLIB_SUFFIX);
|
|
-}
|
|
|
|
function test($type, $variable, $test) {
|
|
$serialized = msgpack_serialize($variable);
|
|
diff --git a/tests/014.phpt b/tests/014.phpt
|
|
index c74f5f4..66ca37b 100644
|
|
--- a/tests/014.phpt
|
|
+++ b/tests/014.phpt
|
|
@@ -3,9 +3,6 @@ Object-Reference test
|
|
--SKIPIF--
|
|
--FILE--
|
|
<?php
|
|
-if(!extension_loaded('msgpack')) {
|
|
- dl('msgpack.' . PHP_SHLIB_SUFFIX);
|
|
-}
|
|
|
|
function test($type, $variable, $test) {
|
|
$serialized = msgpack_serialize($variable);
|
|
diff --git a/tests/015.phpt b/tests/015.phpt
|
|
index 4bd0f52..470abd2 100644
|
|
--- a/tests/015.phpt
|
|
+++ b/tests/015.phpt
|
|
@@ -11,9 +11,6 @@ if (!extension_loaded("session")) {
|
|
}
|
|
--FILE--
|
|
<?php
|
|
-if(!extension_loaded('msgpack')) {
|
|
- dl('msgpack.' . PHP_SHLIB_SUFFIX);
|
|
-}
|
|
|
|
$output = '';
|
|
|
|
diff --git a/tests/015b.phpt b/tests/015b.phpt
|
|
index de383ee..e934b75 100644
|
|
--- a/tests/015b.phpt
|
|
+++ b/tests/015b.phpt
|
|
@@ -12,9 +12,6 @@ if (!extension_loaded("session")) {
|
|
session.serialize_handler=msgpack
|
|
--FILE--
|
|
<?php
|
|
-if(!extension_loaded('msgpack')) {
|
|
- dl('msgpack.' . PHP_SHLIB_SUFFIX);
|
|
-}
|
|
|
|
$output = '';
|
|
|
|
diff --git a/tests/015e.phpt b/tests/015e.phpt
|
|
index b18a34a..778730f 100644
|
|
--- a/tests/015e.phpt
|
|
+++ b/tests/015e.phpt
|
|
@@ -10,9 +10,6 @@ if (!extension_loaded("session")) {
|
|
}
|
|
--FILE--
|
|
<?php
|
|
-if(!extension_loaded('msgpack')) {
|
|
- dl('msgpack.' . PHP_SHLIB_SUFFIX);
|
|
-}
|
|
|
|
error_reporting(0);
|
|
|
|
diff --git a/tests/016.phpt b/tests/016.phpt
|
|
index 8fe47e8..f23b6fe 100644
|
|
--- a/tests/016.phpt
|
|
+++ b/tests/016.phpt
|
|
@@ -7,9 +7,6 @@ if (version_compare(PHP_VERSION, '5.2.0') < 0) {
|
|
}
|
|
--FILE--
|
|
<?php
|
|
-if(!extension_loaded('msgpack')) {
|
|
- dl('msgpack.' . PHP_SHLIB_SUFFIX);
|
|
-}
|
|
|
|
function test($type, $variable, $test) {
|
|
$serialized = msgpack_serialize($variable);
|
|
diff --git a/tests/017.phpt b/tests/017.phpt
|
|
index 6fbbd90..863b5d9 100644
|
|
--- a/tests/017.phpt
|
|
+++ b/tests/017.phpt
|
|
@@ -3,9 +3,6 @@ Object test, __wakeup
|
|
--SKIPIF--
|
|
--FILE--
|
|
<?php
|
|
-if(!extension_loaded('msgpack')) {
|
|
- dl('msgpack.' . PHP_SHLIB_SUFFIX);
|
|
-}
|
|
|
|
function test($type, $variable, $test) {
|
|
$serialized = msgpack_serialize($variable);
|
|
diff --git a/tests/018.phpt b/tests/018.phpt
|
|
index b7e3666..bda081b 100644
|
|
--- a/tests/018.phpt
|
|
+++ b/tests/018.phpt
|
|
@@ -3,9 +3,6 @@ Object test, __sleep error cases
|
|
--SKIPIF--
|
|
--FILE--
|
|
<?php
|
|
-if(!extension_loaded('msgpack')) {
|
|
- dl('msgpack.' . PHP_SHLIB_SUFFIX);
|
|
-}
|
|
|
|
function test($type, $variable, $test) {
|
|
$serialized = msgpack_serialize($variable);
|
|
diff --git a/tests/019.phpt b/tests/019.phpt
|
|
index 693f5cf..d5b54f4 100644
|
|
--- a/tests/019.phpt
|
|
+++ b/tests/019.phpt
|
|
@@ -3,9 +3,6 @@ Object test, __autoload
|
|
--SKIPIF--
|
|
--FILE--
|
|
<?php
|
|
-if(!extension_loaded('msgpack')) {
|
|
- dl('msgpack.' . PHP_SHLIB_SUFFIX);
|
|
-}
|
|
|
|
function test($type, $variable, $test) {
|
|
$serialized = pack('H*', $variable);
|
|
diff --git a/tests/020.phpt b/tests/020.phpt
|
|
index 4ed30e8..2000bd4 100644
|
|
--- a/tests/020.phpt
|
|
+++ b/tests/020.phpt
|
|
@@ -3,9 +3,6 @@ Object test, incomplete class
|
|
--SKIPIF--
|
|
--FILE--
|
|
<?php
|
|
-if(!extension_loaded('msgpack')) {
|
|
- dl('msgpack.' . PHP_SHLIB_SUFFIX);
|
|
-}
|
|
|
|
function test($type, $variable, $test) {
|
|
$serialized = pack('H*', $variable);
|
|
diff --git a/tests/021.phpt b/tests/021.phpt
|
|
index 137d100..6e4e5b8 100644
|
|
--- a/tests/021.phpt
|
|
+++ b/tests/021.phpt
|
|
@@ -7,9 +7,6 @@ if (version_compare(PHP_VERSION, '5.1.0') < 0) {
|
|
}
|
|
--FILE--
|
|
<?php
|
|
-if(!extension_loaded('msgpack')) {
|
|
- dl('msgpack.' . PHP_SHLIB_SUFFIX);
|
|
-}
|
|
|
|
function test($type, $variable, $test) {
|
|
$serialized = msgpack_serialize($variable);
|
|
diff --git a/tests/022.phpt b/tests/022.phpt
|
|
index 7eab4b8..dc21977 100644
|
|
--- a/tests/022.phpt
|
|
+++ b/tests/022.phpt
|
|
@@ -5,9 +5,6 @@ Object test, unserialize_callback_func
|
|
unserialize_callback_func=autoload
|
|
--FILE--
|
|
<?php
|
|
-if(!extension_loaded('msgpack')) {
|
|
- dl('msgpack.' . PHP_SHLIB_SUFFIX);
|
|
-}
|
|
|
|
function test($type, $variable, $test) {
|
|
$serialized = pack('H*', $variable);
|
|
diff --git a/tests/023.phpt b/tests/023.phpt
|
|
index 442fe3d..c28a102 100644
|
|
--- a/tests/023.phpt
|
|
+++ b/tests/023.phpt
|
|
@@ -3,9 +3,6 @@ Resource
|
|
--SKIPIF--
|
|
--FILE--
|
|
<?php
|
|
-if(!extension_loaded('msgpack')) {
|
|
- dl('msgpack.' . PHP_SHLIB_SUFFIX);
|
|
-}
|
|
|
|
error_reporting(0);
|
|
|
|
diff --git a/tests/024.phpt b/tests/024.phpt
|
|
index 589b788..cb38b38 100644
|
|
--- a/tests/024.phpt
|
|
+++ b/tests/024.phpt
|
|
@@ -9,9 +9,6 @@ if ((version_compare(PHP_VERSION, '5.2.13') <= 0) ||
|
|
}
|
|
--FILE--
|
|
<?php
|
|
-if(!extension_loaded('msgpack')) {
|
|
- dl('msgpack.' . PHP_SHLIB_SUFFIX);
|
|
-}
|
|
|
|
function test($type, $variable, $test) {
|
|
$serialized = msgpack_serialize($variable);
|
|
diff --git a/tests/025.phpt b/tests/025.phpt
|
|
index cb45a39..2c47be7 100644
|
|
--- a/tests/025.phpt
|
|
+++ b/tests/025.phpt
|
|
@@ -7,9 +7,6 @@ if (version_compare(PHP_VERSION, '5.2.0') < 0) {
|
|
}
|
|
--FILE--
|
|
<?php
|
|
-if(!extension_loaded('msgpack')) {
|
|
- dl('msgpack.' . PHP_SHLIB_SUFFIX);
|
|
-}
|
|
|
|
function test($type, $variable, $test) {
|
|
$serialized = msgpack_serialize($variable);
|
|
diff --git a/tests/026.phpt b/tests/026.phpt
|
|
index d89654d..60d6938 100644
|
|
--- a/tests/026.phpt
|
|
+++ b/tests/026.phpt
|
|
@@ -10,9 +10,6 @@ if ((version_compare(PHP_VERSION, '5.2.13') <= 0) ||
|
|
}
|
|
--FILE--
|
|
<?php
|
|
-if(!extension_loaded('msgpack')) {
|
|
- dl('msgpack.' . PHP_SHLIB_SUFFIX);
|
|
-}
|
|
|
|
function test($type, $variable, $test) {
|
|
$serialized = msgpack_serialize($variable);
|
|
diff --git a/tests/027.phpt b/tests/027.phpt
|
|
index c8f89ab..0063fb7 100644
|
|
--- a/tests/027.phpt
|
|
+++ b/tests/027.phpt
|
|
@@ -10,9 +10,6 @@ if (!extension_loaded("session")) {
|
|
}
|
|
--FILE--
|
|
<?php
|
|
-if(!extension_loaded('msgpack')) {
|
|
- dl('msgpack.' . PHP_SHLIB_SUFFIX);
|
|
-}
|
|
|
|
$output = '';
|
|
|
|
diff --git a/tests/028.phpt b/tests/028.phpt
|
|
index a55b90b..54a7037 100644
|
|
--- a/tests/028.phpt
|
|
+++ b/tests/028.phpt
|
|
@@ -12,9 +12,6 @@ if (!extension_loaded("session")) {
|
|
}
|
|
--FILE--
|
|
<?php
|
|
-if(!extension_loaded('msgpack')) {
|
|
- dl('msgpack.' . PHP_SHLIB_SUFFIX);
|
|
-}
|
|
|
|
class Foo {
|
|
private static $s1 = array();
|
|
diff --git a/tests/029.phpt b/tests/029.phpt
|
|
index a7e3887..c21722c 100644
|
|
--- a/tests/029.phpt
|
|
+++ b/tests/029.phpt
|
|
@@ -2,7 +2,6 @@
|
|
Msgpack module info
|
|
--SKIPIF--
|
|
<?php
|
|
-if (!extension_loaded("msgpack")) print "skip";
|
|
if (!extension_loaded("session")) {
|
|
echo "skip needs session enabled";
|
|
}
|
|
diff --git a/tests/031.phpt b/tests/031.phpt
|
|
index ce3a7c4..96758b3 100644
|
|
--- a/tests/031.phpt
|
|
+++ b/tests/031.phpt
|
|
@@ -7,9 +7,6 @@ if (version_compare(PHP_VERSION, '5.1.0') < 0) {
|
|
}
|
|
--FILE--
|
|
<?php
|
|
-if(!extension_loaded('msgpack')) {
|
|
- dl('msgpack.' . PHP_SHLIB_SUFFIX);
|
|
-}
|
|
|
|
function test($variable) {
|
|
$serialized = msgpack_serialize($variable);
|
|
diff --git a/tests/032.phpt b/tests/032.phpt
|
|
index b120ea9..d738dd7 100644
|
|
--- a/tests/032.phpt
|
|
+++ b/tests/032.phpt
|
|
@@ -3,9 +3,6 @@ Object test, __sleep and __wakeup exceptions
|
|
--SKIPIF--
|
|
--FILE--
|
|
<?php
|
|
-if(!extension_loaded('msgpack')) {
|
|
- dl('msgpack.' . PHP_SHLIB_SUFFIX);
|
|
-}
|
|
|
|
error_reporting(0);
|
|
|
|
diff --git a/tests/033.phpt b/tests/033.phpt
|
|
index 682fd4d..19a5753 100644
|
|
--- a/tests/033.phpt
|
|
+++ b/tests/033.phpt
|
|
@@ -3,9 +3,6 @@ Object test, cyclic references
|
|
--SKIPIF--
|
|
--FILE--
|
|
<?php
|
|
-if(!extension_loaded('msgpack')) {
|
|
- dl('msgpack.' . PHP_SHLIB_SUFFIX);
|
|
-}
|
|
|
|
class Foo {
|
|
public $parent;
|
|
diff --git a/tests/034.phpt b/tests/034.phpt
|
|
index 94fea4a..6f4105f 100644
|
|
--- a/tests/034.phpt
|
|
+++ b/tests/034.phpt
|
|
@@ -3,9 +3,6 @@ Unserialize invalid random data
|
|
--SKIPIF--
|
|
--FILE--
|
|
<?php
|
|
-if(!extension_loaded('msgpack')) {
|
|
- dl('msgpack.' . PHP_SHLIB_SUFFIX);
|
|
-}
|
|
|
|
$datas = array(
|
|
87817,
|
|
diff --git a/tests/035.phpt b/tests/035.phpt
|
|
index ac2dc82..e07d9b2 100644
|
|
--- a/tests/035.phpt
|
|
+++ b/tests/035.phpt
|
|
@@ -3,9 +3,6 @@ Profiling perf test.
|
|
--SKIPIF--
|
|
--FILE--
|
|
<?php
|
|
-if(!extension_loaded('msgpack')) {
|
|
- dl('msgpack.' . PHP_SHLIB_SUFFIX);
|
|
-}
|
|
|
|
$data_array = array();
|
|
for ($i = 0; $i < 5000; $i++) {
|
|
diff --git a/tests/040.phpt b/tests/040.phpt
|
|
index ca1f923..aa90e4c 100644
|
|
--- a/tests/040.phpt
|
|
+++ b/tests/040.phpt
|
|
@@ -7,9 +7,6 @@ if (version_compare(PHP_VERSION, '7.1.0', 'ge')) {
|
|
}
|
|
--FILE--
|
|
<?php
|
|
-if(!extension_loaded('msgpack')) {
|
|
- dl('msgpack.' . PHP_SHLIB_SUFFIX);
|
|
-}
|
|
|
|
error_reporting(E_ERROR | E_PARSE);
|
|
|
|
diff --git a/tests/040b.phpt b/tests/040b.phpt
|
|
index ff50e6e..12a5b6c 100644
|
|
--- a/tests/040b.phpt
|
|
+++ b/tests/040b.phpt
|
|
@@ -7,9 +7,6 @@ if (version_compare(PHP_VERSION, '7.1.0', 'ge')) {
|
|
}
|
|
--FILE--
|
|
<?php
|
|
-if(!extension_loaded('msgpack')) {
|
|
- dl('msgpack.' . PHP_SHLIB_SUFFIX);
|
|
-}
|
|
|
|
error_reporting(E_ERROR | E_PARSE);
|
|
|
|
diff --git a/tests/040c.phpt b/tests/040c.phpt
|
|
index bf15b96..c215f8b 100644
|
|
--- a/tests/040c.phpt
|
|
+++ b/tests/040c.phpt
|
|
@@ -7,9 +7,6 @@ if (version_compare(PHP_VERSION, '7.1.0', 'ge')) {
|
|
}
|
|
--FILE--
|
|
<?php
|
|
-if(!extension_loaded('msgpack')) {
|
|
- dl('msgpack.' . PHP_SHLIB_SUFFIX);
|
|
-}
|
|
|
|
error_reporting(E_ERROR | E_PARSE);
|
|
|
|
diff --git a/tests/040d.phpt b/tests/040d.phpt
|
|
index 22ddb57..898cc25 100644
|
|
--- a/tests/040d.phpt
|
|
+++ b/tests/040d.phpt
|
|
@@ -7,9 +7,6 @@ if (version_compare(PHP_VERSION, '7.1.0', 'ge')) {
|
|
}
|
|
--FILE--
|
|
<?php
|
|
-if(!extension_loaded('msgpack')) {
|
|
- dl('msgpack.' . PHP_SHLIB_SUFFIX);
|
|
-}
|
|
|
|
error_reporting(E_ERROR | E_PARSE);
|
|
|
|
diff --git a/tests/041.phpt b/tests/041.phpt
|
|
index 3c96905..9044a41 100644
|
|
--- a/tests/041.phpt
|
|
+++ b/tests/041.phpt
|
|
@@ -2,9 +2,6 @@
|
|
Check for double NaN, Inf, -Inf, 0, and -0
|
|
--FILE--
|
|
<?php
|
|
-if(!extension_loaded('msgpack')) {
|
|
- dl('msgpack.' . PHP_SHLIB_SUFFIX);
|
|
-}
|
|
|
|
function test($type, $variable) {
|
|
$serialized = msgpack_serialize($variable);
|
|
diff --git a/tests/042.phpt b/tests/042.phpt
|
|
index 83e8bc7..1477932 100644
|
|
--- a/tests/042.phpt
|
|
+++ b/tests/042.phpt
|
|
@@ -7,9 +7,6 @@ if (version_compare(PHP_VERSION, '5.3.0') < 0) {
|
|
}
|
|
--FILE--
|
|
<?php
|
|
-if(!extension_loaded('msgpack')) {
|
|
- dl('msgpack.' . PHP_SHLIB_SUFFIX);
|
|
-}
|
|
|
|
$closure = function ($x) {
|
|
return $x + 1;
|
|
diff --git a/tests/050.phpt b/tests/050.phpt
|
|
index 35a429c..422d283 100644
|
|
--- a/tests/050.phpt
|
|
+++ b/tests/050.phpt
|
|
@@ -3,9 +3,6 @@ Check for array unserialization
|
|
--SKIPIF--
|
|
--FILE--
|
|
<?php
|
|
-if(!extension_loaded('msgpack')) {
|
|
- dl('msgpack.' . PHP_SHLIB_SUFFIX);
|
|
-}
|
|
|
|
function test($type, $variable) {
|
|
$unserialized = msgpack_unserialize(pack('H*', $variable));
|
|
diff --git a/tests/060.phpt b/tests/060.phpt
|
|
index f15c838..7840290 100644
|
|
--- a/tests/060.phpt
|
|
+++ b/tests/060.phpt
|
|
@@ -9,9 +9,6 @@ if ((version_compare(PHP_VERSION, '5.2.13') <= 0) ||
|
|
}
|
|
--FILE--
|
|
<?php
|
|
-if(!extension_loaded('msgpack')) {
|
|
- dl('msgpack.' . PHP_SHLIB_SUFFIX);
|
|
-}
|
|
|
|
function test($type, $variable, $test = null) {
|
|
$serialized = msgpack_serialize($variable);
|
|
diff --git a/tests/061.phpt b/tests/061.phpt
|
|
index cb98e41..920b6bf 100644
|
|
--- a/tests/061.phpt
|
|
+++ b/tests/061.phpt
|
|
@@ -9,9 +9,6 @@ if ((version_compare(PHP_VERSION, '5.2.13') <= 0) ||
|
|
}
|
|
--FILE--
|
|
<?php
|
|
-if(!extension_loaded('msgpack')) {
|
|
- dl('msgpack.' . PHP_SHLIB_SUFFIX);
|
|
-}
|
|
|
|
function test($type, $variable, $test = null) {
|
|
$serialized = msgpack_serialize($variable);
|
|
diff --git a/tests/062.phpt b/tests/062.phpt
|
|
index 159e00d..d8dbd8c 100644
|
|
--- a/tests/062.phpt
|
|
+++ b/tests/062.phpt
|
|
@@ -3,9 +3,6 @@ Extra bytes buffered streaming unserialization
|
|
--SKIPIF--
|
|
--FILE--
|
|
<?php
|
|
-if(!extension_loaded('msgpack')) {
|
|
- dl('msgpack.' . PHP_SHLIB_SUFFIX);
|
|
-}
|
|
|
|
function test($type, $variable, $test = null) {
|
|
$unpacker = new MessagePackUnpacker();
|
|
diff --git a/tests/063.phpt b/tests/063.phpt
|
|
index 5be7e09..5a939d2 100644
|
|
--- a/tests/063.phpt
|
|
+++ b/tests/063.phpt
|
|
@@ -3,9 +3,6 @@ Extra bytes unbuffered streaming unserialization
|
|
--SKIPIF--
|
|
--FILE--
|
|
<?php
|
|
-if(!extension_loaded('msgpack')) {
|
|
- dl('msgpack.' . PHP_SHLIB_SUFFIX);
|
|
-}
|
|
|
|
function test($type, $variable, $test = null) {
|
|
$unpacker = new MessagePackUnpacker();
|
|
diff --git a/tests/064.phpt b/tests/064.phpt
|
|
index 8053200..df0086a 100644
|
|
--- a/tests/064.phpt
|
|
+++ b/tests/064.phpt
|
|
@@ -9,9 +9,6 @@ if ((version_compare(PHP_VERSION, '5.2.13') <= 0) ||
|
|
}
|
|
--FILE--
|
|
<?php
|
|
-if(!extension_loaded('msgpack')) {
|
|
- dl('msgpack.' . PHP_SHLIB_SUFFIX);
|
|
-}
|
|
|
|
$unpacker = new MessagePackUnpacker();
|
|
|
|
diff --git a/tests/065.phpt b/tests/065.phpt
|
|
index b54cb8f..b1e13d8 100644
|
|
--- a/tests/065.phpt
|
|
+++ b/tests/065.phpt
|
|
@@ -9,9 +9,6 @@ if ((version_compare(PHP_VERSION, '5.2.13') <= 0) ||
|
|
}
|
|
--FILE--
|
|
<?php
|
|
-if(!extension_loaded('msgpack')) {
|
|
- dl('msgpack.' . PHP_SHLIB_SUFFIX);
|
|
-}
|
|
|
|
$unpacker = new MessagePackUnpacker();
|
|
|
|
diff --git a/tests/066.phpt b/tests/066.phpt
|
|
index d2e430d..c2a4992 100644
|
|
--- a/tests/066.phpt
|
|
+++ b/tests/066.phpt
|
|
@@ -3,9 +3,6 @@ Extra bytes buffered streaming unserialization (single)
|
|
--SKIPIF--
|
|
--FILE--
|
|
<?php
|
|
-if(!extension_loaded('msgpack')) {
|
|
- dl('msgpack.' . PHP_SHLIB_SUFFIX);
|
|
-}
|
|
|
|
$unpacker = new MessagePackUnpacker();
|
|
|
|
diff --git a/tests/067.phpt b/tests/067.phpt
|
|
index 96c1442..e78420e 100644
|
|
--- a/tests/067.phpt
|
|
+++ b/tests/067.phpt
|
|
@@ -3,9 +3,6 @@ Extra bytes unbuffered streaming unserialization (single)
|
|
--SKIPIF--
|
|
--FILE--
|
|
<?php
|
|
-if(!extension_loaded('msgpack')) {
|
|
- dl('msgpack.' . PHP_SHLIB_SUFFIX);
|
|
-}
|
|
|
|
$unpacker = new MessagePackUnpacker();
|
|
|
|
diff --git a/tests/070.phpt b/tests/070.phpt
|
|
index c6b8a76..0cf96fa 100644
|
|
--- a/tests/070.phpt
|
|
+++ b/tests/070.phpt
|
|
@@ -9,9 +9,6 @@ if ((version_compare(PHP_VERSION, '5.2.13') <= 0) ||
|
|
}
|
|
--FILE--
|
|
<?php
|
|
-if(!extension_loaded('msgpack')) {
|
|
- dl('msgpack.' . PHP_SHLIB_SUFFIX);
|
|
-}
|
|
|
|
function test($type, $variable, $test = null) {
|
|
$serialized = msgpack_pack($variable);
|
|
diff --git a/tests/071.phpt b/tests/071.phpt
|
|
index 8be98ac..e80e0fb 100644
|
|
--- a/tests/071.phpt
|
|
+++ b/tests/071.phpt
|
|
@@ -9,9 +9,6 @@ if ((version_compare(PHP_VERSION, '5.2.13') <= 0) ||
|
|
}
|
|
--FILE--
|
|
<?php
|
|
-if(!extension_loaded('msgpack')) {
|
|
- dl('msgpack.' . PHP_SHLIB_SUFFIX);
|
|
-}
|
|
|
|
function test($type, $variable, $test = null) {
|
|
$msgpack = new MessagePack();
|
|
diff --git a/tests/072.phpt b/tests/072.phpt
|
|
index 3a0bdcc..b355ba5 100644
|
|
--- a/tests/072.phpt
|
|
+++ b/tests/072.phpt
|
|
@@ -9,9 +9,6 @@ if ((version_compare(PHP_VERSION, '5.2.13') <= 0) ||
|
|
}
|
|
--FILE--
|
|
<?php
|
|
-if(!extension_loaded('msgpack')) {
|
|
- dl('msgpack.' . PHP_SHLIB_SUFFIX);
|
|
-}
|
|
|
|
function test($type, $variable, $test = null) {
|
|
$msgpack = new MessagePack();
|
|
diff --git a/tests/073.phpt b/tests/073.phpt
|
|
index b15f742..23be8bc 100644
|
|
--- a/tests/073.phpt
|
|
+++ b/tests/073.phpt
|
|
@@ -9,9 +9,6 @@ if ((version_compare(PHP_VERSION, '5.2.13') <= 0) ||
|
|
}
|
|
--FILE--
|
|
<?php
|
|
-if(!extension_loaded('msgpack')) {
|
|
- dl('msgpack.' . PHP_SHLIB_SUFFIX);
|
|
-}
|
|
|
|
function test($type, $variable, $test = null) {
|
|
$msgpack = new MessagePack();
|
|
diff --git a/tests/080.phpt b/tests/080.phpt
|
|
index 6cc9171..bf97199 100644
|
|
--- a/tests/080.phpt
|
|
+++ b/tests/080.phpt
|
|
@@ -3,9 +3,6 @@ disabled php only (ini_set)
|
|
--SKIPIF--
|
|
--FILE--
|
|
<?php
|
|
-if(!extension_loaded('msgpack')) {
|
|
- dl('msgpack.' . PHP_SHLIB_SUFFIX);
|
|
-}
|
|
|
|
ini_set('msgpack.php_only', 0);
|
|
|
|
diff --git a/tests/081.phpt b/tests/081.phpt
|
|
index 18daa8b..284723b 100644
|
|
--- a/tests/081.phpt
|
|
+++ b/tests/081.phpt
|
|
@@ -3,9 +3,6 @@ disabled php only for class methods (ini_set)
|
|
--SKIPIF--
|
|
--FILE--
|
|
<?php
|
|
-if(!extension_loaded('msgpack')) {
|
|
- dl('msgpack.' . PHP_SHLIB_SUFFIX);
|
|
-}
|
|
|
|
ini_set('msgpack.php_only', 0);
|
|
|
|
diff --git a/tests/082.phpt b/tests/082.phpt
|
|
index b8414ab..63c9043 100644
|
|
--- a/tests/082.phpt
|
|
+++ b/tests/082.phpt
|
|
@@ -3,9 +3,6 @@ disabled php only for class methods unpacker (ini_set)
|
|
--SKIPIF--
|
|
--FILE--
|
|
<?php
|
|
-if(!extension_loaded('msgpack')) {
|
|
- dl('msgpack.' . PHP_SHLIB_SUFFIX);
|
|
-}
|
|
|
|
ini_set('msgpack.php_only', 0);
|
|
|
|
diff --git a/tests/083.phpt b/tests/083.phpt
|
|
index b866ae3..335e05d 100644
|
|
--- a/tests/083.phpt
|
|
+++ b/tests/083.phpt
|
|
@@ -3,9 +3,6 @@ disabled php only for class unpacker (ini_set)
|
|
--SKIPIF--
|
|
--FILE--
|
|
<?php
|
|
-if(!extension_loaded('msgpack')) {
|
|
- dl('msgpack.' . PHP_SHLIB_SUFFIX);
|
|
-}
|
|
|
|
ini_set('msgpack.php_only', 0);
|
|
|
|
diff --git a/tests/084.phpt b/tests/084.phpt
|
|
index 7525fbc..5c42ab9 100644
|
|
--- a/tests/084.phpt
|
|
+++ b/tests/084.phpt
|
|
@@ -3,9 +3,6 @@ disabled php only for class methods (constract)
|
|
--SKIPIF--
|
|
--FILE--
|
|
<?php
|
|
-if(!extension_loaded('msgpack')) {
|
|
- dl('msgpack.' . PHP_SHLIB_SUFFIX);
|
|
-}
|
|
|
|
function test($type, $variable, $test = null) {
|
|
$msgpack = new MessagePack(false);
|
|
diff --git a/tests/085.phpt b/tests/085.phpt
|
|
index 806a9ba..7af2bb7 100644
|
|
--- a/tests/085.phpt
|
|
+++ b/tests/085.phpt
|
|
@@ -3,9 +3,6 @@ disabled php only for class methods unpacker (constract)
|
|
--SKIPIF--
|
|
--FILE--
|
|
<?php
|
|
-if(!extension_loaded('msgpack')) {
|
|
- dl('msgpack.' . PHP_SHLIB_SUFFIX);
|
|
-}
|
|
|
|
function test($type, $variable, $test = null)
|
|
{
|
|
diff --git a/tests/086.phpt b/tests/086.phpt
|
|
index a15d09b..1be8ef8 100644
|
|
--- a/tests/086.phpt
|
|
+++ b/tests/086.phpt
|
|
@@ -3,9 +3,6 @@ disabled php only for class unpacker (constract)
|
|
--SKIPIF--
|
|
--FILE--
|
|
<?php
|
|
-if(!extension_loaded('msgpack')) {
|
|
- dl('msgpack.' . PHP_SHLIB_SUFFIX);
|
|
-}
|
|
|
|
function test($type, $variable, $test = null)
|
|
{
|
|
diff --git a/tests/087.phpt b/tests/087.phpt
|
|
index ede0c30..6ad1a2c 100644
|
|
--- a/tests/087.phpt
|
|
+++ b/tests/087.phpt
|
|
@@ -3,9 +3,6 @@ disabled php only for class methods (set option)
|
|
--SKIPIF--
|
|
--FILE--
|
|
<?php
|
|
-if(!extension_loaded('msgpack')) {
|
|
- dl('msgpack.' . PHP_SHLIB_SUFFIX);
|
|
-}
|
|
|
|
function test($type, $variable, $test = null) {
|
|
$msgpack = new MessagePack();
|
|
diff --git a/tests/088.phpt b/tests/088.phpt
|
|
index ce51229..1f20e75 100644
|
|
--- a/tests/088.phpt
|
|
+++ b/tests/088.phpt
|
|
@@ -3,9 +3,6 @@ disabled php only for class methods unpacker (set option)
|
|
--SKIPIF--
|
|
--FILE--
|
|
<?php
|
|
-if(!extension_loaded('msgpack')) {
|
|
- dl('msgpack.' . PHP_SHLIB_SUFFIX);
|
|
-}
|
|
|
|
function test($type, $variable, $test = null)
|
|
{
|
|
diff --git a/tests/089.phpt b/tests/089.phpt
|
|
index e3a2d7e..d46b618 100644
|
|
--- a/tests/089.phpt
|
|
+++ b/tests/089.phpt
|
|
@@ -7,9 +7,6 @@ if (version_compare(PHP_VERSION, '5.1.0') < 0) {
|
|
}
|
|
--FILE--
|
|
<?php
|
|
-if(!extension_loaded('msgpack')) {
|
|
- dl('msgpack.' . PHP_SHLIB_SUFFIX);
|
|
-}
|
|
|
|
function test($type, $variable, $test = null)
|
|
{
|
|
diff --git a/tests/090.phpt b/tests/090.phpt
|
|
index 92a4ee7..36e3a5b 100644
|
|
--- a/tests/090.phpt
|
|
+++ b/tests/090.phpt
|
|
@@ -7,10 +7,6 @@ if (version_compare(PHP_VERSION, '5.2.0') < 0) {
|
|
}
|
|
--FILE--
|
|
<?php
|
|
-if(!extension_loaded('msgpack'))
|
|
-{
|
|
- dl('msgpack.' . PHP_SHLIB_SUFFIX);
|
|
-}
|
|
|
|
error_reporting(0);
|
|
|
|
diff --git a/tests/091.phpt b/tests/091.phpt
|
|
index 80ad0a5..17b8c25 100644
|
|
--- a/tests/091.phpt
|
|
+++ b/tests/091.phpt
|
|
@@ -7,10 +7,6 @@ if (version_compare(PHP_VERSION, '5.2.0') < 0) {
|
|
}
|
|
--FILE--
|
|
<?php
|
|
-if(!extension_loaded('msgpack'))
|
|
-{
|
|
- dl('msgpack.' . PHP_SHLIB_SUFFIX);
|
|
-}
|
|
|
|
error_reporting(0);
|
|
|
|
diff --git a/tests/092.phpt b/tests/092.phpt
|
|
index 8c342bf..549100d 100644
|
|
--- a/tests/092.phpt
|
|
+++ b/tests/092.phpt
|
|
@@ -7,10 +7,6 @@ if (version_compare(PHP_VERSION, '5.2.0') < 0) {
|
|
}
|
|
--FILE--
|
|
<?php
|
|
-if(!extension_loaded('msgpack'))
|
|
-{
|
|
- dl('msgpack.' . PHP_SHLIB_SUFFIX);
|
|
-}
|
|
|
|
error_reporting(0);
|
|
ini_set('msgpack.php_only', 0);
|
|
diff --git a/tests/093.phpt b/tests/093.phpt
|
|
index 73980ab..ad17202 100644
|
|
--- a/tests/093.phpt
|
|
+++ b/tests/093.phpt
|
|
@@ -7,10 +7,6 @@ if (version_compare(PHP_VERSION, '5.2.0') < 0) {
|
|
}
|
|
--FILE--
|
|
<?php
|
|
-if(!extension_loaded('msgpack'))
|
|
-{
|
|
- dl('msgpack.' . PHP_SHLIB_SUFFIX);
|
|
-}
|
|
|
|
error_reporting(0);
|
|
ini_set('msgpack.php_only', 0);
|
|
diff --git a/tests/094.phpt b/tests/094.phpt
|
|
index 6f6f5b5..4d711fe 100644
|
|
--- a/tests/094.phpt
|
|
+++ b/tests/094.phpt
|
|
@@ -7,10 +7,6 @@ if (version_compare(PHP_VERSION, '5.2.0') < 0) {
|
|
}
|
|
--FILE--
|
|
<?php
|
|
-if(!extension_loaded('msgpack'))
|
|
-{
|
|
- dl('msgpack.' . PHP_SHLIB_SUFFIX);
|
|
-}
|
|
|
|
error_reporting(0);
|
|
|
|
diff --git a/tests/095.phpt b/tests/095.phpt
|
|
index b03eb60..c9b3f49 100644
|
|
--- a/tests/095.phpt
|
|
+++ b/tests/095.phpt
|
|
@@ -7,10 +7,6 @@ if (version_compare(PHP_VERSION, '5.2.0') < 0) {
|
|
}
|
|
--FILE--
|
|
<?php
|
|
-if(!extension_loaded('msgpack'))
|
|
-{
|
|
- dl('msgpack.' . PHP_SHLIB_SUFFIX);
|
|
-}
|
|
|
|
error_reporting(0);
|
|
|
|
diff --git a/tests/096.phpt b/tests/096.phpt
|
|
index 3ef47e4..5abc007 100644
|
|
--- a/tests/096.phpt
|
|
+++ b/tests/096.phpt
|
|
@@ -7,10 +7,6 @@ if (version_compare(PHP_VERSION, '5.2.0') < 0) {
|
|
}
|
|
--FILE--
|
|
<?php
|
|
-if(!extension_loaded('msgpack'))
|
|
-{
|
|
- dl('msgpack.' . PHP_SHLIB_SUFFIX);
|
|
-}
|
|
|
|
error_reporting(0);
|
|
ini_set('msgpack.php_only', 0);
|
|
diff --git a/tests/097.phpt b/tests/097.phpt
|
|
index dd0e4b9..ef2f9f8 100644
|
|
--- a/tests/097.phpt
|
|
+++ b/tests/097.phpt
|
|
@@ -7,10 +7,6 @@ if (version_compare(PHP_VERSION, '5.2.0') < 0) {
|
|
}
|
|
--FILE--
|
|
<?php
|
|
-if(!extension_loaded('msgpack'))
|
|
-{
|
|
- dl('msgpack.' . PHP_SHLIB_SUFFIX);
|
|
-}
|
|
|
|
error_reporting(0);
|
|
ini_set('msgpack.php_only', 0);
|
|
diff --git a/tests/098.phpt b/tests/098.phpt
|
|
index 0687401..6115ee4 100644
|
|
--- a/tests/098.phpt
|
|
+++ b/tests/098.phpt
|
|
@@ -7,10 +7,6 @@ if (version_compare(PHP_VERSION, '5.2.0') < 0) {
|
|
}
|
|
--FILE--
|
|
<?php
|
|
-if(!extension_loaded('msgpack'))
|
|
-{
|
|
- dl('msgpack.' . PHP_SHLIB_SUFFIX);
|
|
-}
|
|
|
|
error_reporting(0);
|
|
|
|
diff --git a/tests/099.phpt b/tests/099.phpt
|
|
index 3b7e4e8..ceeb097 100644
|
|
--- a/tests/099.phpt
|
|
+++ b/tests/099.phpt
|
|
@@ -7,10 +7,6 @@ if (version_compare(PHP_VERSION, '5.2.0') < 0) {
|
|
}
|
|
--FILE--
|
|
<?php
|
|
-if(!extension_loaded('msgpack'))
|
|
-{
|
|
- dl('msgpack.' . PHP_SHLIB_SUFFIX);
|
|
-}
|
|
|
|
error_reporting(0);
|
|
|
|
diff --git a/tests/100.phpt b/tests/100.phpt
|
|
index 270cdb8..ce3ae47 100644
|
|
--- a/tests/100.phpt
|
|
+++ b/tests/100.phpt
|
|
@@ -7,10 +7,6 @@ if (version_compare(PHP_VERSION, '5.2.0') < 0) {
|
|
}
|
|
--FILE--
|
|
<?php
|
|
-if(!extension_loaded('msgpack'))
|
|
-{
|
|
- dl('msgpack.' . PHP_SHLIB_SUFFIX);
|
|
-}
|
|
|
|
error_reporting(0);
|
|
|
|
diff --git a/tests/101.phpt b/tests/101.phpt
|
|
index ba64390..e124371 100644
|
|
--- a/tests/101.phpt
|
|
+++ b/tests/101.phpt
|
|
@@ -7,10 +7,6 @@ if (version_compare(PHP_VERSION, '5.2.0') < 0) {
|
|
}
|
|
--FILE--
|
|
<?php
|
|
-if(!extension_loaded('msgpack'))
|
|
-{
|
|
- dl('msgpack.' . PHP_SHLIB_SUFFIX);
|
|
-}
|
|
|
|
error_reporting(0);
|
|
ini_set('msgpack.php_only', 0);
|
|
diff --git a/tests/102.phpt b/tests/102.phpt
|
|
index 7644635..b877f4d 100644
|
|
--- a/tests/102.phpt
|
|
+++ b/tests/102.phpt
|
|
@@ -7,10 +7,6 @@ if (version_compare(PHP_VERSION, '5.2.0') < 0) {
|
|
}
|
|
--FILE--
|
|
<?php
|
|
-if(!extension_loaded('msgpack'))
|
|
-{
|
|
- dl('msgpack.' . PHP_SHLIB_SUFFIX);
|
|
-}
|
|
|
|
error_reporting(0);
|
|
ini_set('msgpack.php_only', 0);
|
|
diff --git a/tests/103.phpt b/tests/103.phpt
|
|
index d563781..e641413 100644
|
|
--- a/tests/103.phpt
|
|
+++ b/tests/103.phpt
|
|
@@ -7,10 +7,6 @@ if (version_compare(PHP_VERSION, '5.2.0') < 0) {
|
|
}
|
|
--FILE--
|
|
<?php
|
|
-if(!extension_loaded('msgpack'))
|
|
-{
|
|
- dl('msgpack.' . PHP_SHLIB_SUFFIX);
|
|
-}
|
|
|
|
error_reporting(0);
|
|
|
|
diff --git a/tests/104.phpt b/tests/104.phpt
|
|
index 216baa3..97173f6 100644
|
|
--- a/tests/104.phpt
|
|
+++ b/tests/104.phpt
|
|
@@ -7,10 +7,6 @@ if (version_compare(PHP_VERSION, '5.2.0') < 0) {
|
|
}
|
|
--FILE--
|
|
<?php
|
|
-if(!extension_loaded('msgpack'))
|
|
-{
|
|
- dl('msgpack.' . PHP_SHLIB_SUFFIX);
|
|
-}
|
|
|
|
//error_reporting(0);
|
|
|
|
diff --git a/tests/105.phpt b/tests/105.phpt
|
|
index dcd2e08..e7d5dce 100644
|
|
--- a/tests/105.phpt
|
|
+++ b/tests/105.phpt
|
|
@@ -7,10 +7,6 @@ if (version_compare(PHP_VERSION, '5.2.0') < 0) {
|
|
}
|
|
--FILE--
|
|
<?php
|
|
-if(!extension_loaded('msgpack'))
|
|
-{
|
|
- dl('msgpack.' . PHP_SHLIB_SUFFIX);
|
|
-}
|
|
|
|
//error_reporting(0);
|
|
|
|
diff --git a/tests/106.phpt b/tests/106.phpt
|
|
index dc9a95b..680129f 100644
|
|
--- a/tests/106.phpt
|
|
+++ b/tests/106.phpt
|
|
@@ -7,10 +7,6 @@ if (version_compare(PHP_VERSION, '5.2.0') < 0) {
|
|
}
|
|
--FILE--
|
|
<?php
|
|
-if(!extension_loaded('msgpack'))
|
|
-{
|
|
- dl('msgpack.' . PHP_SHLIB_SUFFIX);
|
|
-}
|
|
|
|
//error_reporting(0);
|
|
|
|
diff --git a/tests/107.phpt b/tests/107.phpt
|
|
index 1486832..37582ef 100644
|
|
--- a/tests/107.phpt
|
|
+++ b/tests/107.phpt
|
|
@@ -7,10 +7,6 @@ if (version_compare(PHP_VERSION, '5.2.0') < 0) {
|
|
}
|
|
--FILE--
|
|
<?php
|
|
-if(!extension_loaded('msgpack'))
|
|
-{
|
|
- dl('msgpack.' . PHP_SHLIB_SUFFIX);
|
|
-}
|
|
|
|
//error_reporting(0);
|
|
|
|
diff --git a/tests/108.phpt b/tests/108.phpt
|
|
index bf21d88..cdee537 100644
|
|
--- a/tests/108.phpt
|
|
+++ b/tests/108.phpt
|
|
@@ -7,10 +7,6 @@ if (version_compare(PHP_VERSION, '5.2.0') < 0) {
|
|
}
|
|
--FILE--
|
|
<?php
|
|
-if(!extension_loaded('msgpack'))
|
|
-{
|
|
- dl('msgpack.' . PHP_SHLIB_SUFFIX);
|
|
-}
|
|
|
|
//error_reporting(0);
|
|
|
|
diff --git a/tests/109.phpt b/tests/109.phpt
|
|
index 00c7421..aed51b1 100644
|
|
--- a/tests/109.phpt
|
|
+++ b/tests/109.phpt
|
|
@@ -7,10 +7,6 @@ if (version_compare(PHP_VERSION, '5.2.0') < 0) {
|
|
}
|
|
--FILE--
|
|
<?php
|
|
-if(!extension_loaded('msgpack'))
|
|
-{
|
|
- dl('msgpack.' . PHP_SHLIB_SUFFIX);
|
|
-}
|
|
|
|
//error_reporting(0);
|
|
|
|
diff --git a/tests/110.phpt b/tests/110.phpt
|
|
index 8c8131a..dffafdd 100644
|
|
--- a/tests/110.phpt
|
|
+++ b/tests/110.phpt
|
|
@@ -7,10 +7,6 @@ if (version_compare(PHP_VERSION, '5.2.0') < 0) {
|
|
}
|
|
--FILE--
|
|
<?php
|
|
-if(!extension_loaded('msgpack'))
|
|
-{
|
|
- dl('msgpack.' . PHP_SHLIB_SUFFIX);
|
|
-}
|
|
|
|
//error_reporting(0);
|
|
|
|
diff --git a/tests/111.phpt b/tests/111.phpt
|
|
index aeb3f60..ca40b9c 100644
|
|
--- a/tests/111.phpt
|
|
+++ b/tests/111.phpt
|
|
@@ -7,10 +7,6 @@ if (version_compare(PHP_VERSION, '5.2.0') < 0) {
|
|
}
|
|
--FILE--
|
|
<?php
|
|
-if(!extension_loaded('msgpack'))
|
|
-{
|
|
- dl('msgpack.' . PHP_SHLIB_SUFFIX);
|
|
-}
|
|
|
|
//error_reporting(0);
|
|
|
|
diff --git a/tests/112.phpt b/tests/112.phpt
|
|
index 1cdaf45..655afd9 100644
|
|
--- a/tests/112.phpt
|
|
+++ b/tests/112.phpt
|
|
@@ -7,10 +7,6 @@ if (version_compare(PHP_VERSION, '5.2.0') < 0) {
|
|
}
|
|
--FILE--
|
|
<?php
|
|
-if(!extension_loaded('msgpack'))
|
|
-{
|
|
- dl('msgpack.' . PHP_SHLIB_SUFFIX);
|
|
-}
|
|
|
|
//error_reporting(0);
|
|
|
|
diff --git a/tests/113.phpt b/tests/113.phpt
|
|
index d427735..ed3dca6 100644
|
|
--- a/tests/113.phpt
|
|
+++ b/tests/113.phpt
|
|
@@ -7,10 +7,6 @@ if (version_compare(PHP_VERSION, '5.2.0') < 0) {
|
|
}
|
|
--FILE--
|
|
<?php
|
|
-if(!extension_loaded('msgpack'))
|
|
-{
|
|
- dl('msgpack.' . PHP_SHLIB_SUFFIX);
|
|
-}
|
|
|
|
//error_reporting(0);
|
|
|
|
diff --git a/tests/114.phpt b/tests/114.phpt
|
|
index d325ec5..0e01214 100644
|
|
--- a/tests/114.phpt
|
|
+++ b/tests/114.phpt
|
|
@@ -7,10 +7,6 @@ if (version_compare(PHP_VERSION, '5.2.0') < 0) {
|
|
}
|
|
--FILE--
|
|
<?php
|
|
-if(!extension_loaded('msgpack'))
|
|
-{
|
|
- dl('msgpack.' . PHP_SHLIB_SUFFIX);
|
|
-}
|
|
|
|
//error_reporting(0);
|
|
|
|
diff --git a/tests/115.phpt b/tests/115.phpt
|
|
index 6755771..b8d4d45 100644
|
|
--- a/tests/115.phpt
|
|
+++ b/tests/115.phpt
|
|
@@ -7,10 +7,6 @@ if (version_compare(PHP_VERSION, '5.2.0') < 0) {
|
|
}
|
|
--FILE--
|
|
<?php
|
|
-if(!extension_loaded('msgpack'))
|
|
-{
|
|
- dl('msgpack.' . PHP_SHLIB_SUFFIX);
|
|
-}
|
|
|
|
//error_reporting(0);
|
|
|
|
diff --git a/tests/116.phpt b/tests/116.phpt
|
|
index b2404aa..55c4328 100644
|
|
--- a/tests/116.phpt
|
|
+++ b/tests/116.phpt
|
|
@@ -7,10 +7,6 @@ if (version_compare(PHP_VERSION, '5.2.0') < 0) {
|
|
}
|
|
--FILE--
|
|
<?php
|
|
-if(!extension_loaded('msgpack'))
|
|
-{
|
|
- dl('msgpack.' . PHP_SHLIB_SUFFIX);
|
|
-}
|
|
|
|
//error_reporting(0);
|
|
|
|
diff --git a/tests/117.phpt b/tests/117.phpt
|
|
index 1569609..316ec61 100644
|
|
--- a/tests/117.phpt
|
|
+++ b/tests/117.phpt
|
|
@@ -7,10 +7,6 @@ if (version_compare(PHP_VERSION, '5.2.0') < 0) {
|
|
}
|
|
--FILE--
|
|
<?php
|
|
-if(!extension_loaded('msgpack'))
|
|
-{
|
|
- dl('msgpack.' . PHP_SHLIB_SUFFIX);
|
|
-}
|
|
|
|
//error_reporting(0);
|
|
|
|
diff --git a/tests/118.phpt b/tests/118.phpt
|
|
index c73bde8..8f826d2 100644
|
|
--- a/tests/118.phpt
|
|
+++ b/tests/118.phpt
|
|
@@ -7,10 +7,6 @@ if (version_compare(PHP_VERSION, '5.2.0') < 0) {
|
|
}
|
|
--FILE--
|
|
<?php
|
|
-if(!extension_loaded('msgpack'))
|
|
-{
|
|
- dl('msgpack.' . PHP_SHLIB_SUFFIX);
|
|
-}
|
|
|
|
//error_reporting(0);
|
|
|
|
diff --git a/tests/119.phpt b/tests/119.phpt
|
|
index ff4011a..4486693 100644
|
|
--- a/tests/119.phpt
|
|
+++ b/tests/119.phpt
|
|
@@ -7,10 +7,6 @@ if (version_compare(PHP_VERSION, '5.2.0') < 0) {
|
|
}
|
|
--FILE--
|
|
<?php
|
|
-if(!extension_loaded('msgpack'))
|
|
-{
|
|
- dl('msgpack.' . PHP_SHLIB_SUFFIX);
|
|
-}
|
|
|
|
//error_reporting(0);
|
|
|
|
diff --git a/tests/120.phpt b/tests/120.phpt
|
|
index b9e196e..73de26b 100644
|
|
--- a/tests/120.phpt
|
|
+++ b/tests/120.phpt
|
|
@@ -7,10 +7,6 @@ if (version_compare(PHP_VERSION, '5.2.0') < 0) {
|
|
}
|
|
--FILE--
|
|
<?php
|
|
-if(!extension_loaded('msgpack'))
|
|
-{
|
|
- dl('msgpack.' . PHP_SHLIB_SUFFIX);
|
|
-}
|
|
|
|
//error_reporting(0);
|
|
|
|
diff --git a/tests/121.phpt b/tests/121.phpt
|
|
index 41fbce0..81f56f8 100644
|
|
--- a/tests/121.phpt
|
|
+++ b/tests/121.phpt
|
|
@@ -7,10 +7,6 @@ if (version_compare(PHP_VERSION, '5.2.0') < 0) {
|
|
}
|
|
--FILE--
|
|
<?php
|
|
-if(!extension_loaded('msgpack'))
|
|
-{
|
|
- dl('msgpack.' . PHP_SHLIB_SUFFIX);
|
|
-}
|
|
|
|
//error_reporting(0);
|
|
|
|
diff --git a/tests/122.phpt b/tests/122.phpt
|
|
index ef9b103..31c7028 100644
|
|
--- a/tests/122.phpt
|
|
+++ b/tests/122.phpt
|
|
@@ -7,10 +7,6 @@ if (version_compare(PHP_VERSION, '5.2.0') < 0) {
|
|
}
|
|
--FILE--
|
|
<?php
|
|
-if(!extension_loaded('msgpack'))
|
|
-{
|
|
- dl('msgpack.' . PHP_SHLIB_SUFFIX);
|
|
-}
|
|
|
|
//error_reporting(0);
|
|
|
|
diff --git a/tests/123.phpt b/tests/123.phpt
|
|
index 477150d..895efa7 100644
|
|
--- a/tests/123.phpt
|
|
+++ b/tests/123.phpt
|
|
@@ -7,10 +7,6 @@ if (version_compare(PHP_VERSION, '5.2.0') < 0) {
|
|
}
|
|
--FILE--
|
|
<?php
|
|
-if(!extension_loaded('msgpack'))
|
|
-{
|
|
- dl('msgpack.' . PHP_SHLIB_SUFFIX);
|
|
-}
|
|
|
|
//error_reporting(0);
|
|
|
|
diff --git a/tests/124.phpt b/tests/124.phpt
|
|
index f45a243..b701d79 100644
|
|
--- a/tests/124.phpt
|
|
+++ b/tests/124.phpt
|
|
@@ -7,10 +7,6 @@ if (version_compare(PHP_VERSION, '5.2.0') < 0) {
|
|
}
|
|
--FILE--
|
|
<?php
|
|
-if(!extension_loaded('msgpack'))
|
|
-{
|
|
- dl('msgpack.' . PHP_SHLIB_SUFFIX);
|
|
-}
|
|
|
|
//error_reporting(0);
|
|
|
|
diff --git a/tests/125.phpt b/tests/125.phpt
|
|
index 142cd40..34edffc 100644
|
|
--- a/tests/125.phpt
|
|
+++ b/tests/125.phpt
|
|
@@ -7,10 +7,6 @@ if (version_compare(PHP_VERSION, '5.2.0') < 0) {
|
|
}
|
|
--FILE--
|
|
<?php
|
|
-if(!extension_loaded('msgpack'))
|
|
-{
|
|
- dl('msgpack.' . PHP_SHLIB_SUFFIX);
|
|
-}
|
|
|
|
//error_reporting(0);
|
|
|
|
diff --git a/tests/126.phpt b/tests/126.phpt
|
|
index 351c4f1..d5ffd6c 100644
|
|
--- a/tests/126.phpt
|
|
+++ b/tests/126.phpt
|
|
@@ -7,10 +7,6 @@ if (version_compare(PHP_VERSION, '5.2.0') < 0) {
|
|
}
|
|
--FILE--
|
|
<?php
|
|
-if(!extension_loaded('msgpack'))
|
|
-{
|
|
- dl('msgpack.' . PHP_SHLIB_SUFFIX);
|
|
-}
|
|
|
|
//error_reporting(0);
|
|
|
|
diff --git a/tests/127.phpt b/tests/127.phpt
|
|
index 70c435b..468f10f 100644
|
|
--- a/tests/127.phpt
|
|
+++ b/tests/127.phpt
|
|
@@ -7,10 +7,6 @@ if (version_compare(PHP_VERSION, '5.2.0') < 0) {
|
|
}
|
|
--FILE--
|
|
<?php
|
|
-if(!extension_loaded('msgpack'))
|
|
-{
|
|
- dl('msgpack.' . PHP_SHLIB_SUFFIX);
|
|
-}
|
|
|
|
//error_reporting(0);
|
|
|
|
diff --git a/tests/128.phpt b/tests/128.phpt
|
|
index 40d7e7c..4fc875b 100644
|
|
--- a/tests/128.phpt
|
|
+++ b/tests/128.phpt
|
|
@@ -7,10 +7,6 @@ if (version_compare(PHP_VERSION, '5.2.0') < 0) {
|
|
}
|
|
--FILE--
|
|
<?php
|
|
-if(!extension_loaded('msgpack'))
|
|
-{
|
|
- dl('msgpack.' . PHP_SHLIB_SUFFIX);
|
|
-}
|
|
|
|
//error_reporting(0);
|
|
|
|
diff --git a/tests/129.phpt b/tests/129.phpt
|
|
index 897e766..dc178d8 100644
|
|
--- a/tests/129.phpt
|
|
+++ b/tests/129.phpt
|
|
@@ -7,10 +7,6 @@ if (version_compare(PHP_VERSION, '5.2.0') < 0) {
|
|
}
|
|
--FILE--
|
|
<?php
|
|
-if(!extension_loaded('msgpack'))
|
|
-{
|
|
- dl('msgpack.' . PHP_SHLIB_SUFFIX);
|
|
-}
|
|
|
|
//error_reporting(0);
|
|
|
|
diff --git a/tests/130.phpt b/tests/130.phpt
|
|
index 36779e7..c71c513 100644
|
|
--- a/tests/130.phpt
|
|
+++ b/tests/130.phpt
|
|
@@ -7,10 +7,6 @@ if (version_compare(PHP_VERSION, '5.2.0') < 0) {
|
|
}
|
|
--FILE--
|
|
<?php
|
|
-if(!extension_loaded('msgpack'))
|
|
-{
|
|
- dl('msgpack.' . PHP_SHLIB_SUFFIX);
|
|
-}
|
|
|
|
//error_reporting(0);
|
|
|
|
diff --git a/tests/131.phpt b/tests/131.phpt
|
|
index d0f4634..c484551 100644
|
|
--- a/tests/131.phpt
|
|
+++ b/tests/131.phpt
|
|
@@ -7,10 +7,6 @@ if (version_compare(PHP_VERSION, '5.2.0') < 0) {
|
|
}
|
|
--FILE--
|
|
<?php
|
|
-if(!extension_loaded('msgpack'))
|
|
-{
|
|
- dl('msgpack.' . PHP_SHLIB_SUFFIX);
|
|
-}
|
|
|
|
//error_reporting(0);
|
|
|
|
diff --git a/tests/132.phpt b/tests/132.phpt
|
|
index fc38a82..7d776a6 100644
|
|
--- a/tests/132.phpt
|
|
+++ b/tests/132.phpt
|
|
@@ -7,10 +7,6 @@ if (version_compare(PHP_VERSION, '5.2.0') < 0) {
|
|
}
|
|
--FILE--
|
|
<?php
|
|
-if(!extension_loaded('msgpack'))
|
|
-{
|
|
- dl('msgpack.' . PHP_SHLIB_SUFFIX);
|
|
-}
|
|
|
|
//error_reporting(0);
|
|
|
|
diff --git a/tests/133.phpt b/tests/133.phpt
|
|
index 7452a31..f778ec5 100644
|
|
--- a/tests/133.phpt
|
|
+++ b/tests/133.phpt
|
|
@@ -7,10 +7,6 @@ if (version_compare(PHP_VERSION, '5.2.0') < 0) {
|
|
}
|
|
--FILE--
|
|
<?php
|
|
-if(!extension_loaded('msgpack'))
|
|
-{
|
|
- dl('msgpack.' . PHP_SHLIB_SUFFIX);
|
|
-}
|
|
|
|
//error_reporting(0);
|
|
|
|
diff --git a/tests/134.phpt b/tests/134.phpt
|
|
index 587e148..ee81257 100644
|
|
--- a/tests/134.phpt
|
|
+++ b/tests/134.phpt
|
|
@@ -7,10 +7,6 @@ if (version_compare(PHP_VERSION, '5.2.0') < 0) {
|
|
}
|
|
--FILE--
|
|
<?php
|
|
-if(!extension_loaded('msgpack'))
|
|
-{
|
|
- dl('msgpack.' . PHP_SHLIB_SUFFIX);
|
|
-}
|
|
|
|
//error_reporting(0);
|
|
|
|
diff --git a/tests/135.phpt b/tests/135.phpt
|
|
index 3d36482..5048239 100644
|
|
--- a/tests/135.phpt
|
|
+++ b/tests/135.phpt
|
|
@@ -7,10 +7,6 @@ if (version_compare(PHP_VERSION, '5.2.0') < 0) {
|
|
}
|
|
--FILE--
|
|
<?php
|
|
-if(!extension_loaded('msgpack'))
|
|
-{
|
|
- dl('msgpack.' . PHP_SHLIB_SUFFIX);
|
|
-}
|
|
|
|
//error_reporting(0);
|
|
|
|
diff --git a/tests/136.phpt b/tests/136.phpt
|
|
index 2f2ef5d..eaa4ad1 100644
|
|
--- a/tests/136.phpt
|
|
+++ b/tests/136.phpt
|
|
@@ -7,10 +7,6 @@ if (version_compare(PHP_VERSION, '5.2.0') < 0) {
|
|
}
|
|
--FILE--
|
|
<?php
|
|
-if(!extension_loaded('msgpack'))
|
|
-{
|
|
- dl('msgpack.' . PHP_SHLIB_SUFFIX);
|
|
-}
|
|
|
|
//error_reporting(0);
|
|
|
|
diff --git a/tests/137.phpt b/tests/137.phpt
|
|
index 77598e7..448bbfd 100644
|
|
--- a/tests/137.phpt
|
|
+++ b/tests/137.phpt
|
|
@@ -4,28 +4,25 @@ unpack/pack str8
|
|
msgpack.use_str8_serialization = 1
|
|
--SKIPIF--
|
|
<?php
|
|
- if (version_compare(PHP_VERSION, '5.2.0') < 0) {
|
|
- echo "skip tests in PHP 5.2 or newer";
|
|
- }
|
|
+if (version_compare(PHP_VERSION, '5.2.0') < 0) {
|
|
+ echo "skip tests in PHP 5.2 or newer";
|
|
+}
|
|
--FILE--
|
|
<?php
|
|
- if(!extension_loaded('msgpack')) {
|
|
- dl('msgpack.' . PHP_SHLIB_SUFFIX);
|
|
- }
|
|
|
|
- $str = "Simple test for short string - type str8";
|
|
- $str8 = chr(0xD9) . chr(strlen($str)) . $str;
|
|
- echo msgpack_unpack($str8) . "\n";
|
|
+$str = "Simple test for short string - type str8";
|
|
+$str8 = chr(0xD9) . chr(strlen($str)) . $str;
|
|
+echo msgpack_unpack($str8) . "\n";
|
|
|
|
- //assert str8 serialization works, and default for use use_str8_serialization is 1
|
|
- $data = msgpack_pack($str);
|
|
- var_dump(bin2hex($data));
|
|
- echo ($data[0] == chr(0xD9) && $data[1] == chr(strlen($str)) ? "OK" : "FAILED"), PHP_EOL;
|
|
+//assert str8 serialization works, and default for use use_str8_serialization is 1
|
|
+$data = msgpack_pack($str);
|
|
+var_dump(bin2hex($data));
|
|
+echo ($data[0] == chr(0xD9) && $data[1] == chr(strlen($str)) ? "OK" : "FAILED"), PHP_EOL;
|
|
|
|
- ini_set('msgpack.use_str8_serialization', 0);
|
|
- $data = msgpack_pack($str);
|
|
- var_dump(bin2hex($data));
|
|
- echo ($data[0] == chr(0xDA) && $data[2] == chr(strlen($str)) ? "OK" : "FAILED"), PHP_EOL;
|
|
+ini_set('msgpack.use_str8_serialization', 0);
|
|
+$data = msgpack_pack($str);
|
|
+var_dump(bin2hex($data));
|
|
+echo ($data[0] == chr(0xDA) && $data[2] == chr(strlen($str)) ? "OK" : "FAILED"), PHP_EOL;
|
|
|
|
?>
|
|
--EXPECTF--
|
|
diff --git a/tests/138.phpt b/tests/138.phpt
|
|
index f519c08..961b4ff 100644
|
|
--- a/tests/138.phpt
|
|
+++ b/tests/138.phpt
|
|
@@ -2,30 +2,26 @@
|
|
unpack bin format family
|
|
--SKIPIF--
|
|
<?php
|
|
- if (version_compare(PHP_VERSION, '5.2.0') < 0) {
|
|
- echo "skip tests in PHP 5.2 or newer";
|
|
- }
|
|
+if (version_compare(PHP_VERSION, '5.2.0') < 0) {
|
|
+ echo "skip tests in PHP 5.2 or newer";
|
|
+}
|
|
--FILE--
|
|
<?php
|
|
- if(!extension_loaded('msgpack')) {
|
|
- dl('msgpack.' . PHP_SHLIB_SUFFIX);
|
|
- }
|
|
|
|
- $bin8_serialized = pack('H*', 'c40962696e382074657374');
|
|
- $bin8_unserialized = msgpack_unpack($bin8_serialized);
|
|
- var_dump($bin8_unserialized);
|
|
- echo ($bin8_unserialized == "bin8 test") ? "OK" : "FAILED", PHP_EOL;
|
|
+$bin8_serialized = pack('H*', 'c40962696e382074657374');
|
|
+$bin8_unserialized = msgpack_unpack($bin8_serialized);
|
|
+var_dump($bin8_unserialized);
|
|
+echo ($bin8_unserialized == "bin8 test") ? "OK" : "FAILED", PHP_EOL;
|
|
|
|
- $bin16_serialized = pack('H*', 'c5000a62696e31362074657374');
|
|
- $bin16_unserialized = msgpack_unpack($bin16_serialized);
|
|
- var_dump($bin16_unserialized);
|
|
- echo ($bin16_unserialized == "bin16 test") ? "OK" : "FAILED", PHP_EOL;
|
|
+$bin16_serialized = pack('H*', 'c5000a62696e31362074657374');
|
|
+$bin16_unserialized = msgpack_unpack($bin16_serialized);
|
|
+var_dump($bin16_unserialized);
|
|
+echo ($bin16_unserialized == "bin16 test") ? "OK" : "FAILED", PHP_EOL;
|
|
|
|
-
|
|
- $bin32_serialized = pack('H*', 'c60000000a62696e33322074657374');
|
|
- $bin32_unserialized = msgpack_unpack($bin32_serialized);
|
|
- var_dump($bin32_unserialized);
|
|
- echo ($bin32_unserialized == "bin32 test") ? "OK" : "FAILED", PHP_EOL;
|
|
+$bin32_serialized = pack('H*', 'c60000000a62696e33322074657374');
|
|
+$bin32_unserialized = msgpack_unpack($bin32_serialized);
|
|
+var_dump($bin32_unserialized);
|
|
+echo ($bin32_unserialized == "bin32 test") ? "OK" : "FAILED", PHP_EOL;
|
|
?>
|
|
--EXPECTF--
|
|
string(9) "bin8 test"
|
|
diff --git a/tests/139.phpt b/tests/139.phpt
|
|
index 5c0abb3..da46bd2 100644
|
|
--- a/tests/139.phpt
|
|
+++ b/tests/139.phpt
|
|
@@ -7,10 +7,6 @@ if (version_compare(PHP_VERSION, '5.2.0') < 0) {
|
|
}
|
|
--FILE--
|
|
<?php
|
|
-if(!extension_loaded('msgpack'))
|
|
-{
|
|
- dl('msgpack.' . PHP_SHLIB_SUFFIX);
|
|
-}
|
|
|
|
function test($type, $array)
|
|
{
|
|
diff --git a/tests/bug002.phpt b/tests/bug002.phpt
|
|
index 2100779..317f9e9 100644
|
|
--- a/tests/bug002.phpt
|
|
+++ b/tests/bug002.phpt
|
|
@@ -3,9 +3,6 @@ Bug #2 (Deserializing a large array of nested objects used to give "zend_mm_heap
|
|
--SKIPIF--
|
|
--FILE--
|
|
<?php
|
|
-if (!extension_loaded("msgpack")) {
|
|
- dl('msgpack.' . PHP_SHLIB_SUFFIX);
|
|
-}
|
|
|
|
$data = array();
|
|
$tmp = &$data;
|
|
diff --git a/tests/bug006.phpt b/tests/bug006.phpt
|
|
index 908a2d5..c7b9b37 100644
|
|
--- a/tests/bug006.phpt
|
|
+++ b/tests/bug006.phpt
|
|
@@ -5,9 +5,6 @@ Bug #6 (bug with incorrect packing of mixed arrays)
|
|
if (version_compare(PHP_VERSION, '5.2.0') < 0) {
|
|
echo "skip tests in PHP 5.2 or newer";
|
|
}
|
|
-if (!extension_loaded("msgpack")) {
|
|
- echo "skip";
|
|
-}
|
|
--FILE--
|
|
<?php
|
|
$data = array('key' => 2, 1 => 3);
|
|
diff --git a/tests/bug011.phpt b/tests/bug011.phpt
|
|
index 0f926a3..32112db 100644
|
|
--- a/tests/bug011.phpt
|
|
+++ b/tests/bug011.phpt
|
|
@@ -2,9 +2,6 @@
|
|
Bug #011 (Check for segfault with empty array structures)
|
|
--FILE--
|
|
<?php
|
|
-if(!extension_loaded('msgpack')) {
|
|
- dl('msgpack.' . PHP_SHLIB_SUFFIX);
|
|
-}
|
|
|
|
$items = array( );
|
|
foreach( range( 0, 1024 ) as $r ) {
|
|
diff --git a/tests/bug012.phpt b/tests/bug012.phpt
|
|
index 867a5c4..39a9f41 100644
|
|
--- a/tests/bug012.phpt
|
|
+++ b/tests/bug012.phpt
|
|
@@ -2,9 +2,6 @@
|
|
Bug #12 (msgpack_seriallize interfere with php serialize)
|
|
--SKIPIF--
|
|
<?php
|
|
-if (!extension_loaded("msgpack")) {
|
|
- echo "skip";
|
|
-}
|
|
if (version_compare(PHP_VERSION, '5.4.0') < 0) {
|
|
echo "skip tests before PHP 5.4";
|
|
}
|
|
diff --git a/tests/bug013.phpt b/tests/bug013.phpt
|
|
index ecccfd7..3e6659f 100644
|
|
--- a/tests/bug013.phpt
|
|
+++ b/tests/bug013.phpt
|
|
@@ -1,10 +1,6 @@
|
|
--TEST--
|
|
Bug #13 (ensure that __get/__set aren't called when packing/unpacking)
|
|
--SKIPIF--
|
|
-<?php
|
|
-if (!extension_loaded("msgpack")) {
|
|
- echo "skip";
|
|
-}
|
|
--FILE--
|
|
<?php
|
|
|
|
diff --git a/tests/issue023.phpt b/tests/issue023.phpt
|
|
index edd0f9b..b286a1d 100644
|
|
--- a/tests/issue023.phpt
|
|
+++ b/tests/issue023.phpt
|
|
@@ -1,10 +1,6 @@
|
|
--TEST--
|
|
Issue #23 (Empty objects get serialized with incorrect type)
|
|
--SKIPIF--
|
|
-<?php
|
|
-if (!extension_loaded("msgpack")) {
|
|
- echo "skip";
|
|
-}
|
|
--FILE--
|
|
<?php
|
|
class test {}
|
|
diff --git a/tests/issue080.phpt b/tests/issue080.phpt
|
|
index 782ab72..97881f9 100644
|
|
--- a/tests/issue080.phpt
|
|
+++ b/tests/issue080.phpt
|
|
@@ -1,10 +1,6 @@
|
|
--TEST--
|
|
Issue #80 (Serialized failed on unseted value)
|
|
--SKIPIF--
|
|
-<?php
|
|
-if (!extension_loaded("msgpack")) {
|
|
- echo "skip";
|
|
-}
|
|
--FILE--
|
|
<?php
|
|
|
|
diff --git a/tests/issue094.phpt b/tests/issue094.phpt
|
|
index 7e57500..429f8c9 100644
|
|
--- a/tests/issue094.phpt
|
|
+++ b/tests/issue094.phpt
|
|
@@ -1,10 +1,6 @@
|
|
--TEST--
|
|
Issue #94 (PHP7 segmentation fault with references)
|
|
--SKIPIF--
|
|
-<?php
|
|
-if (!extension_loaded("msgpack")) {
|
|
- echo "skip";
|
|
-}
|
|
--FILE--
|
|
<?php
|
|
$bad = unserialize('a:4:{i:1;a:1:{s:10:"verylongid";s:1:"1";}i:10;a:1:{s:10:"verylongid";s:2:"10";}i:16;a:1:{s:10:"verylongid";s:2:"16";}i:0;a:1:{s:8:"children";a:3:{i:16;R:6;i:10;R:4;i:1;R:2;}}}');
|
|
|
|
From 26ae7399c859ff299c3622b13124ceb6bdfd945c Mon Sep 17 00:00:00 2001
|
|
From: Aaron Stone <aaron@serendipity.cx>
|
|
Date: Thu, 29 Mar 2018 16:06:56 -0700
|
|
Subject: [PATCH 8/9] Z_IS_RECURSIVE_P
|
|
|
|
---
|
|
msgpack_pack.c | 6 +++---
|
|
php_msgpack.h | 4 ++--
|
|
2 files changed, 5 insertions(+), 5 deletions(-)
|
|
|
|
diff --git a/msgpack_pack.c b/msgpack_pack.c
|
|
index 6100b01..c7051e6 100644
|
|
--- a/msgpack_pack.c
|
|
+++ b/msgpack_pack.c
|
|
@@ -280,7 +280,7 @@ static inline void msgpack_serialize_array(smart_str *buf, zval *val, HashTable
|
|
value_noref = value;
|
|
}
|
|
|
|
- if (Z_TYPE_P(value_noref) == IS_ARRAY && Z_IS_RECURSIVE(Z_ARRVAL_P(value_noref))) {
|
|
+ if (Z_TYPE_P(value_noref) == IS_ARRAY && Z_IS_RECURSIVE_P(value_noref)) {
|
|
msgpack_pack_nil(buf);
|
|
} else {
|
|
if (Z_TYPE_P(value_noref) == IS_ARRAY && Z_REFCOUNTED_P(value_noref)) {
|
|
@@ -298,10 +298,10 @@ static inline void msgpack_serialize_array(smart_str *buf, zval *val, HashTable
|
|
|
|
for (i = 0; i < n; i++) {
|
|
if ((data = zend_hash_index_find(ht, i)) == NULL || &data == &val ||
|
|
- (Z_TYPE_P(data) == IS_ARRAY && Z_IS_RECURSIVE(Z_ARRVAL_P(data)))) {
|
|
+ (Z_TYPE_P(data) == IS_ARRAY && Z_IS_RECURSIVE_P(data))) {
|
|
msgpack_pack_nil(buf);
|
|
} else if (Z_TYPE_P(data) == IS_REFERENCE && Z_TYPE_P(Z_REFVAL_P(data)) == IS_ARRAY &&
|
|
- Z_IS_RECURSIVE(Z_ARRVAL_P(Z_REFVAL_P(data)))) {
|
|
+ Z_IS_RECURSIVE_P(Z_REFVAL_P(data))) {
|
|
msgpack_pack_nil(buf);
|
|
} else {
|
|
if (Z_TYPE_P(data) == IS_REFERENCE) {
|
|
diff --git a/php_msgpack.h b/php_msgpack.h
|
|
index 9c152be..65195a3 100644
|
|
--- a/php_msgpack.h
|
|
+++ b/php_msgpack.h
|
|
@@ -45,8 +45,8 @@ PHP_MSGPACK_API int php_msgpack_unserialize(
|
|
zval *return_value, char *str, size_t str_len);
|
|
|
|
/** Backport macro from PHP 7.3*/
|
|
-#ifndef Z_IS_RECURSIVE
|
|
-#define Z_IS_RECURSIVE(obj) (ZEND_HASH_GET_APPLY_COUNT(obj) > 1)
|
|
+#ifndef Z_IS_RECURSIVE_P
|
|
+#define Z_IS_RECURSIVE_P(obj) (ZEND_HASH_GET_APPLY_COUNT(Z_ARRVAL_P(obj)) > 1)
|
|
#endif
|
|
|
|
#ifndef Z_REFCOUNTED
|
|
|
|
From 066c2499c33c3b0a6d430de194560b408d118085 Mon Sep 17 00:00:00 2001
|
|
From: Aaron Stone <aaron@serendipity.cx>
|
|
Date: Thu, 29 Mar 2018 18:12:05 -0700
|
|
Subject: [PATCH 9/9] Z_PROTECT_RECURSION_P
|
|
|
|
---
|
|
msgpack_pack.c | 8 ++++----
|
|
php_msgpack.h | 8 ++++----
|
|
2 files changed, 8 insertions(+), 8 deletions(-)
|
|
|
|
diff --git a/msgpack_pack.c b/msgpack_pack.c
|
|
index c7051e6..b9785a8 100644
|
|
--- a/msgpack_pack.c
|
|
+++ b/msgpack_pack.c
|
|
@@ -284,11 +284,11 @@ static inline void msgpack_serialize_array(smart_str *buf, zval *val, HashTable
|
|
msgpack_pack_nil(buf);
|
|
} else {
|
|
if (Z_TYPE_P(value_noref) == IS_ARRAY && Z_REFCOUNTED_P(value_noref)) {
|
|
- Z_PROTECT_RECURSION(Z_ARRVAL_P(value_noref));
|
|
+ Z_PROTECT_RECURSION_P(value_noref);
|
|
}
|
|
msgpack_serialize_zval(buf, value, var_hash);
|
|
if (Z_TYPE_P(value_noref) == IS_ARRAY && Z_REFCOUNTED_P(value_noref)) {
|
|
- Z_UNPROTECT_RECURSION(Z_ARRVAL_P(value_noref));
|
|
+ Z_UNPROTECT_RECURSION_P(value_noref);
|
|
}
|
|
}
|
|
} ZEND_HASH_FOREACH_END();
|
|
@@ -311,13 +311,13 @@ static inline void msgpack_serialize_array(smart_str *buf, zval *val, HashTable
|
|
}
|
|
|
|
if (Z_TYPE_P(data_noref) == IS_ARRAY && Z_REFCOUNTED_P(data_noref)) {
|
|
- Z_PROTECT_RECURSION(Z_ARRVAL_P(data_noref));
|
|
+ Z_PROTECT_RECURSION_P(data_noref);
|
|
}
|
|
|
|
msgpack_serialize_zval(buf, data, var_hash);
|
|
|
|
if (Z_TYPE_P(data_noref) == IS_ARRAY && Z_REFCOUNTED_P(data_noref)) {
|
|
- Z_UNPROTECT_RECURSION(Z_ARRVAL_P(data_noref));
|
|
+ Z_UNPROTECT_RECURSION_P(data_noref);
|
|
}
|
|
}
|
|
}
|
|
diff --git a/php_msgpack.h b/php_msgpack.h
|
|
index 65195a3..6707bef 100644
|
|
--- a/php_msgpack.h
|
|
+++ b/php_msgpack.h
|
|
@@ -53,12 +53,12 @@ PHP_MSGPACK_API int php_msgpack_unserialize(
|
|
#define Z_REFCOUNTED ZEND_HASH_APPLY_PROTECTION(obj)
|
|
#endif
|
|
|
|
-#ifndef Z_PROTECT_RECURSION
|
|
-#define Z_PROTECT_RECURSION(obj) ZEND_HASH_INC_APPLY_COUNT(obj)
|
|
+#ifndef Z_PROTECT_RECURSION_P
|
|
+#define Z_PROTECT_RECURSION_P(obj) ZEND_HASH_INC_APPLY_COUNT(Z_ARRVAL_P(obj))
|
|
#endif
|
|
|
|
-#ifndef Z_UNPROTECT_RECURSION
|
|
-#define Z_UNPROTECT_RECURSION(obj) ZEND_HASH_DEC_APPLY_COUNT(obj)
|
|
+#ifndef Z_UNPROTECT_RECURSION_P
|
|
+#define Z_UNPROTECT_RECURSION_P(obj) ZEND_HASH_DEC_APPLY_COUNT(Z_ARRVAL_P(obj))
|
|
#endif
|
|
|
|
#endif /* PHP_MSGPACK_H */
|