fix #6: compatibility with 8.2
[awesomized/ext-ion] / tests / unserialize / argtype.phpt
1 --TEST--
2 ion\unserialize/argtype
3 --EXTENSIONS--
4 ion
5 --FILE--
6 TEST
7 <?php
8 $a=[];
9 foreach ([&$a, $a, (object) $a] as $s) {
10 try { var_dump(ion\unserialize($s)); }
11 catch (Throwable $e) { printf("caught %s: %s\n", get_class($e), $e->getMessage()); }
12 }
13 ?>
14 DONE
15 --EXPECT--
16 TEST
17 caught ion\Exception: Invalid source to unserialize: expected string or resource, got array
18 caught ion\Exception: Invalid source to unserialize: expected string or resource, got array
19 caught ion\Exception: Invalid source to unserialize: expected string or resource, got stdClass
20 DONE