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 = json_decode(json_encode($user_notif)); $user_notif->news = 'asdasd'; var_dump(is_object(json_decode($a))); var_dump(json_encode($user_notif)); ?>
Output for 7.1.7
bool(true) string(91) "{"requests":"0","offers":"0","price_contests":"0","orders":"0","users":"0","news":"asdasd"}"