3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class query_parser { function __construct($query_string) { print $query_string; } $filter = "this is where we would have the filter information"; } $qp = new query_parser('filter={age_group:[1,2,3]}'); echo $qp->$filter; ?>
Output for 5.4.0 - 5.5.12
Parse error: syntax error, unexpected '$filter' (T_VARIABLE), expecting function (T_FUNCTION) in /in/dfiAi on line 7
Process exited with code 255.
Output for 5.3.0 - 5.3.28
Parse error: syntax error, unexpected T_VARIABLE, expecting T_FUNCTION in /in/dfiAi on line 7
Process exited with code 255.