<?php
/** Object responsible for echoing debug data **/
class EchoLogger
{
public function addDebug($data) { echo $data; }
}
/** Object responsible for emailing debug data **/
class EmailLogger
{
public function addDebug($data) { /** Mail your data **/ }
}
class HttpClientService implements \SplSubject
{
private $observers = array();
public function getServiceStatus()
{
// -- SNIP --
$rand = rand(0, 10);
$status = ($rand >= 5) ? 'success' : 'error';
// -- Snip --
return $status;
}
}
Fatal error: Class HttpClientService contains 3 abstract methods and must therefore be declared abstract or implement the remaining methods (SplSubject::attach, SplSubject::detach, SplSubject::notify) in /in/6U0oF on line 15
Process exited with code 255.
Fatal error: Class HttpClientService contains 3 abstract methods and must therefore be declared abstract or implement the remaining methods (SplSubject::attach, SplSubject::detach, SplSubject::notify) in /in/6U0oF on line 28
Process exited with code 255.
Output for 5.1.0 - 5.1.6, 5.2.0 - 5.2.17
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/6U0oF on line 15
Fatal error: Class HttpClientService contains 3 abstract methods and must therefore be declared abstract or implement the remaining methods (SplSubject::attach, SplSubject::detach, SplSubject::notify) in /in/6U0oF on line 28
Process exited with code 255.
Output for 5.0.5
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/6U0oF on line 15
Fatal error: Interface 'SplSubject' not found in /in/6U0oF on line 15
Process exited with code 255.
Output for 5.0.0 - 5.0.4
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/6U0oF on line 15
Fatal error: Class 'SplSubject' not found in /in/6U0oF on line 15
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/6U0oF on line 6
Process exited with code 255.
Parse error: parse error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /in/6U0oF on line 6
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/6U0oF on line 6
Process exited with code 255.