3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $a = '{"aasd":0}'; $user_notif = [ 'requests' => '0', 'offers' => '0', 'price_contests' => '0', 'orders' => '0', 'users' => '0', ]; $user_notif->news = 'asdasd'; var_dump(is_object(json_decode($a))); var_dump(json_encode($user_notif)); ?>
Output for 7.1.7
Warning: Attempt to assign property of non-object in /in/Z6rKI on line 12 bool(true) string(75) "{"requests":"0","offers":"0","price_contests":"0","orders":"0","users":"0"}"