Advertisement
Guest User

Untitled

a guest
Jun 29th, 2016
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.28 KB | None | 0 0
  1. > php igbinary-fail.php
  2. PHP7 can't igbinary_unserialize this data
  3. [{"geo":[34.1989453,-118.597305]},{"geo":[37.9429522,-122.3900901]},{"geo":[37.677661,-122.4552162]},{"geo":[29.958529,-90.077003]},{"geo":[47.28,-122.76]},{"geo":[33.9202933,-117.4464354]},{"geo":[37.3,-121.98]},{"geo":[33.7463915,-117.8604472]},{"geo":[33.7513419,-117.9939921]},{"geo":[29.4627365,-95.357994]},{"geo":[29.6185208,-95.6090009]},{"geo":[38.9559442,-76.9455301]},{"geo":[37.6966286,-97.3413212]},{"geo":[37.3,-121.98]},{"geo":[37.3,-121.98]},{"geo":[37.3,-121.98]},{"geo":[42.2717443,-71.7588217]},{"geo":[37.7729273,-122.2143323]},{"geo":[42.8662,-85.8984]},{"geo":[42.3065441,-71.0824613]}]
  4. igbinary_serialize($data) is the same as original-source;
  5. * igbinary_serialize(json_encode(json_decode($original))) is not the same as igbinary_serialize($original);
  6. * igbinary_serialize(unserialize(serialize($original))) is not the same as igbinary_serialize($original);
  7. actual data is exactly the same: igbinary_unserialize(igbinary_serialize(serialize(unserialize($original)))) === $original
  8.  
  9. > php -v
  10. PHP 5.6.20 (cli) (built: Mar 31 2016 07:01:09)
  11. Copyright (c) 1997-2016 The PHP Group
  12. Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies
  13. with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2016, by Zend Technologies
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement