3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php include('start.php'); require_once('lib/Phirehose/Phirehose.php'); class FilterTrackConsumer extends Phirehose { public $db; public function setDB(&$db) { $this->db = $db; } public function enqueueStatus($status) { $tweets = new Tweets($this->db); $data = json_decode($status, true); $user_id = $data['user']['id']; if($user_id) { $raw_tweet = serialize($data); $tweets->insertNewTweet($user_id, $raw_tweet); } } } $sc = new FilterTrackConsumer('John_Gald', 'yjdsqgfhjkm', Phirehose::METHOD_FILTER); $sc->setDB($db); $twitterIds = $users->getTwitterIds(); $sc->setFollow($twitterIds); $sc->consume(); ?>
Output for 5.1.0 - 7.1.0
Warning: include(start.php): failed to open stream: No such file or directory in /in/JhCWb on line 3 Warning: include(): Failed opening 'start.php' for inclusion (include_path='.:') in /in/JhCWb on line 3 Warning: require_once(lib/Phirehose/Phirehose.php): failed to open stream: No such file or directory in /in/JhCWb on line 4 Fatal error: require_once(): Failed opening required 'lib/Phirehose/Phirehose.php' (include_path='.:') in /in/JhCWb on line 4
Process exited with code 255.
Output for 5.0.0 - 5.0.5
Warning: main(start.php): failed to open stream: No such file or directory in /in/JhCWb on line 3 Warning: main(): Failed opening 'start.php' for inclusion (include_path='.:') in /in/JhCWb on line 3 Warning: main(lib/Phirehose/Phirehose.php): failed to open stream: No such file or directory in /in/JhCWb on line 4 Fatal error: main(): Failed opening required 'lib/Phirehose/Phirehose.php' (include_path='.:') in /in/JhCWb on line 4
Process exited with code 255.
Output for 4.4.2 - 4.4.9
Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /in/JhCWb on line 7
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1
Parse error: parse error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /in/JhCWb on line 7
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error, expecting `T_OLD_FUNCTION' or `T_FUNCTION' or `T_VAR' or `'}'' in /in/JhCWb on line 7
Process exited with code 255.