PATH:
opt
/
alt
/
tests
/
alt-php56-pecl-msgpack_0.5.7-1.el8
/
tests
--TEST-- Object test, __sleep and __wakeup exceptions --SKIPIF-- --FILE-- <?php if(!extension_loaded('msgpack')) { dl('msgpack.' . PHP_SHLIB_SUFFIX); } error_reporting(0); function test($variable) { $serialized = msgpack_serialize($variable); $unserialized = msgpack_unserialize($serialized); var_dump($unserialized); } class Obj { private static $count = 0; var $a; var $b; function __construct($a, $b) { $this->a = $a; $this->b = $b; } function __sleep() { $c = self::$count++; if ($this->a) { throw new Exception("exception in __sleep $c"); } return array('a', 'b'); } function __wakeup() { $c = self::$count++; if ($this->b) { throw new Exception("exception in __wakeup $c"); } $this->b = $this->a * 3; } } $a = new Obj(1, 0); $b = new Obj(0, 1); $c = new Obj(0, 0); try { test($a); } catch (Exception $e) { echo $e->getMessage(), PHP_EOL; } try { test($b); } catch (Exception $e) { echo $e->getMessage(), PHP_EOL; } try { test($c); } catch (Exception $e) { echo $e->getMessage(), PHP_EOL; } ?> --EXPECTF-- exception in __sleep 0 exception in __wakeup 2 object(Obj)#%d (2) { ["a"]=> int(0) ["b"]=> int(0) }
[+]
..
[-] 009.phpt
[edit]
[-] 131b.phpt
[edit]
[-] 041.phpt
[edit]
[-] 014.phpt
[edit]
[-] 136.phpt
[edit]
[-] 125b.phpt
[edit]
[-] 016.phpt
[edit]
[-] 086.phpt
[edit]
[-] 091.phpt
[edit]
[-] 065b.phpt
[edit]
[-] 072.phpt
[edit]
[-] 100.phpt
[edit]
[-] 072b.phpt
[edit]
[-] 085.phpt
[edit]
[-] 016c.phpt
[edit]
[-] 005.phpt
[edit]
[-] 033.phpt
[edit]
[-] 095.phpt
[edit]
[-] 112b.phpt
[edit]
[-] 116.phpt
[edit]
[-] 127b.phpt
[edit]
[-] 019.phpt
[edit]
[-] 025.phpt
[edit]
[-] 026d.phpt
[edit]
[-] 136b.phpt
[edit]
[-] 108b.phpt
[edit]
[-] 062.phpt
[edit]
[-] 084.phpt
[edit]
[-] 098b.phpt
[edit]
[-] 124b.phpt
[edit]
[-] 114.phpt
[edit]
[-] 101b.phpt
[edit]
[-] 065.phpt
[edit]
[-] 124.phpt
[edit]
[-] 012.phpt
[edit]
[-] 114b.phpt
[edit]
[-] 061.phpt
[edit]
[-] 092.phpt
[edit]
[-] 094.phpt
[edit]
[-] 093.phpt
[edit]
[-] 111.phpt
[edit]
[-] 013.phpt
[edit]
[-] 129b.phpt
[edit]
[-] 089.phpt
[edit]
[-] 026b.phpt
[edit]
[-] 131.phpt
[edit]
[-] 092b.phpt
[edit]
[-] 003.phpt
[edit]
[-] 099b.phpt
[edit]
[-] 103b.phpt
[edit]
[-] 099.phpt
[edit]
[-] 060c.phpt
[edit]
[-] 063.phpt
[edit]
[-] 125.phpt
[edit]
[-] bug012.phpt
[edit]
[-] 095b.phpt
[edit]
[-] 097.phpt
[edit]
[-] 108.phpt
[edit]
[-] bug011.phpt
[edit]
[-] 082.phpt
[edit]
[-] 102.phpt
[edit]
[-] 024c.phpt
[edit]
[-] 105b.phpt
[edit]
[-] 106.phpt
[edit]
[-] 104b.phpt
[edit]
[-] 087.phpt
[edit]
[-] 113b.phpt
[edit]
[-] 118b.phpt
[edit]
[-] 127.phpt
[edit]
[-] 080.phpt
[edit]
[-] 029.phpt
[edit]
[-] 042.phpt
[edit]
[-] 028d.phpt
[edit]
[-] 097b.phpt
[edit]
[-] 115b.phpt
[edit]
[-] 070b.phpt
[edit]
[-] 121b.phpt
[edit]
[-] 102b.phpt
[edit]
[-] 110b.phpt
[edit]
[-] 067.phpt
[edit]
[-] 111b.phpt
[edit]
[-] 118.phpt
[edit]
[-] 007.phpt
[edit]
[-] 135.phpt
[edit]
[-] 103.phpt
[edit]
[-] 096b.phpt
[edit]
[-] 008.phpt
[edit]
[-] 073.phpt
[edit]
[-] 015d.phpt
[edit]
[-] 021.phpt
[edit]
[-] 061c.phpt
[edit]
[-] 015e.phpt
[edit]
[-] 090.phpt
[edit]
[-] 104.phpt
[edit]
[-] 134b.phpt
[edit]
[-] 071b.phpt
[edit]
[-] 091b.phpt
[edit]
[-] 034.phpt
[edit]
[-] 031.phpt
[edit]
[-] 022.phpt
[edit]
[-] 071.phpt
[edit]
[-] 121.phpt
[edit]
[-] 133.phpt
[edit]
[-] 113.phpt
[edit]
[-] 020.phpt
[edit]
[-] 120.phpt
[edit]
[-] 134.phpt
[edit]
[-] 015f.phpt
[edit]
[-] 120b.phpt
[edit]
[-] 107.phpt
[edit]
[-] 129.phpt
[edit]
[-] 106b.phpt
[edit]
[-] 115.phpt
[edit]
[-] 061b.phpt
[edit]
[-] 090b.phpt
[edit]
[-] 032.phpt
[edit]
[-] 119b.phpt
[edit]
[-] 128.phpt
[edit]
[-] 001.phpt
[edit]
[-] 093b.phpt
[edit]
[-] 116b.phpt
[edit]
[-] 073b.phpt
[edit]
[-] 065c.phpt
[edit]
[-] 027.phpt
[edit]
[-] 060.phpt
[edit]
[-] 028b.phpt
[edit]
[-] 028.phpt
[edit]
[-] 096.phpt
[edit]
[-] 135b.phpt
[edit]
[-] 015.phpt
[edit]
[-] 117b.phpt
[edit]
[-] 098.phpt
[edit]
[-] 109.phpt
[edit]
[-] 119.phpt
[edit]
[-] 130.phpt
[edit]
[-] 132b.phpt
[edit]
[-] 073c.phpt
[edit]
[-] 072c.phpt
[edit]
[-] 024b.phpt
[edit]
[-] 035.phpt
[edit]
[-] bug006.phpt
[edit]
[-] 050.phpt
[edit]
[-] 060b.phpt
[edit]
[-] 070.phpt
[edit]
[-] 088.phpt
[edit]
[-] 064c.phpt
[edit]
[-] 028c.phpt
[edit]
[-] 002.phpt
[edit]
[-] 017.phpt
[edit]
[-] 025c.phpt
[edit]
[-] 126.phpt
[edit]
[-] 107b.phpt
[edit]
[-] 122b.phpt
[edit]
[-] 112.phpt
[edit]
[-] 006.phpt
[edit]
[-] 126b.phpt
[edit]
[-] 012c.phpt
[edit]
[-] 105.phpt
[edit]
[-] 133b.phpt
[edit]
[-] 123b.phpt
[edit]
[-] 117.phpt
[edit]
[-] 101.phpt
[edit]
[-] 066.phpt
[edit]
[-] 023.phpt
[edit]
[-] 004.phpt
[edit]
[-] 064b.phpt
[edit]
[-] 123.phpt
[edit]
[-] 110.phpt
[edit]
[-] 122.phpt
[edit]
[-] 094b.phpt
[edit]
[-] 081.phpt
[edit]
[-] 083.phpt
[edit]
[-] 064.phpt
[edit]
[-] 109b.phpt
[edit]
[-] 026.phpt
[edit]
[-] 137.phpt
[edit]
[-] 040c.phpt
[edit]
[-] 015b.phpt
[edit]
[-] 027d.phpt
[edit]
[-] 130b.phpt
[edit]
[-] 132.phpt
[edit]
[-] 010.phpt
[edit]
[-] 009b.phpt
[edit]
[-] 100b.phpt
[edit]
[-] 138.phpt
[edit]
[-] 071c.phpt
[edit]
[-] 070c.phpt
[edit]
[-] 128b.phpt
[edit]
[-] 024.phpt
[edit]