3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $res = "[]"; if (is_string($data)) { $res = json_decode($data, true); if ($res == NULL) { $res = $data; } } echo $res;
based on fS73a
Output for 5.6.38 - 7.3.0rc3
Notice: Undefined variable: data in /in/PlVGb on line 4 []