3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class myModel() { function search($q,$count=10) { $results = $db->query("SOME SEARCH QUERY ? LIMIT ?",array($q,intval($count))); return $this->objectize($results); } } class myController() { function ajaxSearch() { $q = $this->post('query'); return $this->getSearchResults($q,10); } function getSearchResults($q,$count=10) { $model = new myModel(); return $model->search($q,10); } } // Tool == functional shit $query = $_POST['query']; Loader::helper("json")->encode(Loader::controller("myController")->getSearchResults($q,10));
Output for 5.3.0 - 5.4.15
Parse error: syntax error, unexpected '(', expecting '{' in /in/0Cp1C on line 2
Process exited with code 255.