3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function my_unserialize($data) { $array = unserialize($data); if(!is_array($array)) { $array = array(); } return $array; } $_GET['ryat'] = 'ryat'; $ryat = ''; class ryat { function __construct($array) { foreach($array as $key => $val) { $key = $val; } } } $a = new ryat($_GET); $str = 'O:4:"ryat":0:{}'; echo(serialize($a));
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
O:4:"ryat":0:{}