<?php
class testCaseTrue {
public function __toString() {
return '1';
}
}
class testCaseFalse {
public function __toString() {
return '0';
}
}
$test_true = new testCaseTrue ();
$test_false = new testCaseFalse ();
echo "$test_true" ? 'test_true is true, ' : 'test_true is false, ';
echo "$test_false" ? 'test_false is true ' : 'test_false is false ';
Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /in/tusul on line 3
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/tusul on line 3
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/tusul on line 3
Process exited with code 255.