3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $arr = new StdClass; $arr->{"count(distinct show_id)"} = 'foo'; $arr = Array($arr); var_dump($arr); // get it this way var_dump($arr[0]->{"count(distinct show_id)"});
based on WWle1
Output for 5.0.0 - 7.1.10
array(1) { [0]=> object(stdClass)#1 (1) { ["count(distinct show_id)"]=> string(3) "foo" } } string(3) "foo"
Output for 4.3.0 - 4.4.9
array(1) { [0]=> object(stdClass)(1) { ["count(distinct show_id)"]=> string(3) "foo" } } string(3) "foo"