Deprecated: Returning a value from a constructor is deprecated in /in/sXXe8 on line 31
Deprecated: Returning a value from a constructor is deprecated in /in/sXXe8 on line 35
Deprecated: Returning a value from a constructor is deprecated in /in/sXXe8 on line 37
Deprecated: Returning a value from a constructor is deprecated in /in/sXXe8 on line 40
--------------[ TESTCASE ]--------------
string(9) "no-return"
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
string(15) "no-return-value"
Success: a return statement without a value is always valid.
--------------[ TESTCASE ]--------------
string(5) "$this"
Success: throwable: Using $this when not in object context
--------------[ TESTCASE ]--------------
object(ShouldTypeError)#4 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(11) "Const hello"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(3) "abc"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
int(1)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
float(1.23)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
NULL
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
bool(true)
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
bool(false)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(3) {
[0]=>
string(1) "a"
[1]=>
string(1) "b"
[2]=>
string(1) "c"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(4) {
["a"]=>
string(1) "a"
["b"]=>
string(1) "b"
["c"]=>
string(1) "c"
[0]=>
string(4) "Zero"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(5) "never"
Success: throwable: Undefined constant "never"
--------------[ TESTCASE ]--------------
string(4) "void"
Success: throwable: Undefined constant "void"
--------------[ TESTCASE ]--------------
enum(SomeEnum::Spades)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#6 (3) {
["name"]=>
string(22) "{closure:/in/sXXe8:67}"
["file"]=>
string(9) "/in/sXXe8"
["line"]=>
int(67)
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#1 (3) {
["name"]=>
string(22) "{closure:/in/sXXe8:17}"
["file"]=>
string(9) "/in/sXXe8"
["line"]=>
int(17)
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#2 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#3 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(DateTimeImmutable)#7 (3) {
["date"]=>
string(26) "2026-01-30 13:31:14.004197"
["timezone_type"]=>
int(3)
["timezone"]=>
string(16) "Europe/Amsterdam"
}
Error: why is it not a return TypeError?
Output for 8.5.13
--------------[ TESTCASE ]--------------
string(9) "no-return"
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
string(15) "no-return-value"
Success: a return statement without a value is always valid.
--------------[ TESTCASE ]--------------
string(5) "$this"
Success: throwable: Using $this when not in object context
--------------[ TESTCASE ]--------------
object(ShouldTypeError)#4 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(11) "Const hello"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(3) "abc"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
int(1)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
float(1.23)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
NULL
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
bool(true)
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
bool(false)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(3) {
[0]=>
string(1) "a"
[1]=>
string(1) "b"
[2]=>
string(1) "c"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(4) {
["a"]=>
string(1) "a"
["b"]=>
string(1) "b"
["c"]=>
string(1) "c"
[0]=>
string(4) "Zero"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(5) "never"
Success: throwable: Undefined constant "never"
--------------[ TESTCASE ]--------------
string(4) "void"
Success: throwable: Undefined constant "void"
--------------[ TESTCASE ]--------------
enum(SomeEnum::Spades)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#6 (3) {
["name"]=>
string(22) "{closure:/in/sXXe8:67}"
["file"]=>
string(9) "/in/sXXe8"
["line"]=>
int(67)
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#1 (3) {
["name"]=>
string(22) "{closure:/in/sXXe8:17}"
["file"]=>
string(9) "/in/sXXe8"
["line"]=>
int(17)
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#2 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#3 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(DateTimeImmutable)#7 (3) {
["date"]=>
string(26) "2026-01-30 13:31:14.003645"
["timezone_type"]=>
int(3)
["timezone"]=>
string(16) "Europe/Amsterdam"
}
Error: why is it not a return TypeError?
Output for 8.5.12
--------------[ TESTCASE ]--------------
string(9) "no-return"
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
string(15) "no-return-value"
Success: a return statement without a value is always valid.
--------------[ TESTCASE ]--------------
string(5) "$this"
Success: throwable: Using $this when not in object context
--------------[ TESTCASE ]--------------
object(ShouldTypeError)#4 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(11) "Const hello"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(3) "abc"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
int(1)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
float(1.23)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
NULL
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
bool(true)
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
bool(false)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(3) {
[0]=>
string(1) "a"
[1]=>
string(1) "b"
[2]=>
string(1) "c"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(4) {
["a"]=>
string(1) "a"
["b"]=>
string(1) "b"
["c"]=>
string(1) "c"
[0]=>
string(4) "Zero"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(5) "never"
Success: throwable: Undefined constant "never"
--------------[ TESTCASE ]--------------
string(4) "void"
Success: throwable: Undefined constant "void"
--------------[ TESTCASE ]--------------
enum(SomeEnum::Spades)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#6 (3) {
["name"]=>
string(22) "{closure:/in/sXXe8:67}"
["file"]=>
string(9) "/in/sXXe8"
["line"]=>
int(67)
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#1 (3) {
["name"]=>
string(22) "{closure:/in/sXXe8:17}"
["file"]=>
string(9) "/in/sXXe8"
["line"]=>
int(17)
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#2 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#3 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(DateTimeImmutable)#7 (3) {
["date"]=>
string(26) "2026-01-30 13:31:14.003734"
["timezone_type"]=>
int(3)
["timezone"]=>
string(16) "Europe/Amsterdam"
}
Error: why is it not a return TypeError?
Output for 8.5.11
--------------[ TESTCASE ]--------------
string(9) "no-return"
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
string(15) "no-return-value"
Success: a return statement without a value is always valid.
--------------[ TESTCASE ]--------------
string(5) "$this"
Success: throwable: Using $this when not in object context
--------------[ TESTCASE ]--------------
object(ShouldTypeError)#4 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(11) "Const hello"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(3) "abc"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
int(1)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
float(1.23)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
NULL
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
bool(true)
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
bool(false)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(3) {
[0]=>
string(1) "a"
[1]=>
string(1) "b"
[2]=>
string(1) "c"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(4) {
["a"]=>
string(1) "a"
["b"]=>
string(1) "b"
["c"]=>
string(1) "c"
[0]=>
string(4) "Zero"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(5) "never"
Success: throwable: Undefined constant "never"
--------------[ TESTCASE ]--------------
string(4) "void"
Success: throwable: Undefined constant "void"
--------------[ TESTCASE ]--------------
enum(SomeEnum::Spades)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#6 (3) {
["name"]=>
string(22) "{closure:/in/sXXe8:67}"
["file"]=>
string(9) "/in/sXXe8"
["line"]=>
int(67)
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#1 (3) {
["name"]=>
string(22) "{closure:/in/sXXe8:17}"
["file"]=>
string(9) "/in/sXXe8"
["line"]=>
int(17)
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#2 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#3 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(DateTimeImmutable)#7 (3) {
["date"]=>
string(26) "2026-01-30 13:31:14.003766"
["timezone_type"]=>
int(3)
["timezone"]=>
string(16) "Europe/Amsterdam"
}
Error: why is it not a return TypeError?
Output for 8.5.10
--------------[ TESTCASE ]--------------
string(9) "no-return"
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
string(15) "no-return-value"
Success: a return statement without a value is always valid.
--------------[ TESTCASE ]--------------
string(5) "$this"
Success: throwable: Using $this when not in object context
--------------[ TESTCASE ]--------------
object(ShouldTypeError)#4 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(11) "Const hello"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(3) "abc"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
int(1)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
float(1.23)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
NULL
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
bool(true)
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
bool(false)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(3) {
[0]=>
string(1) "a"
[1]=>
string(1) "b"
[2]=>
string(1) "c"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(4) {
["a"]=>
string(1) "a"
["b"]=>
string(1) "b"
["c"]=>
string(1) "c"
[0]=>
string(4) "Zero"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(5) "never"
Success: throwable: Undefined constant "never"
--------------[ TESTCASE ]--------------
string(4) "void"
Success: throwable: Undefined constant "void"
--------------[ TESTCASE ]--------------
enum(SomeEnum::Spades)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#6 (3) {
["name"]=>
string(22) "{closure:/in/sXXe8:67}"
["file"]=>
string(9) "/in/sXXe8"
["line"]=>
int(67)
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#1 (3) {
["name"]=>
string(22) "{closure:/in/sXXe8:17}"
["file"]=>
string(9) "/in/sXXe8"
["line"]=>
int(17)
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#2 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#3 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(DateTimeImmutable)#7 (3) {
["date"]=>
string(26) "2026-01-30 13:31:14.003805"
["timezone_type"]=>
int(3)
["timezone"]=>
string(16) "Europe/Amsterdam"
}
Error: why is it not a return TypeError?
Output for 8.5.9
--------------[ TESTCASE ]--------------
string(9) "no-return"
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
string(15) "no-return-value"
Success: a return statement without a value is always valid.
--------------[ TESTCASE ]--------------
string(5) "$this"
Success: throwable: Using $this when not in object context
--------------[ TESTCASE ]--------------
object(ShouldTypeError)#4 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(11) "Const hello"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(3) "abc"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
int(1)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
float(1.23)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
NULL
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
bool(true)
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
bool(false)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(3) {
[0]=>
string(1) "a"
[1]=>
string(1) "b"
[2]=>
string(1) "c"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(4) {
["a"]=>
string(1) "a"
["b"]=>
string(1) "b"
["c"]=>
string(1) "c"
[0]=>
string(4) "Zero"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(5) "never"
Success: throwable: Undefined constant "never"
--------------[ TESTCASE ]--------------
string(4) "void"
Success: throwable: Undefined constant "void"
--------------[ TESTCASE ]--------------
enum(SomeEnum::Spades)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#6 (3) {
["name"]=>
string(22) "{closure:/in/sXXe8:67}"
["file"]=>
string(9) "/in/sXXe8"
["line"]=>
int(67)
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#1 (3) {
["name"]=>
string(22) "{closure:/in/sXXe8:17}"
["file"]=>
string(9) "/in/sXXe8"
["line"]=>
int(17)
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#2 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#3 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(DateTimeImmutable)#7 (3) {
["date"]=>
string(26) "2026-01-30 13:31:14.003718"
["timezone_type"]=>
int(3)
["timezone"]=>
string(16) "Europe/Amsterdam"
}
Error: why is it not a return TypeError?
Output for 8.5.8
--------------[ TESTCASE ]--------------
string(9) "no-return"
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
string(15) "no-return-value"
Success: a return statement without a value is always valid.
--------------[ TESTCASE ]--------------
string(5) "$this"
Success: throwable: Using $this when not in object context
--------------[ TESTCASE ]--------------
object(ShouldTypeError)#4 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(11) "Const hello"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(3) "abc"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
int(1)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
float(1.23)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
NULL
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
bool(true)
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
bool(false)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(3) {
[0]=>
string(1) "a"
[1]=>
string(1) "b"
[2]=>
string(1) "c"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(4) {
["a"]=>
string(1) "a"
["b"]=>
string(1) "b"
["c"]=>
string(1) "c"
[0]=>
string(4) "Zero"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(5) "never"
Success: throwable: Undefined constant "never"
--------------[ TESTCASE ]--------------
string(4) "void"
Success: throwable: Undefined constant "void"
--------------[ TESTCASE ]--------------
enum(SomeEnum::Spades)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#6 (3) {
["name"]=>
string(22) "{closure:/in/sXXe8:67}"
["file"]=>
string(9) "/in/sXXe8"
["line"]=>
int(67)
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#1 (3) {
["name"]=>
string(22) "{closure:/in/sXXe8:17}"
["file"]=>
string(9) "/in/sXXe8"
["line"]=>
int(17)
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#2 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#3 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(DateTimeImmutable)#7 (3) {
["date"]=>
string(26) "2026-01-30 13:31:14.003695"
["timezone_type"]=>
int(3)
["timezone"]=>
string(16) "Europe/Amsterdam"
}
Error: why is it not a return TypeError?
Output for 8.5.7
--------------[ TESTCASE ]--------------
string(9) "no-return"
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
string(15) "no-return-value"
Success: a return statement without a value is always valid.
--------------[ TESTCASE ]--------------
string(5) "$this"
Success: throwable: Using $this when not in object context
--------------[ TESTCASE ]--------------
object(ShouldTypeError)#4 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(11) "Const hello"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(3) "abc"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
int(1)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
float(1.23)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
NULL
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
bool(true)
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
bool(false)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(3) {
[0]=>
string(1) "a"
[1]=>
string(1) "b"
[2]=>
string(1) "c"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(4) {
["a"]=>
string(1) "a"
["b"]=>
string(1) "b"
["c"]=>
string(1) "c"
[0]=>
string(4) "Zero"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(5) "never"
Success: throwable: Undefined constant "never"
--------------[ TESTCASE ]--------------
string(4) "void"
Success: throwable: Undefined constant "void"
--------------[ TESTCASE ]--------------
enum(SomeEnum::Spades)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#6 (3) {
["name"]=>
string(22) "{closure:/in/sXXe8:67}"
["file"]=>
string(9) "/in/sXXe8"
["line"]=>
int(67)
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#1 (3) {
["name"]=>
string(22) "{closure:/in/sXXe8:17}"
["file"]=>
string(9) "/in/sXXe8"
["line"]=>
int(17)
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#2 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#3 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(DateTimeImmutable)#7 (3) {
["date"]=>
string(26) "2026-01-30 13:31:14.003713"
["timezone_type"]=>
int(3)
["timezone"]=>
string(16) "Europe/Amsterdam"
}
Error: why is it not a return TypeError?
Output for 8.5.5 - 8.5.6
--------------[ TESTCASE ]--------------
string(9) "no-return"
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
string(15) "no-return-value"
Success: a return statement without a value is always valid.
--------------[ TESTCASE ]--------------
string(5) "$this"
Success: throwable: Using $this when not in object context
--------------[ TESTCASE ]--------------
object(ShouldTypeError)#4 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(11) "Const hello"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(3) "abc"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
int(1)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
float(1.23)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
NULL
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
bool(true)
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
bool(false)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(3) {
[0]=>
string(1) "a"
[1]=>
string(1) "b"
[2]=>
string(1) "c"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(4) {
["a"]=>
string(1) "a"
["b"]=>
string(1) "b"
["c"]=>
string(1) "c"
[0]=>
string(4) "Zero"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(5) "never"
Success: throwable: Undefined constant "never"
--------------[ TESTCASE ]--------------
string(4) "void"
Success: throwable: Undefined constant "void"
--------------[ TESTCASE ]--------------
enum(SomeEnum::Spades)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#6 (3) {
["name"]=>
string(22) "{closure:/in/sXXe8:67}"
["file"]=>
string(9) "/in/sXXe8"
["line"]=>
int(67)
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#1 (3) {
["name"]=>
string(22) "{closure:/in/sXXe8:17}"
["file"]=>
string(9) "/in/sXXe8"
["line"]=>
int(17)
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#2 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#3 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(DateTimeImmutable)#7 (3) {
["date"]=>
string(26) "2026-01-30 13:31:14.003770"
["timezone_type"]=>
int(3)
["timezone"]=>
string(16) "Europe/Amsterdam"
}
Error: why is it not a return TypeError?
Output for 8.5.4
--------------[ TESTCASE ]--------------
string(9) "no-return"
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
string(15) "no-return-value"
Success: a return statement without a value is always valid.
--------------[ TESTCASE ]--------------
string(5) "$this"
Success: throwable: Using $this when not in object context
--------------[ TESTCASE ]--------------
object(ShouldTypeError)#4 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(11) "Const hello"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(3) "abc"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
int(1)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
float(1.23)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
NULL
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
bool(true)
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
bool(false)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(3) {
[0]=>
string(1) "a"
[1]=>
string(1) "b"
[2]=>
string(1) "c"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(4) {
["a"]=>
string(1) "a"
["b"]=>
string(1) "b"
["c"]=>
string(1) "c"
[0]=>
string(4) "Zero"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(5) "never"
Success: throwable: Undefined constant "never"
--------------[ TESTCASE ]--------------
string(4) "void"
Success: throwable: Undefined constant "void"
--------------[ TESTCASE ]--------------
enum(SomeEnum::Spades)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#6 (3) {
["name"]=>
string(22) "{closure:/in/sXXe8:67}"
["file"]=>
string(9) "/in/sXXe8"
["line"]=>
int(67)
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#1 (3) {
["name"]=>
string(22) "{closure:/in/sXXe8:17}"
["file"]=>
string(9) "/in/sXXe8"
["line"]=>
int(17)
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#2 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#3 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(DateTimeImmutable)#7 (3) {
["date"]=>
string(26) "2026-01-30 13:31:14.003696"
["timezone_type"]=>
int(3)
["timezone"]=>
string(16) "Europe/Amsterdam"
}
Error: why is it not a return TypeError?
Output for 8.5.3
--------------[ TESTCASE ]--------------
string(9) "no-return"
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
string(15) "no-return-value"
Success: a return statement without a value is always valid.
--------------[ TESTCASE ]--------------
string(5) "$this"
Success: throwable: Using $this when not in object context
--------------[ TESTCASE ]--------------
object(ShouldTypeError)#4 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(11) "Const hello"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(3) "abc"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
int(1)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
float(1.23)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
NULL
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
bool(true)
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
bool(false)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(3) {
[0]=>
string(1) "a"
[1]=>
string(1) "b"
[2]=>
string(1) "c"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(4) {
["a"]=>
string(1) "a"
["b"]=>
string(1) "b"
["c"]=>
string(1) "c"
[0]=>
string(4) "Zero"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(5) "never"
Success: throwable: Undefined constant "never"
--------------[ TESTCASE ]--------------
string(4) "void"
Success: throwable: Undefined constant "void"
--------------[ TESTCASE ]--------------
enum(SomeEnum::Spades)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#6 (3) {
["name"]=>
string(22) "{closure:/in/sXXe8:67}"
["file"]=>
string(9) "/in/sXXe8"
["line"]=>
int(67)
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#1 (3) {
["name"]=>
string(22) "{closure:/in/sXXe8:17}"
["file"]=>
string(9) "/in/sXXe8"
["line"]=>
int(17)
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#2 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#3 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(DateTimeImmutable)#7 (3) {
["date"]=>
string(26) "2026-01-30 13:31:14.003620"
["timezone_type"]=>
int(3)
["timezone"]=>
string(16) "Europe/Amsterdam"
}
Error: why is it not a return TypeError?
Output for 8.5.2
--------------[ TESTCASE ]--------------
string(9) "no-return"
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
string(15) "no-return-value"
Success: a return statement without a value is always valid.
--------------[ TESTCASE ]--------------
string(5) "$this"
Success: throwable: Using $this when not in object context
--------------[ TESTCASE ]--------------
object(ShouldTypeError)#4 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(11) "Const hello"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(3) "abc"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
int(1)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
float(1.23)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
NULL
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
bool(true)
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
bool(false)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(3) {
[0]=>
string(1) "a"
[1]=>
string(1) "b"
[2]=>
string(1) "c"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(4) {
["a"]=>
string(1) "a"
["b"]=>
string(1) "b"
["c"]=>
string(1) "c"
[0]=>
string(4) "Zero"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(5) "never"
Success: throwable: Undefined constant "never"
--------------[ TESTCASE ]--------------
string(4) "void"
Success: throwable: Undefined constant "void"
--------------[ TESTCASE ]--------------
enum(SomeEnum::Spades)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#6 (3) {
["name"]=>
string(22) "{closure:/in/sXXe8:67}"
["file"]=>
string(9) "/in/sXXe8"
["line"]=>
int(67)
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#1 (3) {
["name"]=>
string(22) "{closure:/in/sXXe8:17}"
["file"]=>
string(9) "/in/sXXe8"
["line"]=>
int(17)
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#2 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#3 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(DateTimeImmutable)#7 (3) {
["date"]=>
string(26) "2026-01-30 13:31:14.003706"
["timezone_type"]=>
int(3)
["timezone"]=>
string(16) "Europe/Amsterdam"
}
Error: why is it not a return TypeError?
Output for 8.5.1
--------------[ TESTCASE ]--------------
string(9) "no-return"
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
string(15) "no-return-value"
Success: a return statement without a value is always valid.
--------------[ TESTCASE ]--------------
string(5) "$this"
Success: throwable: Using $this when not in object context
--------------[ TESTCASE ]--------------
object(ShouldTypeError)#4 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(11) "Const hello"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(3) "abc"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
int(1)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
float(1.23)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
NULL
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
bool(true)
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
bool(false)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(3) {
[0]=>
string(1) "a"
[1]=>
string(1) "b"
[2]=>
string(1) "c"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(4) {
["a"]=>
string(1) "a"
["b"]=>
string(1) "b"
["c"]=>
string(1) "c"
[0]=>
string(4) "Zero"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(5) "never"
Success: throwable: Undefined constant "never"
--------------[ TESTCASE ]--------------
string(4) "void"
Success: throwable: Undefined constant "void"
--------------[ TESTCASE ]--------------
enum(SomeEnum::Spades)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#6 (3) {
["name"]=>
string(22) "{closure:/in/sXXe8:67}"
["file"]=>
string(9) "/in/sXXe8"
["line"]=>
int(67)
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#1 (3) {
["name"]=>
string(22) "{closure:/in/sXXe8:17}"
["file"]=>
string(9) "/in/sXXe8"
["line"]=>
int(17)
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#2 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#3 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(DateTimeImmutable)#7 (3) {
["date"]=>
string(26) "2026-01-30 13:31:14.003806"
["timezone_type"]=>
int(3)
["timezone"]=>
string(16) "Europe/Amsterdam"
}
Error: why is it not a return TypeError?
Output for 8.5.0
--------------[ TESTCASE ]--------------
string(9) "no-return"
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
string(15) "no-return-value"
Success: a return statement without a value is always valid.
--------------[ TESTCASE ]--------------
string(5) "$this"
Success: throwable: Using $this when not in object context
--------------[ TESTCASE ]--------------
object(ShouldTypeError)#4 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(11) "Const hello"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(3) "abc"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
int(1)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
float(1.23)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
NULL
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
bool(true)
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
bool(false)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(3) {
[0]=>
string(1) "a"
[1]=>
string(1) "b"
[2]=>
string(1) "c"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(4) {
["a"]=>
string(1) "a"
["b"]=>
string(1) "b"
["c"]=>
string(1) "c"
[0]=>
string(4) "Zero"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(5) "never"
Success: throwable: Undefined constant "never"
--------------[ TESTCASE ]--------------
string(4) "void"
Success: throwable: Undefined constant "void"
--------------[ TESTCASE ]--------------
enum(SomeEnum::Spades)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#6 (3) {
["name"]=>
string(22) "{closure:/in/sXXe8:67}"
["file"]=>
string(9) "/in/sXXe8"
["line"]=>
int(67)
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#1 (3) {
["name"]=>
string(22) "{closure:/in/sXXe8:17}"
["file"]=>
string(9) "/in/sXXe8"
["line"]=>
int(17)
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#2 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#3 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(DateTimeImmutable)#7 (3) {
["date"]=>
string(26) "2026-01-30 13:31:14.003856"
["timezone_type"]=>
int(3)
["timezone"]=>
string(16) "Europe/Amsterdam"
}
Error: why is it not a return TypeError?
Output for 8.4.28
--------------[ TESTCASE ]--------------
string(9) "no-return"
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
string(15) "no-return-value"
Success: a return statement without a value is always valid.
--------------[ TESTCASE ]--------------
string(5) "$this"
Success: throwable: Using $this when not in object context
--------------[ TESTCASE ]--------------
object(ShouldTypeError)#4 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(11) "Const hello"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(3) "abc"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
int(1)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
float(1.23)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
NULL
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
bool(true)
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
bool(false)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(3) {
[0]=>
string(1) "a"
[1]=>
string(1) "b"
[2]=>
string(1) "c"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(4) {
["a"]=>
string(1) "a"
["b"]=>
string(1) "b"
["c"]=>
string(1) "c"
[0]=>
string(4) "Zero"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(5) "never"
Success: throwable: Undefined constant "never"
--------------[ TESTCASE ]--------------
string(4) "void"
Success: throwable: Undefined constant "void"
--------------[ TESTCASE ]--------------
enum(SomeEnum::Spades)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#6 (3) {
["name"]=>
string(22) "{closure:/in/sXXe8:67}"
["file"]=>
string(9) "/in/sXXe8"
["line"]=>
int(67)
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#1 (3) {
["name"]=>
string(22) "{closure:/in/sXXe8:17}"
["file"]=>
string(9) "/in/sXXe8"
["line"]=>
int(17)
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#2 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#3 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(DateTimeImmutable)#7 (3) {
["date"]=>
string(26) "2026-01-30 13:31:14.005483"
["timezone_type"]=>
int(3)
["timezone"]=>
string(16) "Europe/Amsterdam"
}
Error: why is it not a return TypeError?
Output for 8.4.27
--------------[ TESTCASE ]--------------
string(9) "no-return"
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
string(15) "no-return-value"
Success: a return statement without a value is always valid.
--------------[ TESTCASE ]--------------
string(5) "$this"
Success: throwable: Using $this when not in object context
--------------[ TESTCASE ]--------------
object(ShouldTypeError)#4 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(11) "Const hello"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(3) "abc"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
int(1)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
float(1.23)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
NULL
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
bool(true)
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
bool(false)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(3) {
[0]=>
string(1) "a"
[1]=>
string(1) "b"
[2]=>
string(1) "c"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(4) {
["a"]=>
string(1) "a"
["b"]=>
string(1) "b"
["c"]=>
string(1) "c"
[0]=>
string(4) "Zero"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(5) "never"
Success: throwable: Undefined constant "never"
--------------[ TESTCASE ]--------------
string(4) "void"
Success: throwable: Undefined constant "void"
--------------[ TESTCASE ]--------------
enum(SomeEnum::Spades)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#6 (3) {
["name"]=>
string(22) "{closure:/in/sXXe8:67}"
["file"]=>
string(9) "/in/sXXe8"
["line"]=>
int(67)
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#1 (3) {
["name"]=>
string(22) "{closure:/in/sXXe8:17}"
["file"]=>
string(9) "/in/sXXe8"
["line"]=>
int(17)
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#2 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#3 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(DateTimeImmutable)#7 (3) {
["date"]=>
string(26) "2026-01-30 13:31:14.005463"
["timezone_type"]=>
int(3)
["timezone"]=>
string(16) "Europe/Amsterdam"
}
Error: why is it not a return TypeError?
Output for 8.4.26
--------------[ TESTCASE ]--------------
string(9) "no-return"
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
string(15) "no-return-value"
Success: a return statement without a value is always valid.
--------------[ TESTCASE ]--------------
string(5) "$this"
Success: throwable: Using $this when not in object context
--------------[ TESTCASE ]--------------
object(ShouldTypeError)#4 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(11) "Const hello"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(3) "abc"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
int(1)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
float(1.23)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
NULL
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
bool(true)
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
bool(false)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(3) {
[0]=>
string(1) "a"
[1]=>
string(1) "b"
[2]=>
string(1) "c"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(4) {
["a"]=>
string(1) "a"
["b"]=>
string(1) "b"
["c"]=>
string(1) "c"
[0]=>
string(4) "Zero"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(5) "never"
Success: throwable: Undefined constant "never"
--------------[ TESTCASE ]--------------
string(4) "void"
Success: throwable: Undefined constant "void"
--------------[ TESTCASE ]--------------
enum(SomeEnum::Spades)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#6 (3) {
["name"]=>
string(22) "{closure:/in/sXXe8:67}"
["file"]=>
string(9) "/in/sXXe8"
["line"]=>
int(67)
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#1 (3) {
["name"]=>
string(22) "{closure:/in/sXXe8:17}"
["file"]=>
string(9) "/in/sXXe8"
["line"]=>
int(17)
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#2 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#3 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(DateTimeImmutable)#7 (3) {
["date"]=>
string(26) "2026-01-30 13:31:14.005205"
["timezone_type"]=>
int(3)
["timezone"]=>
string(16) "Europe/Amsterdam"
}
Error: why is it not a return TypeError?
Output for 8.4.25
--------------[ TESTCASE ]--------------
string(9) "no-return"
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
string(15) "no-return-value"
Success: a return statement without a value is always valid.
--------------[ TESTCASE ]--------------
string(5) "$this"
Success: throwable: Using $this when not in object context
--------------[ TESTCASE ]--------------
object(ShouldTypeError)#4 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(11) "Const hello"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(3) "abc"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
int(1)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
float(1.23)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
NULL
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
bool(true)
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
bool(false)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(3) {
[0]=>
string(1) "a"
[1]=>
string(1) "b"
[2]=>
string(1) "c"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(4) {
["a"]=>
string(1) "a"
["b"]=>
string(1) "b"
["c"]=>
string(1) "c"
[0]=>
string(4) "Zero"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(5) "never"
Success: throwable: Undefined constant "never"
--------------[ TESTCASE ]--------------
string(4) "void"
Success: throwable: Undefined constant "void"
--------------[ TESTCASE ]--------------
enum(SomeEnum::Spades)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#6 (3) {
["name"]=>
string(22) "{closure:/in/sXXe8:67}"
["file"]=>
string(9) "/in/sXXe8"
["line"]=>
int(67)
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#1 (3) {
["name"]=>
string(22) "{closure:/in/sXXe8:17}"
["file"]=>
string(9) "/in/sXXe8"
["line"]=>
int(17)
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#2 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#3 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(DateTimeImmutable)#7 (3) {
["date"]=>
string(26) "2026-01-30 13:31:14.005445"
["timezone_type"]=>
int(3)
["timezone"]=>
string(16) "Europe/Amsterdam"
}
Error: why is it not a return TypeError?
Output for 8.4.24
--------------[ TESTCASE ]--------------
string(9) "no-return"
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
string(15) "no-return-value"
Success: a return statement without a value is always valid.
--------------[ TESTCASE ]--------------
string(5) "$this"
Success: throwable: Using $this when not in object context
--------------[ TESTCASE ]--------------
object(ShouldTypeError)#4 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(11) "Const hello"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(3) "abc"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
int(1)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
float(1.23)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
NULL
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
bool(true)
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
bool(false)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(3) {
[0]=>
string(1) "a"
[1]=>
string(1) "b"
[2]=>
string(1) "c"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(4) {
["a"]=>
string(1) "a"
["b"]=>
string(1) "b"
["c"]=>
string(1) "c"
[0]=>
string(4) "Zero"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(5) "never"
Success: throwable: Undefined constant "never"
--------------[ TESTCASE ]--------------
string(4) "void"
Success: throwable: Undefined constant "void"
--------------[ TESTCASE ]--------------
enum(SomeEnum::Spades)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#6 (3) {
["name"]=>
string(22) "{closure:/in/sXXe8:67}"
["file"]=>
string(9) "/in/sXXe8"
["line"]=>
int(67)
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#1 (3) {
["name"]=>
string(22) "{closure:/in/sXXe8:17}"
["file"]=>
string(9) "/in/sXXe8"
["line"]=>
int(17)
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#2 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#3 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(DateTimeImmutable)#7 (3) {
["date"]=>
string(26) "2026-01-30 13:31:14.005359"
["timezone_type"]=>
int(3)
["timezone"]=>
string(16) "Europe/Amsterdam"
}
Error: why is it not a return TypeError?
Output for 8.4.23
--------------[ TESTCASE ]--------------
string(9) "no-return"
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
string(15) "no-return-value"
Success: a return statement without a value is always valid.
--------------[ TESTCASE ]--------------
string(5) "$this"
Success: throwable: Using $this when not in object context
--------------[ TESTCASE ]--------------
object(ShouldTypeError)#4 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(11) "Const hello"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(3) "abc"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
int(1)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
float(1.23)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
NULL
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
bool(true)
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
bool(false)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(3) {
[0]=>
string(1) "a"
[1]=>
string(1) "b"
[2]=>
string(1) "c"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(4) {
["a"]=>
string(1) "a"
["b"]=>
string(1) "b"
["c"]=>
string(1) "c"
[0]=>
string(4) "Zero"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(5) "never"
Success: throwable: Undefined constant "never"
--------------[ TESTCASE ]--------------
string(4) "void"
Success: throwable: Undefined constant "void"
--------------[ TESTCASE ]--------------
enum(SomeEnum::Spades)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#6 (3) {
["name"]=>
string(22) "{closure:/in/sXXe8:67}"
["file"]=>
string(9) "/in/sXXe8"
["line"]=>
int(67)
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#1 (3) {
["name"]=>
string(22) "{closure:/in/sXXe8:17}"
["file"]=>
string(9) "/in/sXXe8"
["line"]=>
int(17)
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#2 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#3 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(DateTimeImmutable)#7 (3) {
["date"]=>
string(26) "2026-01-30 13:31:14.005442"
["timezone_type"]=>
int(3)
["timezone"]=>
string(16) "Europe/Amsterdam"
}
Error: why is it not a return TypeError?
Output for 8.4.22
--------------[ TESTCASE ]--------------
string(9) "no-return"
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
string(15) "no-return-value"
Success: a return statement without a value is always valid.
--------------[ TESTCASE ]--------------
string(5) "$this"
Success: throwable: Using $this when not in object context
--------------[ TESTCASE ]--------------
object(ShouldTypeError)#4 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(11) "Const hello"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(3) "abc"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
int(1)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
float(1.23)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
NULL
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
bool(true)
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
bool(false)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(3) {
[0]=>
string(1) "a"
[1]=>
string(1) "b"
[2]=>
string(1) "c"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(4) {
["a"]=>
string(1) "a"
["b"]=>
string(1) "b"
["c"]=>
string(1) "c"
[0]=>
string(4) "Zero"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(5) "never"
Success: throwable: Undefined constant "never"
--------------[ TESTCASE ]--------------
string(4) "void"
Success: throwable: Undefined constant "void"
--------------[ TESTCASE ]--------------
enum(SomeEnum::Spades)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#6 (3) {
["name"]=>
string(22) "{closure:/in/sXXe8:67}"
["file"]=>
string(9) "/in/sXXe8"
["line"]=>
int(67)
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#1 (3) {
["name"]=>
string(22) "{closure:/in/sXXe8:17}"
["file"]=>
string(9) "/in/sXXe8"
["line"]=>
int(17)
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#2 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#3 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(DateTimeImmutable)#7 (3) {
["date"]=>
string(26) "2026-01-30 13:31:14.005371"
["timezone_type"]=>
int(3)
["timezone"]=>
string(16) "Europe/Amsterdam"
}
Error: why is it not a return TypeError?
Output for 8.4.21
--------------[ TESTCASE ]--------------
string(9) "no-return"
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
string(15) "no-return-value"
Success: a return statement without a value is always valid.
--------------[ TESTCASE ]--------------
string(5) "$this"
Success: throwable: Using $this when not in object context
--------------[ TESTCASE ]--------------
object(ShouldTypeError)#4 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(11) "Const hello"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(3) "abc"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
int(1)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
float(1.23)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
NULL
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
bool(true)
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
bool(false)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(3) {
[0]=>
string(1) "a"
[1]=>
string(1) "b"
[2]=>
string(1) "c"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(4) {
["a"]=>
string(1) "a"
["b"]=>
string(1) "b"
["c"]=>
string(1) "c"
[0]=>
string(4) "Zero"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(5) "never"
Success: throwable: Undefined constant "never"
--------------[ TESTCASE ]--------------
string(4) "void"
Success: throwable: Undefined constant "void"
--------------[ TESTCASE ]--------------
enum(SomeEnum::Spades)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#6 (3) {
["name"]=>
string(22) "{closure:/in/sXXe8:67}"
["file"]=>
string(9) "/in/sXXe8"
["line"]=>
int(67)
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#1 (3) {
["name"]=>
string(22) "{closure:/in/sXXe8:17}"
["file"]=>
string(9) "/in/sXXe8"
["line"]=>
int(17)
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#2 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#3 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(DateTimeImmutable)#7 (3) {
["date"]=>
string(26) "2026-01-30 13:31:14.005256"
["timezone_type"]=>
int(3)
["timezone"]=>
string(16) "Europe/Amsterdam"
}
Error: why is it not a return TypeError?
Output for 8.4.20
--------------[ TESTCASE ]--------------
string(9) "no-return"
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
string(15) "no-return-value"
Success: a return statement without a value is always valid.
--------------[ TESTCASE ]--------------
string(5) "$this"
Success: throwable: Using $this when not in object context
--------------[ TESTCASE ]--------------
object(ShouldTypeError)#4 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(11) "Const hello"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(3) "abc"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
int(1)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
float(1.23)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
NULL
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
bool(true)
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
bool(false)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(3) {
[0]=>
string(1) "a"
[1]=>
string(1) "b"
[2]=>
string(1) "c"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(4) {
["a"]=>
string(1) "a"
["b"]=>
string(1) "b"
["c"]=>
string(1) "c"
[0]=>
string(4) "Zero"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(5) "never"
Success: throwable: Undefined constant "never"
--------------[ TESTCASE ]--------------
string(4) "void"
Success: throwable: Undefined constant "void"
--------------[ TESTCASE ]--------------
enum(SomeEnum::Spades)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#6 (3) {
["name"]=>
string(22) "{closure:/in/sXXe8:67}"
["file"]=>
string(9) "/in/sXXe8"
["line"]=>
int(67)
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#1 (3) {
["name"]=>
string(22) "{closure:/in/sXXe8:17}"
["file"]=>
string(9) "/in/sXXe8"
["line"]=>
int(17)
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#2 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#3 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(DateTimeImmutable)#7 (3) {
["date"]=>
string(26) "2026-01-30 13:31:14.005524"
["timezone_type"]=>
int(3)
["timezone"]=>
string(16) "Europe/Amsterdam"
}
Error: why is it not a return TypeError?
Output for 8.4.19
--------------[ TESTCASE ]--------------
string(9) "no-return"
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
string(15) "no-return-value"
Success: a return statement without a value is always valid.
--------------[ TESTCASE ]--------------
string(5) "$this"
Success: throwable: Using $this when not in object context
--------------[ TESTCASE ]--------------
object(ShouldTypeError)#4 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(11) "Const hello"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(3) "abc"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
int(1)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
float(1.23)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
NULL
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
bool(true)
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
bool(false)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(3) {
[0]=>
string(1) "a"
[1]=>
string(1) "b"
[2]=>
string(1) "c"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(4) {
["a"]=>
string(1) "a"
["b"]=>
string(1) "b"
["c"]=>
string(1) "c"
[0]=>
string(4) "Zero"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(5) "never"
Success: throwable: Undefined constant "never"
--------------[ TESTCASE ]--------------
string(4) "void"
Success: throwable: Undefined constant "void"
--------------[ TESTCASE ]--------------
enum(SomeEnum::Spades)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#6 (3) {
["name"]=>
string(22) "{closure:/in/sXXe8:67}"
["file"]=>
string(9) "/in/sXXe8"
["line"]=>
int(67)
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#1 (3) {
["name"]=>
string(22) "{closure:/in/sXXe8:17}"
["file"]=>
string(9) "/in/sXXe8"
["line"]=>
int(17)
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#2 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#3 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(DateTimeImmutable)#7 (3) {
["date"]=>
string(26) "2026-01-30 13:31:14.005439"
["timezone_type"]=>
int(3)
["timezone"]=>
string(16) "Europe/Amsterdam"
}
Error: why is it not a return TypeError?
Output for 8.4.18
--------------[ TESTCASE ]--------------
string(9) "no-return"
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
string(15) "no-return-value"
Success: a return statement without a value is always valid.
--------------[ TESTCASE ]--------------
string(5) "$this"
Success: throwable: Using $this when not in object context
--------------[ TESTCASE ]--------------
object(ShouldTypeError)#4 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(11) "Const hello"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(3) "abc"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
int(1)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
float(1.23)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
NULL
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
bool(true)
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
bool(false)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(3) {
[0]=>
string(1) "a"
[1]=>
string(1) "b"
[2]=>
string(1) "c"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(4) {
["a"]=>
string(1) "a"
["b"]=>
string(1) "b"
["c"]=>
string(1) "c"
[0]=>
string(4) "Zero"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(5) "never"
Success: throwable: Undefined constant "never"
--------------[ TESTCASE ]--------------
string(4) "void"
Success: throwable: Undefined constant "void"
--------------[ TESTCASE ]--------------
enum(SomeEnum::Spades)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#6 (3) {
["name"]=>
string(22) "{closure:/in/sXXe8:67}"
["file"]=>
string(9) "/in/sXXe8"
["line"]=>
int(67)
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#1 (3) {
["name"]=>
string(22) "{closure:/in/sXXe8:17}"
["file"]=>
string(9) "/in/sXXe8"
["line"]=>
int(17)
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#2 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#3 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(DateTimeImmutable)#7 (3) {
["date"]=>
string(26) "2026-01-30 13:31:14.005412"
["timezone_type"]=>
int(3)
["timezone"]=>
string(16) "Europe/Amsterdam"
}
Error: why is it not a return TypeError?
Output for 8.4.17
--------------[ TESTCASE ]--------------
string(9) "no-return"
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
string(15) "no-return-value"
Success: a return statement without a value is always valid.
--------------[ TESTCASE ]--------------
string(5) "$this"
Success: throwable: Using $this when not in object context
--------------[ TESTCASE ]--------------
object(ShouldTypeError)#4 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(11) "Const hello"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(3) "abc"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
int(1)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
float(1.23)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
NULL
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
bool(true)
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
bool(false)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(3) {
[0]=>
string(1) "a"
[1]=>
string(1) "b"
[2]=>
string(1) "c"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(4) {
["a"]=>
string(1) "a"
["b"]=>
string(1) "b"
["c"]=>
string(1) "c"
[0]=>
string(4) "Zero"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(5) "never"
Success: throwable: Undefined constant "never"
--------------[ TESTCASE ]--------------
string(4) "void"
Success: throwable: Undefined constant "void"
--------------[ TESTCASE ]--------------
enum(SomeEnum::Spades)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#6 (3) {
["name"]=>
string(22) "{closure:/in/sXXe8:67}"
["file"]=>
string(9) "/in/sXXe8"
["line"]=>
int(67)
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#1 (3) {
["name"]=>
string(22) "{closure:/in/sXXe8:17}"
["file"]=>
string(9) "/in/sXXe8"
["line"]=>
int(17)
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#2 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#3 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(DateTimeImmutable)#7 (3) {
["date"]=>
string(26) "2026-01-30 13:31:14.005175"
["timezone_type"]=>
int(3)
["timezone"]=>
string(16) "Europe/Amsterdam"
}
Error: why is it not a return TypeError?
Output for 8.4.16
--------------[ TESTCASE ]--------------
string(9) "no-return"
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
string(15) "no-return-value"
Success: a return statement without a value is always valid.
--------------[ TESTCASE ]--------------
string(5) "$this"
Success: throwable: Using $this when not in object context
--------------[ TESTCASE ]--------------
object(ShouldTypeError)#4 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(11) "Const hello"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(3) "abc"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
int(1)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
float(1.23)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
NULL
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
bool(true)
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
bool(false)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(3) {
[0]=>
string(1) "a"
[1]=>
string(1) "b"
[2]=>
string(1) "c"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(4) {
["a"]=>
string(1) "a"
["b"]=>
string(1) "b"
["c"]=>
string(1) "c"
[0]=>
string(4) "Zero"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(5) "never"
Success: throwable: Undefined constant "never"
--------------[ TESTCASE ]--------------
string(4) "void"
Success: throwable: Undefined constant "void"
--------------[ TESTCASE ]--------------
enum(SomeEnum::Spades)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#6 (3) {
["name"]=>
string(22) "{closure:/in/sXXe8:67}"
["file"]=>
string(9) "/in/sXXe8"
["line"]=>
int(67)
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#1 (3) {
["name"]=>
string(22) "{closure:/in/sXXe8:17}"
["file"]=>
string(9) "/in/sXXe8"
["line"]=>
int(17)
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#2 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#3 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(DateTimeImmutable)#7 (3) {
["date"]=>
string(26) "2026-01-30 13:31:14.005384"
["timezone_type"]=>
int(3)
["timezone"]=>
string(16) "Europe/Amsterdam"
}
Error: why is it not a return TypeError?
Output for 8.4.15
--------------[ TESTCASE ]--------------
string(9) "no-return"
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
string(15) "no-return-value"
Success: a return statement without a value is always valid.
--------------[ TESTCASE ]--------------
string(5) "$this"
Success: throwable: Using $this when not in object context
--------------[ TESTCASE ]--------------
object(ShouldTypeError)#4 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(11) "Const hello"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(3) "abc"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
int(1)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
float(1.23)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
NULL
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
bool(true)
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
bool(false)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(3) {
[0]=>
string(1) "a"
[1]=>
string(1) "b"
[2]=>
string(1) "c"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(4) {
["a"]=>
string(1) "a"
["b"]=>
string(1) "b"
["c"]=>
string(1) "c"
[0]=>
string(4) "Zero"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(5) "never"
Success: throwable: Undefined constant "never"
--------------[ TESTCASE ]--------------
string(4) "void"
Success: throwable: Undefined constant "void"
--------------[ TESTCASE ]--------------
enum(SomeEnum::Spades)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#6 (3) {
["name"]=>
string(22) "{closure:/in/sXXe8:67}"
["file"]=>
string(9) "/in/sXXe8"
["line"]=>
int(67)
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#1 (3) {
["name"]=>
string(22) "{closure:/in/sXXe8:17}"
["file"]=>
string(9) "/in/sXXe8"
["line"]=>
int(17)
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#2 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#3 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(DateTimeImmutable)#7 (3) {
["date"]=>
string(26) "2026-01-30 13:31:14.005097"
["timezone_type"]=>
int(3)
["timezone"]=>
string(16) "Europe/Amsterdam"
}
Error: why is it not a return TypeError?
Output for 8.4.14
--------------[ TESTCASE ]--------------
string(9) "no-return"
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
string(15) "no-return-value"
Success: a return statement without a value is always valid.
--------------[ TESTCASE ]--------------
string(5) "$this"
Success: throwable: Using $this when not in object context
--------------[ TESTCASE ]--------------
object(ShouldTypeError)#4 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(11) "Const hello"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(3) "abc"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
int(1)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
float(1.23)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
NULL
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
bool(true)
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
bool(false)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(3) {
[0]=>
string(1) "a"
[1]=>
string(1) "b"
[2]=>
string(1) "c"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(4) {
["a"]=>
string(1) "a"
["b"]=>
string(1) "b"
["c"]=>
string(1) "c"
[0]=>
string(4) "Zero"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(5) "never"
Success: throwable: Undefined constant "never"
--------------[ TESTCASE ]--------------
string(4) "void"
Success: throwable: Undefined constant "void"
--------------[ TESTCASE ]--------------
enum(SomeEnum::Spades)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#6 (3) {
["name"]=>
string(22) "{closure:/in/sXXe8:67}"
["file"]=>
string(9) "/in/sXXe8"
["line"]=>
int(67)
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#1 (3) {
["name"]=>
string(22) "{closure:/in/sXXe8:17}"
["file"]=>
string(9) "/in/sXXe8"
["line"]=>
int(17)
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#2 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#3 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(DateTimeImmutable)#7 (3) {
["date"]=>
string(26) "2026-01-30 13:31:14.004381"
["timezone_type"]=>
int(3)
["timezone"]=>
string(16) "Europe/Amsterdam"
}
Error: why is it not a return TypeError?
Output for 8.4.13
--------------[ TESTCASE ]--------------
string(9) "no-return"
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
string(15) "no-return-value"
Success: a return statement without a value is always valid.
--------------[ TESTCASE ]--------------
string(5) "$this"
Success: throwable: Using $this when not in object context
--------------[ TESTCASE ]--------------
object(ShouldTypeError)#4 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(11) "Const hello"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(3) "abc"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
int(1)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
float(1.23)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
NULL
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
bool(true)
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
bool(false)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(3) {
[0]=>
string(1) "a"
[1]=>
string(1) "b"
[2]=>
string(1) "c"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(4) {
["a"]=>
string(1) "a"
["b"]=>
string(1) "b"
["c"]=>
string(1) "c"
[0]=>
string(4) "Zero"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(5) "never"
Success: throwable: Undefined constant "never"
--------------[ TESTCASE ]--------------
string(4) "void"
Success: throwable: Undefined constant "void"
--------------[ TESTCASE ]--------------
enum(SomeEnum::Spades)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#6 (3) {
["name"]=>
string(22) "{closure:/in/sXXe8:67}"
["file"]=>
string(9) "/in/sXXe8"
["line"]=>
int(67)
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#1 (3) {
["name"]=>
string(22) "{closure:/in/sXXe8:17}"
["file"]=>
string(9) "/in/sXXe8"
["line"]=>
int(17)
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#2 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#3 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(DateTimeImmutable)#7 (3) {
["date"]=>
string(26) "2026-01-30 13:31:14.004604"
["timezone_type"]=>
int(3)
["timezone"]=>
string(16) "Europe/Amsterdam"
}
Error: why is it not a return TypeError?
Output for 8.4.12
--------------[ TESTCASE ]--------------
string(9) "no-return"
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
string(15) "no-return-value"
Success: a return statement without a value is always valid.
--------------[ TESTCASE ]--------------
string(5) "$this"
Success: throwable: Using $this when not in object context
--------------[ TESTCASE ]--------------
object(ShouldTypeError)#4 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(11) "Const hello"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(3) "abc"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
int(1)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
float(1.23)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
NULL
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
bool(true)
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
bool(false)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(3) {
[0]=>
string(1) "a"
[1]=>
string(1) "b"
[2]=>
string(1) "c"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(4) {
["a"]=>
string(1) "a"
["b"]=>
string(1) "b"
["c"]=>
string(1) "c"
[0]=>
string(4) "Zero"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(5) "never"
Success: throwable: Undefined constant "never"
--------------[ TESTCASE ]--------------
string(4) "void"
Success: throwable: Undefined constant "void"
--------------[ TESTCASE ]--------------
enum(SomeEnum::Spades)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#6 (3) {
["name"]=>
string(22) "{closure:/in/sXXe8:67}"
["file"]=>
string(9) "/in/sXXe8"
["line"]=>
int(67)
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#1 (3) {
["name"]=>
string(22) "{closure:/in/sXXe8:17}"
["file"]=>
string(9) "/in/sXXe8"
["line"]=>
int(17)
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#2 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#3 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(DateTimeImmutable)#7 (3) {
["date"]=>
string(26) "2026-01-30 13:31:14.004465"
["timezone_type"]=>
int(3)
["timezone"]=>
string(16) "Europe/Amsterdam"
}
Error: why is it not a return TypeError?
Output for 8.4.11
--------------[ TESTCASE ]--------------
string(9) "no-return"
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
string(15) "no-return-value"
Success: a return statement without a value is always valid.
--------------[ TESTCASE ]--------------
string(5) "$this"
Success: throwable: Using $this when not in object context
--------------[ TESTCASE ]--------------
object(ShouldTypeError)#4 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(11) "Const hello"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(3) "abc"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
int(1)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
float(1.23)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
NULL
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
bool(true)
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
bool(false)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(3) {
[0]=>
string(1) "a"
[1]=>
string(1) "b"
[2]=>
string(1) "c"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(4) {
["a"]=>
string(1) "a"
["b"]=>
string(1) "b"
["c"]=>
string(1) "c"
[0]=>
string(4) "Zero"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(5) "never"
Success: throwable: Undefined constant "never"
--------------[ TESTCASE ]--------------
string(4) "void"
Success: throwable: Undefined constant "void"
--------------[ TESTCASE ]--------------
enum(SomeEnum::Spades)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#6 (3) {
["name"]=>
string(22) "{closure:/in/sXXe8:67}"
["file"]=>
string(9) "/in/sXXe8"
["line"]=>
int(67)
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#1 (3) {
["name"]=>
string(22) "{closure:/in/sXXe8:17}"
["file"]=>
string(9) "/in/sXXe8"
["line"]=>
int(17)
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#2 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#3 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(DateTimeImmutable)#7 (3) {
["date"]=>
string(26) "2026-01-30 13:31:14.004936"
["timezone_type"]=>
int(3)
["timezone"]=>
string(16) "Europe/Amsterdam"
}
Error: why is it not a return TypeError?
Output for 8.4.10
--------------[ TESTCASE ]--------------
string(9) "no-return"
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
string(15) "no-return-value"
Success: a return statement without a value is always valid.
--------------[ TESTCASE ]--------------
string(5) "$this"
Success: throwable: Using $this when not in object context
--------------[ TESTCASE ]--------------
object(ShouldTypeError)#4 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(11) "Const hello"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(3) "abc"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
int(1)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
float(1.23)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
NULL
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
bool(true)
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
bool(false)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(3) {
[0]=>
string(1) "a"
[1]=>
string(1) "b"
[2]=>
string(1) "c"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(4) {
["a"]=>
string(1) "a"
["b"]=>
string(1) "b"
["c"]=>
string(1) "c"
[0]=>
string(4) "Zero"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(5) "never"
Success: throwable: Undefined constant "never"
--------------[ TESTCASE ]--------------
string(4) "void"
Success: throwable: Undefined constant "void"
--------------[ TESTCASE ]--------------
enum(SomeEnum::Spades)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#6 (3) {
["name"]=>
string(22) "{closure:/in/sXXe8:67}"
["file"]=>
string(9) "/in/sXXe8"
["line"]=>
int(67)
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#1 (3) {
["name"]=>
string(22) "{closure:/in/sXXe8:17}"
["file"]=>
string(9) "/in/sXXe8"
["line"]=>
int(17)
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#2 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#3 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(DateTimeImmutable)#7 (3) {
["date"]=>
string(26) "2026-01-30 13:31:14.004539"
["timezone_type"]=>
int(3)
["timezone"]=>
string(16) "Europe/Amsterdam"
}
Error: why is it not a return TypeError?
Output for 8.4.9
--------------[ TESTCASE ]--------------
string(9) "no-return"
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
string(15) "no-return-value"
Success: a return statement without a value is always valid.
--------------[ TESTCASE ]--------------
string(5) "$this"
Success: throwable: Using $this when not in object context
--------------[ TESTCASE ]--------------
object(ShouldTypeError)#4 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(11) "Const hello"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(3) "abc"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
int(1)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
float(1.23)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
NULL
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
bool(true)
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
bool(false)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(3) {
[0]=>
string(1) "a"
[1]=>
string(1) "b"
[2]=>
string(1) "c"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(4) {
["a"]=>
string(1) "a"
["b"]=>
string(1) "b"
["c"]=>
string(1) "c"
[0]=>
string(4) "Zero"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(5) "never"
Success: throwable: Undefined constant "never"
--------------[ TESTCASE ]--------------
string(4) "void"
Success: throwable: Undefined constant "void"
--------------[ TESTCASE ]--------------
enum(SomeEnum::Spades)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#6 (3) {
["name"]=>
string(22) "{closure:/in/sXXe8:67}"
["file"]=>
string(9) "/in/sXXe8"
["line"]=>
int(67)
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#1 (3) {
["name"]=>
string(22) "{closure:/in/sXXe8:17}"
["file"]=>
string(9) "/in/sXXe8"
["line"]=>
int(17)
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#2 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#3 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(DateTimeImmutable)#7 (3) {
["date"]=>
string(26) "2026-01-30 13:31:14.004268"
["timezone_type"]=>
int(3)
["timezone"]=>
string(16) "Europe/Amsterdam"
}
Error: why is it not a return TypeError?
Output for 8.4.8
--------------[ TESTCASE ]--------------
string(9) "no-return"
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
string(15) "no-return-value"
Success: a return statement without a value is always valid.
--------------[ TESTCASE ]--------------
string(5) "$this"
Success: throwable: Using $this when not in object context
--------------[ TESTCASE ]--------------
object(ShouldTypeError)#4 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(11) "Const hello"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(3) "abc"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
int(1)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
float(1.23)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
NULL
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
bool(true)
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
bool(false)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(3) {
[0]=>
string(1) "a"
[1]=>
string(1) "b"
[2]=>
string(1) "c"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(4) {
["a"]=>
string(1) "a"
["b"]=>
string(1) "b"
["c"]=>
string(1) "c"
[0]=>
string(4) "Zero"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(5) "never"
Success: throwable: Undefined constant "never"
--------------[ TESTCASE ]--------------
string(4) "void"
Success: throwable: Undefined constant "void"
--------------[ TESTCASE ]--------------
enum(SomeEnum::Spades)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#6 (3) {
["name"]=>
string(22) "{closure:/in/sXXe8:67}"
["file"]=>
string(9) "/in/sXXe8"
["line"]=>
int(67)
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#1 (3) {
["name"]=>
string(22) "{closure:/in/sXXe8:17}"
["file"]=>
string(9) "/in/sXXe8"
["line"]=>
int(17)
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#2 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#3 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(DateTimeImmutable)#7 (3) {
["date"]=>
string(26) "2026-01-30 13:31:14.010232"
["timezone_type"]=>
int(3)
["timezone"]=>
string(16) "Europe/Amsterdam"
}
Error: why is it not a return TypeError?
Output for 8.4.7
--------------[ TESTCASE ]--------------
string(9) "no-return"
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
string(15) "no-return-value"
Success: a return statement without a value is always valid.
--------------[ TESTCASE ]--------------
string(5) "$this"
Success: throwable: Using $this when not in object context
--------------[ TESTCASE ]--------------
object(ShouldTypeError)#4 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(11) "Const hello"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(3) "abc"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
int(1)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
float(1.23)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
NULL
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
bool(true)
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
bool(false)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(3) {
[0]=>
string(1) "a"
[1]=>
string(1) "b"
[2]=>
string(1) "c"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(4) {
["a"]=>
string(1) "a"
["b"]=>
string(1) "b"
["c"]=>
string(1) "c"
[0]=>
string(4) "Zero"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(5) "never"
Success: throwable: Undefined constant "never"
--------------[ TESTCASE ]--------------
string(4) "void"
Success: throwable: Undefined constant "void"
--------------[ TESTCASE ]--------------
enum(SomeEnum::Spades)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#6 (3) {
["name"]=>
string(22) "{closure:/in/sXXe8:67}"
["file"]=>
string(9) "/in/sXXe8"
["line"]=>
int(67)
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#1 (3) {
["name"]=>
string(22) "{closure:/in/sXXe8:17}"
["file"]=>
string(9) "/in/sXXe8"
["line"]=>
int(17)
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#2 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#3 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(DateTimeImmutable)#7 (3) {
["date"]=>
string(26) "2026-01-30 13:31:14.008031"
["timezone_type"]=>
int(3)
["timezone"]=>
string(16) "Europe/Amsterdam"
}
Error: why is it not a return TypeError?
Output for 8.4.6
--------------[ TESTCASE ]--------------
string(9) "no-return"
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
string(15) "no-return-value"
Success: a return statement without a value is always valid.
--------------[ TESTCASE ]--------------
string(5) "$this"
Success: throwable: Using $this when not in object context
--------------[ TESTCASE ]--------------
object(ShouldTypeError)#4 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(11) "Const hello"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(3) "abc"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
int(1)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
float(1.23)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
NULL
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
bool(true)
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
bool(false)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(3) {
[0]=>
string(1) "a"
[1]=>
string(1) "b"
[2]=>
string(1) "c"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(4) {
["a"]=>
string(1) "a"
["b"]=>
string(1) "b"
["c"]=>
string(1) "c"
[0]=>
string(4) "Zero"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(5) "never"
Success: throwable: Undefined constant "never"
--------------[ TESTCASE ]--------------
string(4) "void"
Success: throwable: Undefined constant "void"
--------------[ TESTCASE ]--------------
enum(SomeEnum::Spades)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#6 (3) {
["name"]=>
string(22) "{closure:/in/sXXe8:67}"
["file"]=>
string(9) "/in/sXXe8"
["line"]=>
int(67)
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#1 (3) {
["name"]=>
string(22) "{closure:/in/sXXe8:17}"
["file"]=>
string(9) "/in/sXXe8"
["line"]=>
int(17)
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#2 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#3 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(DateTimeImmutable)#7 (3) {
["date"]=>
string(26) "2026-01-30 13:31:14.004504"
["timezone_type"]=>
int(3)
["timezone"]=>
string(16) "Europe/Amsterdam"
}
Error: why is it not a return TypeError?
Output for 8.4.5
--------------[ TESTCASE ]--------------
string(9) "no-return"
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
string(15) "no-return-value"
Success: a return statement without a value is always valid.
--------------[ TESTCASE ]--------------
string(5) "$this"
Success: throwable: Using $this when not in object context
--------------[ TESTCASE ]--------------
object(ShouldTypeError)#4 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(11) "Const hello"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(3) "abc"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
int(1)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
float(1.23)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
NULL
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
bool(true)
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
bool(false)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(3) {
[0]=>
string(1) "a"
[1]=>
string(1) "b"
[2]=>
string(1) "c"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(4) {
["a"]=>
string(1) "a"
["b"]=>
string(1) "b"
["c"]=>
string(1) "c"
[0]=>
string(4) "Zero"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(5) "never"
Success: throwable: Undefined constant "never"
--------------[ TESTCASE ]--------------
string(4) "void"
Success: throwable: Undefined constant "void"
--------------[ TESTCASE ]--------------
enum(SomeEnum::Spades)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#6 (3) {
["name"]=>
string(22) "{closure:/in/sXXe8:67}"
["file"]=>
string(9) "/in/sXXe8"
["line"]=>
int(67)
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#1 (3) {
["name"]=>
string(22) "{closure:/in/sXXe8:17}"
["file"]=>
string(9) "/in/sXXe8"
["line"]=>
int(17)
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#2 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#3 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(DateTimeImmutable)#7 (3) {
["date"]=>
string(26) "2026-01-30 13:31:14.004354"
["timezone_type"]=>
int(3)
["timezone"]=>
string(16) "Europe/Amsterdam"
}
Error: why is it not a return TypeError?
Output for 8.4.4
--------------[ TESTCASE ]--------------
string(9) "no-return"
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
string(15) "no-return-value"
Success: a return statement without a value is always valid.
--------------[ TESTCASE ]--------------
string(5) "$this"
Success: throwable: Using $this when not in object context
--------------[ TESTCASE ]--------------
object(ShouldTypeError)#4 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(11) "Const hello"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(3) "abc"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
int(1)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
float(1.23)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
NULL
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
bool(true)
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
bool(false)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(3) {
[0]=>
string(1) "a"
[1]=>
string(1) "b"
[2]=>
string(1) "c"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(4) {
["a"]=>
string(1) "a"
["b"]=>
string(1) "b"
["c"]=>
string(1) "c"
[0]=>
string(4) "Zero"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(5) "never"
Success: throwable: Undefined constant "never"
--------------[ TESTCASE ]--------------
string(4) "void"
Success: throwable: Undefined constant "void"
--------------[ TESTCASE ]--------------
enum(SomeEnum::Spades)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#6 (3) {
["name"]=>
string(22) "{closure:/in/sXXe8:67}"
["file"]=>
string(9) "/in/sXXe8"
["line"]=>
int(67)
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#1 (3) {
["name"]=>
string(22) "{closure:/in/sXXe8:17}"
["file"]=>
string(9) "/in/sXXe8"
["line"]=>
int(17)
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#2 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#3 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(DateTimeImmutable)#7 (3) {
["date"]=>
string(26) "2026-01-30 13:31:14.004517"
["timezone_type"]=>
int(3)
["timezone"]=>
string(16) "Europe/Amsterdam"
}
Error: why is it not a return TypeError?
Output for 8.4.3
--------------[ TESTCASE ]--------------
string(9) "no-return"
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
string(15) "no-return-value"
Success: a return statement without a value is always valid.
--------------[ TESTCASE ]--------------
string(5) "$this"
Success: throwable: Using $this when not in object context
--------------[ TESTCASE ]--------------
object(ShouldTypeError)#4 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(11) "Const hello"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(3) "abc"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
int(1)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
float(1.23)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
NULL
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
bool(true)
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
bool(false)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(3) {
[0]=>
string(1) "a"
[1]=>
string(1) "b"
[2]=>
string(1) "c"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(4) {
["a"]=>
string(1) "a"
["b"]=>
string(1) "b"
["c"]=>
string(1) "c"
[0]=>
string(4) "Zero"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(5) "never"
Success: throwable: Undefined constant "never"
--------------[ TESTCASE ]--------------
string(4) "void"
Success: throwable: Undefined constant "void"
--------------[ TESTCASE ]--------------
enum(SomeEnum::Spades)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#6 (3) {
["name"]=>
string(22) "{closure:/in/sXXe8:67}"
["file"]=>
string(9) "/in/sXXe8"
["line"]=>
int(67)
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#1 (3) {
["name"]=>
string(22) "{closure:/in/sXXe8:17}"
["file"]=>
string(9) "/in/sXXe8"
["line"]=>
int(17)
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#2 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#3 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(DateTimeImmutable)#7 (3) {
["date"]=>
string(26) "2026-01-30 13:31:14.004540"
["timezone_type"]=>
int(3)
["timezone"]=>
string(16) "Europe/Amsterdam"
}
Error: why is it not a return TypeError?
Output for 8.4.2
--------------[ TESTCASE ]--------------
string(9) "no-return"
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
string(15) "no-return-value"
Success: a return statement without a value is always valid.
--------------[ TESTCASE ]--------------
string(5) "$this"
Success: throwable: Using $this when not in object context
--------------[ TESTCASE ]--------------
object(ShouldTypeError)#4 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(11) "Const hello"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(3) "abc"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
int(1)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
float(1.23)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
NULL
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
bool(true)
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
bool(false)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(3) {
[0]=>
string(1) "a"
[1]=>
string(1) "b"
[2]=>
string(1) "c"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(4) {
["a"]=>
string(1) "a"
["b"]=>
string(1) "b"
["c"]=>
string(1) "c"
[0]=>
string(4) "Zero"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(5) "never"
Success: throwable: Undefined constant "never"
--------------[ TESTCASE ]--------------
string(4) "void"
Success: throwable: Undefined constant "void"
--------------[ TESTCASE ]--------------
enum(SomeEnum::Spades)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#6 (3) {
["name"]=>
string(22) "{closure:/in/sXXe8:67}"
["file"]=>
string(9) "/in/sXXe8"
["line"]=>
int(67)
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#1 (3) {
["name"]=>
string(22) "{closure:/in/sXXe8:17}"
["file"]=>
string(9) "/in/sXXe8"
["line"]=>
int(17)
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#2 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#3 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(DateTimeImmutable)#7 (3) {
["date"]=>
string(26) "2026-01-30 13:31:14.010271"
["timezone_type"]=>
int(3)
["timezone"]=>
string(16) "Europe/Amsterdam"
}
Error: why is it not a return TypeError?
Output for 8.4.1
--------------[ TESTCASE ]--------------
string(9) "no-return"
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
string(15) "no-return-value"
Success: a return statement without a value is always valid.
--------------[ TESTCASE ]--------------
string(5) "$this"
Success: throwable: Using $this when not in object context
--------------[ TESTCASE ]--------------
object(ShouldTypeError)#4 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(11) "Const hello"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(3) "abc"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
int(1)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
float(1.23)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
NULL
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
bool(true)
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
bool(false)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(3) {
[0]=>
string(1) "a"
[1]=>
string(1) "b"
[2]=>
string(1) "c"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(4) {
["a"]=>
string(1) "a"
["b"]=>
string(1) "b"
["c"]=>
string(1) "c"
[0]=>
string(4) "Zero"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(5) "never"
Success: throwable: Undefined constant "never"
--------------[ TESTCASE ]--------------
string(4) "void"
Success: throwable: Undefined constant "void"
--------------[ TESTCASE ]--------------
enum(SomeEnum::Spades)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#6 (3) {
["name"]=>
string(22) "{closure:/in/sXXe8:67}"
["file"]=>
string(9) "/in/sXXe8"
["line"]=>
int(67)
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#1 (3) {
["name"]=>
string(22) "{closure:/in/sXXe8:17}"
["file"]=>
string(9) "/in/sXXe8"
["line"]=>
int(17)
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#2 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#3 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(DateTimeImmutable)#7 (3) {
["date"]=>
string(26) "2026-01-30 13:31:14.011079"
["timezone_type"]=>
int(3)
["timezone"]=>
string(16) "Europe/Amsterdam"
}
Error: why is it not a return TypeError?
Output for 8.3.37
--------------[ TESTCASE ]--------------
string(9) "no-return"
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
string(15) "no-return-value"
Success: a return statement without a value is always valid.
--------------[ TESTCASE ]--------------
string(5) "$this"
Success: throwable: Using $this when not in object context
--------------[ TESTCASE ]--------------
object(ShouldTypeError)#4 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(11) "Const hello"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(3) "abc"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
int(1)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
float(1.23)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
NULL
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
bool(true)
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
bool(false)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(3) {
[0]=>
string(1) "a"
[1]=>
string(1) "b"
[2]=>
string(1) "c"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(4) {
["a"]=>
string(1) "a"
["b"]=>
string(1) "b"
["c"]=>
string(1) "c"
[0]=>
string(4) "Zero"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(5) "never"
Success: throwable: Undefined constant "never"
--------------[ TESTCASE ]--------------
string(4) "void"
Success: throwable: Undefined constant "void"
--------------[ TESTCASE ]--------------
enum(SomeEnum::Spades)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#6 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#1 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#2 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#3 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(DateTimeImmutable)#7 (3) {
["date"]=>
string(26) "2026-01-30 13:31:14.011119"
["timezone_type"]=>
int(3)
["timezone"]=>
string(16) "Europe/Amsterdam"
}
Error: why is it not a return TypeError?
Output for 8.3.36
--------------[ TESTCASE ]--------------
string(9) "no-return"
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
string(15) "no-return-value"
Success: a return statement without a value is always valid.
--------------[ TESTCASE ]--------------
string(5) "$this"
Success: throwable: Using $this when not in object context
--------------[ TESTCASE ]--------------
object(ShouldTypeError)#4 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(11) "Const hello"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(3) "abc"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
int(1)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
float(1.23)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
NULL
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
bool(true)
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
bool(false)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(3) {
[0]=>
string(1) "a"
[1]=>
string(1) "b"
[2]=>
string(1) "c"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(4) {
["a"]=>
string(1) "a"
["b"]=>
string(1) "b"
["c"]=>
string(1) "c"
[0]=>
string(4) "Zero"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(5) "never"
Success: throwable: Undefined constant "never"
--------------[ TESTCASE ]--------------
string(4) "void"
Success: throwable: Undefined constant "void"
--------------[ TESTCASE ]--------------
enum(SomeEnum::Spades)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#6 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#1 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#2 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#3 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(DateTimeImmutable)#7 (3) {
["date"]=>
string(26) "2026-01-30 13:31:14.011198"
["timezone_type"]=>
int(3)
["timezone"]=>
string(16) "Europe/Amsterdam"
}
Error: why is it not a return TypeError?
Output for 8.3.35
--------------[ TESTCASE ]--------------
string(9) "no-return"
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
string(15) "no-return-value"
Success: a return statement without a value is always valid.
--------------[ TESTCASE ]--------------
string(5) "$this"
Success: throwable: Using $this when not in object context
--------------[ TESTCASE ]--------------
object(ShouldTypeError)#4 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(11) "Const hello"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(3) "abc"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
int(1)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
float(1.23)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
NULL
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
bool(true)
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
bool(false)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(3) {
[0]=>
string(1) "a"
[1]=>
string(1) "b"
[2]=>
string(1) "c"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(4) {
["a"]=>
string(1) "a"
["b"]=>
string(1) "b"
["c"]=>
string(1) "c"
[0]=>
string(4) "Zero"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(5) "never"
Success: throwable: Undefined constant "never"
--------------[ TESTCASE ]--------------
string(4) "void"
Success: throwable: Undefined constant "void"
--------------[ TESTCASE ]--------------
enum(SomeEnum::Spades)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#6 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#1 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#2 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#3 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(DateTimeImmutable)#7 (3) {
["date"]=>
string(26) "2026-01-30 13:31:14.010863"
["timezone_type"]=>
int(3)
["timezone"]=>
string(16) "Europe/Amsterdam"
}
Error: why is it not a return TypeError?
Output for 8.3.33
--------------[ TESTCASE ]--------------
string(9) "no-return"
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
string(15) "no-return-value"
Success: a return statement without a value is always valid.
--------------[ TESTCASE ]--------------
string(5) "$this"
Success: throwable: Using $this when not in object context
--------------[ TESTCASE ]--------------
object(ShouldTypeError)#4 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(11) "Const hello"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(3) "abc"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
int(1)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
float(1.23)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
NULL
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
bool(true)
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
bool(false)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(3) {
[0]=>
string(1) "a"
[1]=>
string(1) "b"
[2]=>
string(1) "c"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(4) {
["a"]=>
string(1) "a"
["b"]=>
string(1) "b"
["c"]=>
string(1) "c"
[0]=>
string(4) "Zero"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(5) "never"
Success: throwable: Undefined constant "never"
--------------[ TESTCASE ]--------------
string(4) "void"
Success: throwable: Undefined constant "void"
--------------[ TESTCASE ]--------------
enum(SomeEnum::Spades)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#6 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#1 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#2 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#3 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(DateTimeImmutable)#7 (3) {
["date"]=>
string(26) "2026-01-30 13:31:14.011171"
["timezone_type"]=>
int(3)
["timezone"]=>
string(16) "Europe/Amsterdam"
}
Error: why is it not a return TypeError?
Output for 8.3.32
--------------[ TESTCASE ]--------------
string(9) "no-return"
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
string(15) "no-return-value"
Success: a return statement without a value is always valid.
--------------[ TESTCASE ]--------------
string(5) "$this"
Success: throwable: Using $this when not in object context
--------------[ TESTCASE ]--------------
object(ShouldTypeError)#4 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(11) "Const hello"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(3) "abc"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
int(1)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
float(1.23)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
NULL
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
bool(true)
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
bool(false)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(3) {
[0]=>
string(1) "a"
[1]=>
string(1) "b"
[2]=>
string(1) "c"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(4) {
["a"]=>
string(1) "a"
["b"]=>
string(1) "b"
["c"]=>
string(1) "c"
[0]=>
string(4) "Zero"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(5) "never"
Success: throwable: Undefined constant "never"
--------------[ TESTCASE ]--------------
string(4) "void"
Success: throwable: Undefined constant "void"
--------------[ TESTCASE ]--------------
enum(SomeEnum::Spades)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#6 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#1 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#2 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#3 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(DateTimeImmutable)#7 (3) {
["date"]=>
string(26) "2026-01-30 13:31:14.012091"
["timezone_type"]=>
int(3)
["timezone"]=>
string(16) "Europe/Amsterdam"
}
Error: why is it not a return TypeError?
Output for 8.3.31
--------------[ TESTCASE ]--------------
string(9) "no-return"
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
string(15) "no-return-value"
Success: a return statement without a value is always valid.
--------------[ TESTCASE ]--------------
string(5) "$this"
Success: throwable: Using $this when not in object context
--------------[ TESTCASE ]--------------
object(ShouldTypeError)#4 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(11) "Const hello"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(3) "abc"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
int(1)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
float(1.23)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
NULL
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
bool(true)
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
bool(false)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(3) {
[0]=>
string(1) "a"
[1]=>
string(1) "b"
[2]=>
string(1) "c"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(4) {
["a"]=>
string(1) "a"
["b"]=>
string(1) "b"
["c"]=>
string(1) "c"
[0]=>
string(4) "Zero"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(5) "never"
Success: throwable: Undefined constant "never"
--------------[ TESTCASE ]--------------
string(4) "void"
Success: throwable: Undefined constant "void"
--------------[ TESTCASE ]--------------
enum(SomeEnum::Spades)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#6 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#1 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#2 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#3 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(DateTimeImmutable)#7 (3) {
["date"]=>
string(26) "2026-01-30 13:31:14.010990"
["timezone_type"]=>
int(3)
["timezone"]=>
string(16) "Europe/Amsterdam"
}
Error: why is it not a return TypeError?
Output for 8.3.30
--------------[ TESTCASE ]--------------
string(9) "no-return"
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
string(15) "no-return-value"
Success: a return statement without a value is always valid.
--------------[ TESTCASE ]--------------
string(5) "$this"
Success: throwable: Using $this when not in object context
--------------[ TESTCASE ]--------------
object(ShouldTypeError)#4 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(11) "Const hello"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(3) "abc"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
int(1)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
float(1.23)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
NULL
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
bool(true)
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
bool(false)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(3) {
[0]=>
string(1) "a"
[1]=>
string(1) "b"
[2]=>
string(1) "c"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(4) {
["a"]=>
string(1) "a"
["b"]=>
string(1) "b"
["c"]=>
string(1) "c"
[0]=>
string(4) "Zero"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(5) "never"
Success: throwable: Undefined constant "never"
--------------[ TESTCASE ]--------------
string(4) "void"
Success: throwable: Undefined constant "void"
--------------[ TESTCASE ]--------------
enum(SomeEnum::Spades)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#6 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#1 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#2 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#3 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(DateTimeImmutable)#7 (3) {
["date"]=>
string(26) "2026-01-30 13:31:14.010993"
["timezone_type"]=>
int(3)
["timezone"]=>
string(16) "Europe/Amsterdam"
}
Error: why is it not a return TypeError?
Output for 8.3.29
--------------[ TESTCASE ]--------------
string(9) "no-return"
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
string(15) "no-return-value"
Success: a return statement without a value is always valid.
--------------[ TESTCASE ]--------------
string(5) "$this"
Success: throwable: Using $this when not in object context
--------------[ TESTCASE ]--------------
object(ShouldTypeError)#4 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(11) "Const hello"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(3) "abc"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
int(1)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
float(1.23)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
NULL
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
bool(true)
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
bool(false)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(3) {
[0]=>
string(1) "a"
[1]=>
string(1) "b"
[2]=>
string(1) "c"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(4) {
["a"]=>
string(1) "a"
["b"]=>
string(1) "b"
["c"]=>
string(1) "c"
[0]=>
string(4) "Zero"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(5) "never"
Success: throwable: Undefined constant "never"
--------------[ TESTCASE ]--------------
string(4) "void"
Success: throwable: Undefined constant "void"
--------------[ TESTCASE ]--------------
enum(SomeEnum::Spades)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#6 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#1 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#2 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#3 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(DateTimeImmutable)#7 (3) {
["date"]=>
string(26) "2026-01-30 13:31:14.011011"
["timezone_type"]=>
int(3)
["timezone"]=>
string(16) "Europe/Amsterdam"
}
Error: why is it not a return TypeError?
Output for 8.3.28
--------------[ TESTCASE ]--------------
string(9) "no-return"
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
string(15) "no-return-value"
Success: a return statement without a value is always valid.
--------------[ TESTCASE ]--------------
string(5) "$this"
Success: throwable: Using $this when not in object context
--------------[ TESTCASE ]--------------
object(ShouldTypeError)#4 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(11) "Const hello"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(3) "abc"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
int(1)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
float(1.23)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
NULL
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
bool(true)
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
bool(false)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(3) {
[0]=>
string(1) "a"
[1]=>
string(1) "b"
[2]=>
string(1) "c"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(4) {
["a"]=>
string(1) "a"
["b"]=>
string(1) "b"
["c"]=>
string(1) "c"
[0]=>
string(4) "Zero"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(5) "never"
Success: throwable: Undefined constant "never"
--------------[ TESTCASE ]--------------
string(4) "void"
Success: throwable: Undefined constant "void"
--------------[ TESTCASE ]--------------
enum(SomeEnum::Spades)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#6 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#1 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#2 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#3 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(DateTimeImmutable)#7 (3) {
["date"]=>
string(26) "2026-01-30 13:31:14.011278"
["timezone_type"]=>
int(3)
["timezone"]=>
string(16) "Europe/Amsterdam"
}
Error: why is it not a return TypeError?
Output for 8.3.27
--------------[ TESTCASE ]--------------
string(9) "no-return"
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
string(15) "no-return-value"
Success: a return statement without a value is always valid.
--------------[ TESTCASE ]--------------
string(5) "$this"
Success: throwable: Using $this when not in object context
--------------[ TESTCASE ]--------------
object(ShouldTypeError)#4 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(11) "Const hello"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(3) "abc"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
int(1)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
float(1.23)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
NULL
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
bool(true)
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
bool(false)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(3) {
[0]=>
string(1) "a"
[1]=>
string(1) "b"
[2]=>
string(1) "c"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(4) {
["a"]=>
string(1) "a"
["b"]=>
string(1) "b"
["c"]=>
string(1) "c"
[0]=>
string(4) "Zero"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(5) "never"
Success: throwable: Undefined constant "never"
--------------[ TESTCASE ]--------------
string(4) "void"
Success: throwable: Undefined constant "void"
--------------[ TESTCASE ]--------------
enum(SomeEnum::Spades)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#6 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#1 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#2 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#3 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(DateTimeImmutable)#7 (3) {
["date"]=>
string(26) "2026-01-30 13:31:14.009506"
["timezone_type"]=>
int(3)
["timezone"]=>
string(16) "Europe/Amsterdam"
}
Error: why is it not a return TypeError?
Output for 8.3.26
--------------[ TESTCASE ]--------------
string(9) "no-return"
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
string(15) "no-return-value"
Success: a return statement without a value is always valid.
--------------[ TESTCASE ]--------------
string(5) "$this"
Success: throwable: Using $this when not in object context
--------------[ TESTCASE ]--------------
object(ShouldTypeError)#4 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(11) "Const hello"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(3) "abc"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
int(1)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
float(1.23)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
NULL
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
bool(true)
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
bool(false)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(3) {
[0]=>
string(1) "a"
[1]=>
string(1) "b"
[2]=>
string(1) "c"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(4) {
["a"]=>
string(1) "a"
["b"]=>
string(1) "b"
["c"]=>
string(1) "c"
[0]=>
string(4) "Zero"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(5) "never"
Success: throwable: Undefined constant "never"
--------------[ TESTCASE ]--------------
string(4) "void"
Success: throwable: Undefined constant "void"
--------------[ TESTCASE ]--------------
enum(SomeEnum::Spades)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#6 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#1 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#2 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#3 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(DateTimeImmutable)#7 (3) {
["date"]=>
string(26) "2026-01-30 13:31:14.009333"
["timezone_type"]=>
int(3)
["timezone"]=>
string(16) "Europe/Amsterdam"
}
Error: why is it not a return TypeError?
Output for 8.3.25
--------------[ TESTCASE ]--------------
string(9) "no-return"
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
string(15) "no-return-value"
Success: a return statement without a value is always valid.
--------------[ TESTCASE ]--------------
string(5) "$this"
Success: throwable: Using $this when not in object context
--------------[ TESTCASE ]--------------
object(ShouldTypeError)#4 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(11) "Const hello"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(3) "abc"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
int(1)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
float(1.23)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
NULL
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
bool(true)
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
bool(false)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(3) {
[0]=>
string(1) "a"
[1]=>
string(1) "b"
[2]=>
string(1) "c"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(4) {
["a"]=>
string(1) "a"
["b"]=>
string(1) "b"
["c"]=>
string(1) "c"
[0]=>
string(4) "Zero"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(5) "never"
Success: throwable: Undefined constant "never"
--------------[ TESTCASE ]--------------
string(4) "void"
Success: throwable: Undefined constant "void"
--------------[ TESTCASE ]--------------
enum(SomeEnum::Spades)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#6 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#1 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#2 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#3 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(DateTimeImmutable)#7 (3) {
["date"]=>
string(26) "2026-01-30 13:31:14.010065"
["timezone_type"]=>
int(3)
["timezone"]=>
string(16) "Europe/Amsterdam"
}
Error: why is it not a return TypeError?
Output for 8.3.24
--------------[ TESTCASE ]--------------
string(9) "no-return"
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
string(15) "no-return-value"
Success: a return statement without a value is always valid.
--------------[ TESTCASE ]--------------
string(5) "$this"
Success: throwable: Using $this when not in object context
--------------[ TESTCASE ]--------------
object(ShouldTypeError)#4 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(11) "Const hello"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(3) "abc"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
int(1)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
float(1.23)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
NULL
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
bool(true)
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
bool(false)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(3) {
[0]=>
string(1) "a"
[1]=>
string(1) "b"
[2]=>
string(1) "c"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(4) {
["a"]=>
string(1) "a"
["b"]=>
string(1) "b"
["c"]=>
string(1) "c"
[0]=>
string(4) "Zero"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(5) "never"
Success: throwable: Undefined constant "never"
--------------[ TESTCASE ]--------------
string(4) "void"
Success: throwable: Undefined constant "void"
--------------[ TESTCASE ]--------------
enum(SomeEnum::Spades)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#6 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#1 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#2 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#3 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(DateTimeImmutable)#7 (3) {
["date"]=>
string(26) "2026-01-30 13:31:14.009587"
["timezone_type"]=>
int(3)
["timezone"]=>
string(16) "Europe/Amsterdam"
}
Error: why is it not a return TypeError?
Output for 8.3.23, 8.2.1
--------------[ TESTCASE ]--------------
string(9) "no-return"
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
string(15) "no-return-value"
Success: a return statement without a value is always valid.
--------------[ TESTCASE ]--------------
string(5) "$this"
Success: throwable: Using $this when not in object context
--------------[ TESTCASE ]--------------
object(ShouldTypeError)#4 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(11) "Const hello"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(3) "abc"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
int(1)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
float(1.23)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
NULL
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
bool(true)
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
bool(false)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(3) {
[0]=>
string(1) "a"
[1]=>
string(1) "b"
[2]=>
string(1) "c"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(4) {
["a"]=>
string(1) "a"
["b"]=>
string(1) "b"
["c"]=>
string(1) "c"
[0]=>
string(4) "Zero"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(5) "never"
Success: throwable: Undefined constant "never"
--------------[ TESTCASE ]--------------
string(4) "void"
Success: throwable: Undefined constant "void"
--------------[ TESTCASE ]--------------
enum(SomeEnum::Spades)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#6 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#1 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#2 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#3 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(DateTimeImmutable)#7 (3) {
["date"]=>
string(26) "2026-01-30 13:31:14.009409"
["timezone_type"]=>
int(3)
["timezone"]=>
string(16) "Europe/Amsterdam"
}
Error: why is it not a return TypeError?
Output for 8.3.22
--------------[ TESTCASE ]--------------
string(9) "no-return"
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
string(15) "no-return-value"
Success: a return statement without a value is always valid.
--------------[ TESTCASE ]--------------
string(5) "$this"
Success: throwable: Using $this when not in object context
--------------[ TESTCASE ]--------------
object(ShouldTypeError)#4 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(11) "Const hello"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(3) "abc"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
int(1)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
float(1.23)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
NULL
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
bool(true)
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
bool(false)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(3) {
[0]=>
string(1) "a"
[1]=>
string(1) "b"
[2]=>
string(1) "c"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(4) {
["a"]=>
string(1) "a"
["b"]=>
string(1) "b"
["c"]=>
string(1) "c"
[0]=>
string(4) "Zero"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(5) "never"
Success: throwable: Undefined constant "never"
--------------[ TESTCASE ]--------------
string(4) "void"
Success: throwable: Undefined constant "void"
--------------[ TESTCASE ]--------------
enum(SomeEnum::Spades)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#6 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#1 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#2 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#3 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(DateTimeImmutable)#7 (3) {
["date"]=>
string(26) "2026-01-30 13:31:14.010003"
["timezone_type"]=>
int(3)
["timezone"]=>
string(16) "Europe/Amsterdam"
}
Error: why is it not a return TypeError?
Output for 8.3.21
--------------[ TESTCASE ]--------------
string(9) "no-return"
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
string(15) "no-return-value"
Success: a return statement without a value is always valid.
--------------[ TESTCASE ]--------------
string(5) "$this"
Success: throwable: Using $this when not in object context
--------------[ TESTCASE ]--------------
object(ShouldTypeError)#4 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(11) "Const hello"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(3) "abc"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
int(1)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
float(1.23)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
NULL
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
bool(true)
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
bool(false)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(3) {
[0]=>
string(1) "a"
[1]=>
string(1) "b"
[2]=>
string(1) "c"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(4) {
["a"]=>
string(1) "a"
["b"]=>
string(1) "b"
["c"]=>
string(1) "c"
[0]=>
string(4) "Zero"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(5) "never"
Success: throwable: Undefined constant "never"
--------------[ TESTCASE ]--------------
string(4) "void"
Success: throwable: Undefined constant "void"
--------------[ TESTCASE ]--------------
enum(SomeEnum::Spades)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#6 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#1 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#2 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#3 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(DateTimeImmutable)#7 (3) {
["date"]=>
string(26) "2026-01-30 13:31:14.009832"
["timezone_type"]=>
int(3)
["timezone"]=>
string(16) "Europe/Amsterdam"
}
Error: why is it not a return TypeError?
Output for 8.3.20
--------------[ TESTCASE ]--------------
string(9) "no-return"
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
string(15) "no-return-value"
Success: a return statement without a value is always valid.
--------------[ TESTCASE ]--------------
string(5) "$this"
Success: throwable: Using $this when not in object context
--------------[ TESTCASE ]--------------
object(ShouldTypeError)#4 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(11) "Const hello"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(3) "abc"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
int(1)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
float(1.23)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
NULL
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
bool(true)
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
bool(false)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(3) {
[0]=>
string(1) "a"
[1]=>
string(1) "b"
[2]=>
string(1) "c"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(4) {
["a"]=>
string(1) "a"
["b"]=>
string(1) "b"
["c"]=>
string(1) "c"
[0]=>
string(4) "Zero"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(5) "never"
Success: throwable: Undefined constant "never"
--------------[ TESTCASE ]--------------
string(4) "void"
Success: throwable: Undefined constant "void"
--------------[ TESTCASE ]--------------
enum(SomeEnum::Spades)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#6 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#1 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#2 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#3 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(DateTimeImmutable)#7 (3) {
["date"]=>
string(26) "2026-01-30 13:31:14.009489"
["timezone_type"]=>
int(3)
["timezone"]=>
string(16) "Europe/Amsterdam"
}
Error: why is it not a return TypeError?
Output for 8.3.19
--------------[ TESTCASE ]--------------
string(9) "no-return"
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
string(15) "no-return-value"
Success: a return statement without a value is always valid.
--------------[ TESTCASE ]--------------
string(5) "$this"
Success: throwable: Using $this when not in object context
--------------[ TESTCASE ]--------------
object(ShouldTypeError)#4 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(11) "Const hello"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(3) "abc"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
int(1)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
float(1.23)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
NULL
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
bool(true)
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
bool(false)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(3) {
[0]=>
string(1) "a"
[1]=>
string(1) "b"
[2]=>
string(1) "c"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(4) {
["a"]=>
string(1) "a"
["b"]=>
string(1) "b"
["c"]=>
string(1) "c"
[0]=>
string(4) "Zero"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(5) "never"
Success: throwable: Undefined constant "never"
--------------[ TESTCASE ]--------------
string(4) "void"
Success: throwable: Undefined constant "void"
--------------[ TESTCASE ]--------------
enum(SomeEnum::Spades)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#6 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#1 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#2 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#3 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(DateTimeImmutable)#7 (3) {
["date"]=>
string(26) "2026-01-30 13:31:14.009277"
["timezone_type"]=>
int(3)
["timezone"]=>
string(16) "Europe/Amsterdam"
}
Error: why is it not a return TypeError?
Output for 8.3.18
--------------[ TESTCASE ]--------------
string(9) "no-return"
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
string(15) "no-return-value"
Success: a return statement without a value is always valid.
--------------[ TESTCASE ]--------------
string(5) "$this"
Success: throwable: Using $this when not in object context
--------------[ TESTCASE ]--------------
object(ShouldTypeError)#4 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(11) "Const hello"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(3) "abc"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
int(1)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
float(1.23)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
NULL
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
bool(true)
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
bool(false)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(3) {
[0]=>
string(1) "a"
[1]=>
string(1) "b"
[2]=>
string(1) "c"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(4) {
["a"]=>
string(1) "a"
["b"]=>
string(1) "b"
["c"]=>
string(1) "c"
[0]=>
string(4) "Zero"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(5) "never"
Success: throwable: Undefined constant "never"
--------------[ TESTCASE ]--------------
string(4) "void"
Success: throwable: Undefined constant "void"
--------------[ TESTCASE ]--------------
enum(SomeEnum::Spades)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#6 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#1 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#2 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#3 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(DateTimeImmutable)#7 (3) {
["date"]=>
string(26) "2026-01-30 13:31:14.009435"
["timezone_type"]=>
int(3)
["timezone"]=>
string(16) "Europe/Amsterdam"
}
Error: why is it not a return TypeError?
Output for 8.3.17
--------------[ TESTCASE ]--------------
string(9) "no-return"
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
string(15) "no-return-value"
Success: a return statement without a value is always valid.
--------------[ TESTCASE ]--------------
string(5) "$this"
Success: throwable: Using $this when not in object context
--------------[ TESTCASE ]--------------
object(ShouldTypeError)#4 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(11) "Const hello"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(3) "abc"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
int(1)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
float(1.23)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
NULL
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
bool(true)
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
bool(false)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(3) {
[0]=>
string(1) "a"
[1]=>
string(1) "b"
[2]=>
string(1) "c"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(4) {
["a"]=>
string(1) "a"
["b"]=>
string(1) "b"
["c"]=>
string(1) "c"
[0]=>
string(4) "Zero"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(5) "never"
Success: throwable: Undefined constant "never"
--------------[ TESTCASE ]--------------
string(4) "void"
Success: throwable: Undefined constant "void"
--------------[ TESTCASE ]--------------
enum(SomeEnum::Spades)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#6 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#1 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#2 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#3 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(DateTimeImmutable)#7 (3) {
["date"]=>
string(26) "2026-01-30 13:31:14.009415"
["timezone_type"]=>
int(3)
["timezone"]=>
string(16) "Europe/Amsterdam"
}
Error: why is it not a return TypeError?
Output for 8.3.16
--------------[ TESTCASE ]--------------
string(9) "no-return"
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
string(15) "no-return-value"
Success: a return statement without a value is always valid.
--------------[ TESTCASE ]--------------
string(5) "$this"
Success: throwable: Using $this when not in object context
--------------[ TESTCASE ]--------------
object(ShouldTypeError)#4 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(11) "Const hello"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(3) "abc"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
int(1)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
float(1.23)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
NULL
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
bool(true)
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
bool(false)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(3) {
[0]=>
string(1) "a"
[1]=>
string(1) "b"
[2]=>
string(1) "c"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(4) {
["a"]=>
string(1) "a"
["b"]=>
string(1) "b"
["c"]=>
string(1) "c"
[0]=>
string(4) "Zero"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(5) "never"
Success: throwable: Undefined constant "never"
--------------[ TESTCASE ]--------------
string(4) "void"
Success: throwable: Undefined constant "void"
--------------[ TESTCASE ]--------------
enum(SomeEnum::Spades)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#6 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#1 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#2 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#3 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(DateTimeImmutable)#7 (3) {
["date"]=>
string(26) "2026-01-30 13:31:14.009239"
["timezone_type"]=>
int(3)
["timezone"]=>
string(16) "Europe/Amsterdam"
}
Error: why is it not a return TypeError?
Output for 8.3.15
--------------[ TESTCASE ]--------------
string(9) "no-return"
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
string(15) "no-return-value"
Success: a return statement without a value is always valid.
--------------[ TESTCASE ]--------------
string(5) "$this"
Success: throwable: Using $this when not in object context
--------------[ TESTCASE ]--------------
object(ShouldTypeError)#4 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(11) "Const hello"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(3) "abc"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
int(1)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
float(1.23)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
NULL
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
bool(true)
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
bool(false)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(3) {
[0]=>
string(1) "a"
[1]=>
string(1) "b"
[2]=>
string(1) "c"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(4) {
["a"]=>
string(1) "a"
["b"]=>
string(1) "b"
["c"]=>
string(1) "c"
[0]=>
string(4) "Zero"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(5) "never"
Success: throwable: Undefined constant "never"
--------------[ TESTCASE ]--------------
string(4) "void"
Success: throwable: Undefined constant "void"
--------------[ TESTCASE ]--------------
enum(SomeEnum::Spades)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#6 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#1 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#2 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#3 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(DateTimeImmutable)#7 (3) {
["date"]=>
string(26) "2026-01-30 13:31:14.009231"
["timezone_type"]=>
int(3)
["timezone"]=>
string(16) "Europe/Amsterdam"
}
Error: why is it not a return TypeError?
Output for 8.3.14
--------------[ TESTCASE ]--------------
string(9) "no-return"
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
string(15) "no-return-value"
Success: a return statement without a value is always valid.
--------------[ TESTCASE ]--------------
string(5) "$this"
Success: throwable: Using $this when not in object context
--------------[ TESTCASE ]--------------
object(ShouldTypeError)#4 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(11) "Const hello"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(3) "abc"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
int(1)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
float(1.23)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
NULL
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
bool(true)
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
bool(false)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(3) {
[0]=>
string(1) "a"
[1]=>
string(1) "b"
[2]=>
string(1) "c"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(4) {
["a"]=>
string(1) "a"
["b"]=>
string(1) "b"
["c"]=>
string(1) "c"
[0]=>
string(4) "Zero"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(5) "never"
Success: throwable: Undefined constant "never"
--------------[ TESTCASE ]--------------
string(4) "void"
Success: throwable: Undefined constant "void"
--------------[ TESTCASE ]--------------
enum(SomeEnum::Spades)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#6 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#1 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#2 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#3 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(DateTimeImmutable)#7 (3) {
["date"]=>
string(26) "2026-01-30 13:31:14.009268"
["timezone_type"]=>
int(3)
["timezone"]=>
string(16) "Europe/Amsterdam"
}
Error: why is it not a return TypeError?
Output for 8.3.13
--------------[ TESTCASE ]--------------
string(9) "no-return"
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
string(15) "no-return-value"
Success: a return statement without a value is always valid.
--------------[ TESTCASE ]--------------
string(5) "$this"
Success: throwable: Using $this when not in object context
--------------[ TESTCASE ]--------------
object(ShouldTypeError)#4 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(11) "Const hello"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(3) "abc"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
int(1)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
float(1.23)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
NULL
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
bool(true)
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
bool(false)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(3) {
[0]=>
string(1) "a"
[1]=>
string(1) "b"
[2]=>
string(1) "c"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(4) {
["a"]=>
string(1) "a"
["b"]=>
string(1) "b"
["c"]=>
string(1) "c"
[0]=>
string(4) "Zero"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(5) "never"
Success: throwable: Undefined constant "never"
--------------[ TESTCASE ]--------------
string(4) "void"
Success: throwable: Undefined constant "void"
--------------[ TESTCASE ]--------------
enum(SomeEnum::Spades)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#6 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#1 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#2 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#3 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(DateTimeImmutable)#7 (3) {
["date"]=>
string(26) "2026-01-30 13:31:14.009502"
["timezone_type"]=>
int(3)
["timezone"]=>
string(16) "Europe/Amsterdam"
}
Error: why is it not a return TypeError?
Output for 8.3.12
--------------[ TESTCASE ]--------------
string(9) "no-return"
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
string(15) "no-return-value"
Success: a return statement without a value is always valid.
--------------[ TESTCASE ]--------------
string(5) "$this"
Success: throwable: Using $this when not in object context
--------------[ TESTCASE ]--------------
object(ShouldTypeError)#4 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(11) "Const hello"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(3) "abc"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
int(1)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
float(1.23)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
NULL
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
bool(true)
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
bool(false)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(3) {
[0]=>
string(1) "a"
[1]=>
string(1) "b"
[2]=>
string(1) "c"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(4) {
["a"]=>
string(1) "a"
["b"]=>
string(1) "b"
["c"]=>
string(1) "c"
[0]=>
string(4) "Zero"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(5) "never"
Success: throwable: Undefined constant "never"
--------------[ TESTCASE ]--------------
string(4) "void"
Success: throwable: Undefined constant "void"
--------------[ TESTCASE ]--------------
enum(SomeEnum::Spades)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#6 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#1 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#2 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#3 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(DateTimeImmutable)#7 (3) {
["date"]=>
string(26) "2026-01-30 13:31:14.009384"
["timezone_type"]=>
int(3)
["timezone"]=>
string(16) "Europe/Amsterdam"
}
Error: why is it not a return TypeError?
Output for 8.3.11
--------------[ TESTCASE ]--------------
string(9) "no-return"
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
string(15) "no-return-value"
Success: a return statement without a value is always valid.
--------------[ TESTCASE ]--------------
string(5) "$this"
Success: throwable: Using $this when not in object context
--------------[ TESTCASE ]--------------
object(ShouldTypeError)#4 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(11) "Const hello"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(3) "abc"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
int(1)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
float(1.23)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
NULL
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
bool(true)
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
bool(false)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(3) {
[0]=>
string(1) "a"
[1]=>
string(1) "b"
[2]=>
string(1) "c"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(4) {
["a"]=>
string(1) "a"
["b"]=>
string(1) "b"
["c"]=>
string(1) "c"
[0]=>
string(4) "Zero"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(5) "never"
Success: throwable: Undefined constant "never"
--------------[ TESTCASE ]--------------
string(4) "void"
Success: throwable: Undefined constant "void"
--------------[ TESTCASE ]--------------
enum(SomeEnum::Spades)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#6 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#1 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#2 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#3 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(DateTimeImmutable)#7 (3) {
["date"]=>
string(26) "2026-01-30 13:31:14.009185"
["timezone_type"]=>
int(3)
["timezone"]=>
string(16) "Europe/Amsterdam"
}
Error: why is it not a return TypeError?
Output for 8.3.10
--------------[ TESTCASE ]--------------
string(9) "no-return"
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
string(15) "no-return-value"
Success: a return statement without a value is always valid.
--------------[ TESTCASE ]--------------
string(5) "$this"
Success: throwable: Using $this when not in object context
--------------[ TESTCASE ]--------------
object(ShouldTypeError)#4 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(11) "Const hello"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(3) "abc"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
int(1)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
float(1.23)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
NULL
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
bool(true)
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
bool(false)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(3) {
[0]=>
string(1) "a"
[1]=>
string(1) "b"
[2]=>
string(1) "c"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(4) {
["a"]=>
string(1) "a"
["b"]=>
string(1) "b"
["c"]=>
string(1) "c"
[0]=>
string(4) "Zero"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(5) "never"
Success: throwable: Undefined constant "never"
--------------[ TESTCASE ]--------------
string(4) "void"
Success: throwable: Undefined constant "void"
--------------[ TESTCASE ]--------------
enum(SomeEnum::Spades)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#6 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#1 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#2 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#3 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(DateTimeImmutable)#7 (3) {
["date"]=>
string(26) "2026-01-30 13:31:14.009618"
["timezone_type"]=>
int(3)
["timezone"]=>
string(16) "Europe/Amsterdam"
}
Error: why is it not a return TypeError?
Output for 8.3.9
--------------[ TESTCASE ]--------------
string(9) "no-return"
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
string(15) "no-return-value"
Success: a return statement without a value is always valid.
--------------[ TESTCASE ]--------------
string(5) "$this"
Success: throwable: Using $this when not in object context
--------------[ TESTCASE ]--------------
object(ShouldTypeError)#4 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(11) "Const hello"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(3) "abc"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
int(1)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
float(1.23)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
NULL
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
bool(true)
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
bool(false)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(3) {
[0]=>
string(1) "a"
[1]=>
string(1) "b"
[2]=>
string(1) "c"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(4) {
["a"]=>
string(1) "a"
["b"]=>
string(1) "b"
["c"]=>
string(1) "c"
[0]=>
string(4) "Zero"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(5) "never"
Success: throwable: Undefined constant "never"
--------------[ TESTCASE ]--------------
string(4) "void"
Success: throwable: Undefined constant "void"
--------------[ TESTCASE ]--------------
enum(SomeEnum::Spades)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#6 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#1 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#2 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#3 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(DateTimeImmutable)#7 (3) {
["date"]=>
string(26) "2026-01-30 13:31:14.007190"
["timezone_type"]=>
int(3)
["timezone"]=>
string(16) "Europe/Amsterdam"
}
Error: why is it not a return TypeError?
Output for 8.3.8
--------------[ TESTCASE ]--------------
string(9) "no-return"
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
string(15) "no-return-value"
Success: a return statement without a value is always valid.
--------------[ TESTCASE ]--------------
string(5) "$this"
Success: throwable: Using $this when not in object context
--------------[ TESTCASE ]--------------
object(ShouldTypeError)#4 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(11) "Const hello"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(3) "abc"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
int(1)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
float(1.23)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
NULL
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
bool(true)
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
bool(false)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(3) {
[0]=>
string(1) "a"
[1]=>
string(1) "b"
[2]=>
string(1) "c"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(4) {
["a"]=>
string(1) "a"
["b"]=>
string(1) "b"
["c"]=>
string(1) "c"
[0]=>
string(4) "Zero"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(5) "never"
Success: throwable: Undefined constant "never"
--------------[ TESTCASE ]--------------
string(4) "void"
Success: throwable: Undefined constant "void"
--------------[ TESTCASE ]--------------
enum(SomeEnum::Spades)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#6 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#1 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#2 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#3 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(DateTimeImmutable)#7 (3) {
["date"]=>
string(26) "2026-01-30 13:31:14.009349"
["timezone_type"]=>
int(3)
["timezone"]=>
string(16) "Europe/Amsterdam"
}
Error: why is it not a return TypeError?
Output for 8.3.7
--------------[ TESTCASE ]--------------
string(9) "no-return"
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
string(15) "no-return-value"
Success: a return statement without a value is always valid.
--------------[ TESTCASE ]--------------
string(5) "$this"
Success: throwable: Using $this when not in object context
--------------[ TESTCASE ]--------------
object(ShouldTypeError)#4 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(11) "Const hello"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(3) "abc"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
int(1)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
float(1.23)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
NULL
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
bool(true)
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
bool(false)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(3) {
[0]=>
string(1) "a"
[1]=>
string(1) "b"
[2]=>
string(1) "c"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(4) {
["a"]=>
string(1) "a"
["b"]=>
string(1) "b"
["c"]=>
string(1) "c"
[0]=>
string(4) "Zero"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(5) "never"
Success: throwable: Undefined constant "never"
--------------[ TESTCASE ]--------------
string(4) "void"
Success: throwable: Undefined constant "void"
--------------[ TESTCASE ]--------------
enum(SomeEnum::Spades)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#6 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#1 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#2 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#3 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(DateTimeImmutable)#7 (3) {
["date"]=>
string(26) "2026-01-30 13:31:14.009321"
["timezone_type"]=>
int(3)
["timezone"]=>
string(16) "Europe/Amsterdam"
}
Error: why is it not a return TypeError?
Output for 8.3.6
--------------[ TESTCASE ]--------------
string(9) "no-return"
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
string(15) "no-return-value"
Success: a return statement without a value is always valid.
--------------[ TESTCASE ]--------------
string(5) "$this"
Success: throwable: Using $this when not in object context
--------------[ TESTCASE ]--------------
object(ShouldTypeError)#4 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(11) "Const hello"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(3) "abc"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
int(1)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
float(1.23)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
NULL
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
bool(true)
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
bool(false)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(3) {
[0]=>
string(1) "a"
[1]=>
string(1) "b"
[2]=>
string(1) "c"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(4) {
["a"]=>
string(1) "a"
["b"]=>
string(1) "b"
["c"]=>
string(1) "c"
[0]=>
string(4) "Zero"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(5) "never"
Success: throwable: Undefined constant "never"
--------------[ TESTCASE ]--------------
string(4) "void"
Success: throwable: Undefined constant "void"
--------------[ TESTCASE ]--------------
enum(SomeEnum::Spades)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#6 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#1 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#2 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#3 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(DateTimeImmutable)#7 (3) {
["date"]=>
string(26) "2026-01-30 13:31:14.009260"
["timezone_type"]=>
int(3)
["timezone"]=>
string(16) "Europe/Amsterdam"
}
Error: why is it not a return TypeError?
Output for 8.3.5
--------------[ TESTCASE ]--------------
string(9) "no-return"
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
string(15) "no-return-value"
Success: a return statement without a value is always valid.
--------------[ TESTCASE ]--------------
string(5) "$this"
Success: throwable: Using $this when not in object context
--------------[ TESTCASE ]--------------
object(ShouldTypeError)#4 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(11) "Const hello"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(3) "abc"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
int(1)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
float(1.23)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
NULL
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
bool(true)
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
bool(false)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(3) {
[0]=>
string(1) "a"
[1]=>
string(1) "b"
[2]=>
string(1) "c"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(4) {
["a"]=>
string(1) "a"
["b"]=>
string(1) "b"
["c"]=>
string(1) "c"
[0]=>
string(4) "Zero"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(5) "never"
Success: throwable: Undefined constant "never"
--------------[ TESTCASE ]--------------
string(4) "void"
Success: throwable: Undefined constant "void"
--------------[ TESTCASE ]--------------
enum(SomeEnum::Spades)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#6 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#1 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#2 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#3 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(DateTimeImmutable)#7 (3) {
["date"]=>
string(26) "2026-01-30 13:31:14.007200"
["timezone_type"]=>
int(3)
["timezone"]=>
string(16) "Europe/Amsterdam"
}
Error: why is it not a return TypeError?
Output for 8.3.4
--------------[ TESTCASE ]--------------
string(9) "no-return"
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
string(15) "no-return-value"
Success: a return statement without a value is always valid.
--------------[ TESTCASE ]--------------
string(5) "$this"
Success: throwable: Using $this when not in object context
--------------[ TESTCASE ]--------------
object(ShouldTypeError)#4 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(11) "Const hello"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(3) "abc"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
int(1)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
float(1.23)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
NULL
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
bool(true)
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
bool(false)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(3) {
[0]=>
string(1) "a"
[1]=>
string(1) "b"
[2]=>
string(1) "c"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(4) {
["a"]=>
string(1) "a"
["b"]=>
string(1) "b"
["c"]=>
string(1) "c"
[0]=>
string(4) "Zero"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(5) "never"
Success: throwable: Undefined constant "never"
--------------[ TESTCASE ]--------------
string(4) "void"
Success: throwable: Undefined constant "void"
--------------[ TESTCASE ]--------------
enum(SomeEnum::Spades)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#6 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#1 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#2 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#3 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(DateTimeImmutable)#7 (3) {
["date"]=>
string(26) "2026-01-30 13:31:14.010044"
["timezone_type"]=>
int(3)
["timezone"]=>
string(16) "Europe/Amsterdam"
}
Error: why is it not a return TypeError?
Output for 8.3.3
--------------[ TESTCASE ]--------------
string(9) "no-return"
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
string(15) "no-return-value"
Success: a return statement without a value is always valid.
--------------[ TESTCASE ]--------------
string(5) "$this"
Success: throwable: Using $this when not in object context
--------------[ TESTCASE ]--------------
object(ShouldTypeError)#4 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(11) "Const hello"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(3) "abc"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
int(1)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
float(1.23)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
NULL
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
bool(true)
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
bool(false)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(3) {
[0]=>
string(1) "a"
[1]=>
string(1) "b"
[2]=>
string(1) "c"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(4) {
["a"]=>
string(1) "a"
["b"]=>
string(1) "b"
["c"]=>
string(1) "c"
[0]=>
string(4) "Zero"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(5) "never"
Success: throwable: Undefined constant "never"
--------------[ TESTCASE ]--------------
string(4) "void"
Success: throwable: Undefined constant "void"
--------------[ TESTCASE ]--------------
enum(SomeEnum::Spades)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#6 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#1 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#2 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#3 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(DateTimeImmutable)#7 (3) {
["date"]=>
string(26) "2026-01-30 13:31:14.007758"
["timezone_type"]=>
int(3)
["timezone"]=>
string(16) "Europe/Amsterdam"
}
Error: why is it not a return TypeError?
Output for 8.3.2
--------------[ TESTCASE ]--------------
string(9) "no-return"
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
string(15) "no-return-value"
Success: a return statement without a value is always valid.
--------------[ TESTCASE ]--------------
string(5) "$this"
Success: throwable: Using $this when not in object context
--------------[ TESTCASE ]--------------
object(ShouldTypeError)#4 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(11) "Const hello"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(3) "abc"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
int(1)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
float(1.23)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
NULL
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
bool(true)
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
bool(false)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(3) {
[0]=>
string(1) "a"
[1]=>
string(1) "b"
[2]=>
string(1) "c"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(4) {
["a"]=>
string(1) "a"
["b"]=>
string(1) "b"
["c"]=>
string(1) "c"
[0]=>
string(4) "Zero"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(5) "never"
Success: throwable: Undefined constant "never"
--------------[ TESTCASE ]--------------
string(4) "void"
Success: throwable: Undefined constant "void"
--------------[ TESTCASE ]--------------
enum(SomeEnum::Spades)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#6 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#1 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#2 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#3 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(DateTimeImmutable)#7 (3) {
["date"]=>
string(26) "2026-01-30 13:31:14.010201"
["timezone_type"]=>
int(3)
["timezone"]=>
string(16) "Europe/Amsterdam"
}
Error: why is it not a return TypeError?
Output for 8.3.1
--------------[ TESTCASE ]--------------
string(9) "no-return"
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
string(15) "no-return-value"
Success: a return statement without a value is always valid.
--------------[ TESTCASE ]--------------
string(5) "$this"
Success: throwable: Using $this when not in object context
--------------[ TESTCASE ]--------------
object(ShouldTypeError)#4 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(11) "Const hello"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(3) "abc"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
int(1)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
float(1.23)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
NULL
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
bool(true)
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
bool(false)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(3) {
[0]=>
string(1) "a"
[1]=>
string(1) "b"
[2]=>
string(1) "c"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(4) {
["a"]=>
string(1) "a"
["b"]=>
string(1) "b"
["c"]=>
string(1) "c"
[0]=>
string(4) "Zero"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(5) "never"
Success: throwable: Undefined constant "never"
--------------[ TESTCASE ]--------------
string(4) "void"
Success: throwable: Undefined constant "void"
--------------[ TESTCASE ]--------------
enum(SomeEnum::Spades)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#6 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#1 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#2 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#3 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(DateTimeImmutable)#7 (3) {
["date"]=>
string(26) "2026-01-30 13:31:14.010353"
["timezone_type"]=>
int(3)
["timezone"]=>
string(16) "Europe/Amsterdam"
}
Error: why is it not a return TypeError?
Output for 8.3.0
--------------[ TESTCASE ]--------------
string(9) "no-return"
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
string(15) "no-return-value"
Success: a return statement without a value is always valid.
--------------[ TESTCASE ]--------------
string(5) "$this"
Success: throwable: Using $this when not in object context
--------------[ TESTCASE ]--------------
object(ShouldTypeError)#4 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(11) "Const hello"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(3) "abc"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
int(1)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
float(1.23)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
NULL
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
bool(true)
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
bool(false)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(3) {
[0]=>
string(1) "a"
[1]=>
string(1) "b"
[2]=>
string(1) "c"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(4) {
["a"]=>
string(1) "a"
["b"]=>
string(1) "b"
["c"]=>
string(1) "c"
[0]=>
string(4) "Zero"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(5) "never"
Success: throwable: Undefined constant "never"
--------------[ TESTCASE ]--------------
string(4) "void"
Success: throwable: Undefined constant "void"
--------------[ TESTCASE ]--------------
enum(SomeEnum::Spades)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#6 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#1 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#2 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#3 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(DateTimeImmutable)#7 (3) {
["date"]=>
string(26) "2026-01-30 13:31:14.008042"
["timezone_type"]=>
int(3)
["timezone"]=>
string(16) "Europe/Amsterdam"
}
Error: why is it not a return TypeError?
Output for 8.2.36
--------------[ TESTCASE ]--------------
string(9) "no-return"
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
string(15) "no-return-value"
Success: a return statement without a value is always valid.
--------------[ TESTCASE ]--------------
string(5) "$this"
Success: throwable: Using $this when not in object context
--------------[ TESTCASE ]--------------
object(ShouldTypeError)#4 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(11) "Const hello"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(3) "abc"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
int(1)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
float(1.23)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
NULL
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
bool(true)
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
bool(false)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(3) {
[0]=>
string(1) "a"
[1]=>
string(1) "b"
[2]=>
string(1) "c"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(4) {
["a"]=>
string(1) "a"
["b"]=>
string(1) "b"
["c"]=>
string(1) "c"
[0]=>
string(4) "Zero"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(5) "never"
Success: throwable: Undefined constant "never"
--------------[ TESTCASE ]--------------
string(4) "void"
Success: throwable: Undefined constant "void"
--------------[ TESTCASE ]--------------
enum(SomeEnum::Spades)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#6 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#1 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#2 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#3 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(DateTimeImmutable)#7 (3) {
["date"]=>
string(26) "2026-01-30 13:31:14.010260"
["timezone_type"]=>
int(3)
["timezone"]=>
string(16) "Europe/Amsterdam"
}
Error: why is it not a return TypeError?
Output for 8.2.35
--------------[ TESTCASE ]--------------
string(9) "no-return"
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
string(15) "no-return-value"
Success: a return statement without a value is always valid.
--------------[ TESTCASE ]--------------
string(5) "$this"
Success: throwable: Using $this when not in object context
--------------[ TESTCASE ]--------------
object(ShouldTypeError)#4 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(11) "Const hello"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(3) "abc"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
int(1)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
float(1.23)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
NULL
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
bool(true)
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
bool(false)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(3) {
[0]=>
string(1) "a"
[1]=>
string(1) "b"
[2]=>
string(1) "c"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(4) {
["a"]=>
string(1) "a"
["b"]=>
string(1) "b"
["c"]=>
string(1) "c"
[0]=>
string(4) "Zero"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(5) "never"
Success: throwable: Undefined constant "never"
--------------[ TESTCASE ]--------------
string(4) "void"
Success: throwable: Undefined constant "void"
--------------[ TESTCASE ]--------------
enum(SomeEnum::Spades)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#6 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#1 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#2 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#3 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(DateTimeImmutable)#7 (3) {
["date"]=>
string(26) "2026-01-30 13:31:14.010300"
["timezone_type"]=>
int(3)
["timezone"]=>
string(16) "Europe/Amsterdam"
}
Error: why is it not a return TypeError?
Output for 8.2.34
--------------[ TESTCASE ]--------------
string(9) "no-return"
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
string(15) "no-return-value"
Success: a return statement without a value is always valid.
--------------[ TESTCASE ]--------------
string(5) "$this"
Success: throwable: Using $this when not in object context
--------------[ TESTCASE ]--------------
object(ShouldTypeError)#4 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(11) "Const hello"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(3) "abc"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
int(1)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
float(1.23)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
NULL
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
bool(true)
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
bool(false)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(3) {
[0]=>
string(1) "a"
[1]=>
string(1) "b"
[2]=>
string(1) "c"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(4) {
["a"]=>
string(1) "a"
["b"]=>
string(1) "b"
["c"]=>
string(1) "c"
[0]=>
string(4) "Zero"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(5) "never"
Success: throwable: Undefined constant "never"
--------------[ TESTCASE ]--------------
string(4) "void"
Success: throwable: Undefined constant "void"
--------------[ TESTCASE ]--------------
enum(SomeEnum::Spades)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#6 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#1 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#2 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#3 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(DateTimeImmutable)#7 (3) {
["date"]=>
string(26) "2026-01-30 13:31:14.010054"
["timezone_type"]=>
int(3)
["timezone"]=>
string(16) "Europe/Amsterdam"
}
Error: why is it not a return TypeError?
Output for 8.2.33
--------------[ TESTCASE ]--------------
string(9) "no-return"
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
string(15) "no-return-value"
Success: a return statement without a value is always valid.
--------------[ TESTCASE ]--------------
string(5) "$this"
Success: throwable: Using $this when not in object context
--------------[ TESTCASE ]--------------
object(ShouldTypeError)#4 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(11) "Const hello"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(3) "abc"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
int(1)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
float(1.23)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
NULL
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
bool(true)
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
bool(false)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(3) {
[0]=>
string(1) "a"
[1]=>
string(1) "b"
[2]=>
string(1) "c"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(4) {
["a"]=>
string(1) "a"
["b"]=>
string(1) "b"
["c"]=>
string(1) "c"
[0]=>
string(4) "Zero"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(5) "never"
Success: throwable: Undefined constant "never"
--------------[ TESTCASE ]--------------
string(4) "void"
Success: throwable: Undefined constant "void"
--------------[ TESTCASE ]--------------
enum(SomeEnum::Spades)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#6 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#1 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#2 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#3 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(DateTimeImmutable)#7 (3) {
["date"]=>
string(26) "2026-01-30 13:31:14.010019"
["timezone_type"]=>
int(3)
["timezone"]=>
string(16) "Europe/Amsterdam"
}
Error: why is it not a return TypeError?
Output for 8.2.32
--------------[ TESTCASE ]--------------
string(9) "no-return"
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
string(15) "no-return-value"
Success: a return statement without a value is always valid.
--------------[ TESTCASE ]--------------
string(5) "$this"
Success: throwable: Using $this when not in object context
--------------[ TESTCASE ]--------------
object(ShouldTypeError)#4 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(11) "Const hello"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(3) "abc"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
int(1)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
float(1.23)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
NULL
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
bool(true)
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
bool(false)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(3) {
[0]=>
string(1) "a"
[1]=>
string(1) "b"
[2]=>
string(1) "c"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(4) {
["a"]=>
string(1) "a"
["b"]=>
string(1) "b"
["c"]=>
string(1) "c"
[0]=>
string(4) "Zero"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(5) "never"
Success: throwable: Undefined constant "never"
--------------[ TESTCASE ]--------------
string(4) "void"
Success: throwable: Undefined constant "void"
--------------[ TESTCASE ]--------------
enum(SomeEnum::Spades)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#6 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#1 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#2 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#3 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(DateTimeImmutable)#7 (3) {
["date"]=>
string(26) "2026-01-30 13:31:14.010568"
["timezone_type"]=>
int(3)
["timezone"]=>
string(16) "Europe/Amsterdam"
}
Error: why is it not a return TypeError?
Output for 8.2.31
--------------[ TESTCASE ]--------------
string(9) "no-return"
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
string(15) "no-return-value"
Success: a return statement without a value is always valid.
--------------[ TESTCASE ]--------------
string(5) "$this"
Success: throwable: Using $this when not in object context
--------------[ TESTCASE ]--------------
object(ShouldTypeError)#4 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(11) "Const hello"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(3) "abc"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
int(1)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
float(1.23)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
NULL
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
bool(true)
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
bool(false)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(3) {
[0]=>
string(1) "a"
[1]=>
string(1) "b"
[2]=>
string(1) "c"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(4) {
["a"]=>
string(1) "a"
["b"]=>
string(1) "b"
["c"]=>
string(1) "c"
[0]=>
string(4) "Zero"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(5) "never"
Success: throwable: Undefined constant "never"
--------------[ TESTCASE ]--------------
string(4) "void"
Success: throwable: Undefined constant "void"
--------------[ TESTCASE ]--------------
enum(SomeEnum::Spades)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#6 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#1 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#2 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#3 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(DateTimeImmutable)#7 (3) {
["date"]=>
string(26) "2026-01-30 13:31:14.010456"
["timezone_type"]=>
int(3)
["timezone"]=>
string(16) "Europe/Amsterdam"
}
Error: why is it not a return TypeError?
Output for 8.2.30
--------------[ TESTCASE ]--------------
string(9) "no-return"
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
string(15) "no-return-value"
Success: a return statement without a value is always valid.
--------------[ TESTCASE ]--------------
string(5) "$this"
Success: throwable: Using $this when not in object context
--------------[ TESTCASE ]--------------
object(ShouldTypeError)#4 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(11) "Const hello"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(3) "abc"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
int(1)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
float(1.23)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
NULL
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
bool(true)
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
bool(false)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(3) {
[0]=>
string(1) "a"
[1]=>
string(1) "b"
[2]=>
string(1) "c"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(4) {
["a"]=>
string(1) "a"
["b"]=>
string(1) "b"
["c"]=>
string(1) "c"
[0]=>
string(4) "Zero"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(5) "never"
Success: throwable: Undefined constant "never"
--------------[ TESTCASE ]--------------
string(4) "void"
Success: throwable: Undefined constant "void"
--------------[ TESTCASE ]--------------
enum(SomeEnum::Spades)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#6 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#1 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#2 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#3 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(DateTimeImmutable)#7 (3) {
["date"]=>
string(26) "2026-01-30 13:31:14.010768"
["timezone_type"]=>
int(3)
["timezone"]=>
string(16) "Europe/Amsterdam"
}
Error: why is it not a return TypeError?
Output for 8.2.29
--------------[ TESTCASE ]--------------
string(9) "no-return"
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
string(15) "no-return-value"
Success: a return statement without a value is always valid.
--------------[ TESTCASE ]--------------
string(5) "$this"
Success: throwable: Using $this when not in object context
--------------[ TESTCASE ]--------------
object(ShouldTypeError)#4 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(11) "Const hello"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(3) "abc"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
int(1)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
float(1.23)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
NULL
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
bool(true)
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
bool(false)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(3) {
[0]=>
string(1) "a"
[1]=>
string(1) "b"
[2]=>
string(1) "c"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(4) {
["a"]=>
string(1) "a"
["b"]=>
string(1) "b"
["c"]=>
string(1) "c"
[0]=>
string(4) "Zero"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(5) "never"
Success: throwable: Undefined constant "never"
--------------[ TESTCASE ]--------------
string(4) "void"
Success: throwable: Undefined constant "void"
--------------[ TESTCASE ]--------------
enum(SomeEnum::Spades)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#6 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#1 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#2 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#3 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(DateTimeImmutable)#7 (3) {
["date"]=>
string(26) "2026-01-30 13:31:14.009457"
["timezone_type"]=>
int(3)
["timezone"]=>
string(16) "Europe/Amsterdam"
}
Error: why is it not a return TypeError?
Output for 8.2.28
--------------[ TESTCASE ]--------------
string(9) "no-return"
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
string(15) "no-return-value"
Success: a return statement without a value is always valid.
--------------[ TESTCASE ]--------------
string(5) "$this"
Success: throwable: Using $this when not in object context
--------------[ TESTCASE ]--------------
object(ShouldTypeError)#4 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(11) "Const hello"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(3) "abc"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
int(1)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
float(1.23)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
NULL
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
bool(true)
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
bool(false)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(3) {
[0]=>
string(1) "a"
[1]=>
string(1) "b"
[2]=>
string(1) "c"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(4) {
["a"]=>
string(1) "a"
["b"]=>
string(1) "b"
["c"]=>
string(1) "c"
[0]=>
string(4) "Zero"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(5) "never"
Success: throwable: Undefined constant "never"
--------------[ TESTCASE ]--------------
string(4) "void"
Success: throwable: Undefined constant "void"
--------------[ TESTCASE ]--------------
enum(SomeEnum::Spades)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#6 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#1 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#2 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#3 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(DateTimeImmutable)#7 (3) {
["date"]=>
string(26) "2026-01-30 13:31:14.007088"
["timezone_type"]=>
int(3)
["timezone"]=>
string(16) "Europe/Amsterdam"
}
Error: why is it not a return TypeError?
Output for 8.2.27
--------------[ TESTCASE ]--------------
string(9) "no-return"
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
string(15) "no-return-value"
Success: a return statement without a value is always valid.
--------------[ TESTCASE ]--------------
string(5) "$this"
Success: throwable: Using $this when not in object context
--------------[ TESTCASE ]--------------
object(ShouldTypeError)#4 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(11) "Const hello"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(3) "abc"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
int(1)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
float(1.23)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
NULL
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
bool(true)
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
bool(false)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(3) {
[0]=>
string(1) "a"
[1]=>
string(1) "b"
[2]=>
string(1) "c"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(4) {
["a"]=>
string(1) "a"
["b"]=>
string(1) "b"
["c"]=>
string(1) "c"
[0]=>
string(4) "Zero"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(5) "never"
Success: throwable: Undefined constant "never"
--------------[ TESTCASE ]--------------
string(4) "void"
Success: throwable: Undefined constant "void"
--------------[ TESTCASE ]--------------
enum(SomeEnum::Spades)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#6 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#1 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#2 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#3 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(DateTimeImmutable)#7 (3) {
["date"]=>
string(26) "2026-01-30 13:31:14.006191"
["timezone_type"]=>
int(3)
["timezone"]=>
string(16) "Europe/Amsterdam"
}
Error: why is it not a return TypeError?
Output for 8.2.26
--------------[ TESTCASE ]--------------
string(9) "no-return"
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
string(15) "no-return-value"
Success: a return statement without a value is always valid.
--------------[ TESTCASE ]--------------
string(5) "$this"
Success: throwable: Using $this when not in object context
--------------[ TESTCASE ]--------------
object(ShouldTypeError)#4 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(11) "Const hello"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(3) "abc"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
int(1)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
float(1.23)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
NULL
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
bool(true)
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
bool(false)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(3) {
[0]=>
string(1) "a"
[1]=>
string(1) "b"
[2]=>
string(1) "c"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(4) {
["a"]=>
string(1) "a"
["b"]=>
string(1) "b"
["c"]=>
string(1) "c"
[0]=>
string(4) "Zero"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(5) "never"
Success: throwable: Undefined constant "never"
--------------[ TESTCASE ]--------------
string(4) "void"
Success: throwable: Undefined constant "void"
--------------[ TESTCASE ]--------------
enum(SomeEnum::Spades)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#6 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#1 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#2 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#3 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(DateTimeImmutable)#7 (3) {
["date"]=>
string(26) "2026-01-30 13:31:14.009154"
["timezone_type"]=>
int(3)
["timezone"]=>
string(16) "Europe/Amsterdam"
}
Error: why is it not a return TypeError?
Output for 8.2.25
--------------[ TESTCASE ]--------------
string(9) "no-return"
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
string(15) "no-return-value"
Success: a return statement without a value is always valid.
--------------[ TESTCASE ]--------------
string(5) "$this"
Success: throwable: Using $this when not in object context
--------------[ TESTCASE ]--------------
object(ShouldTypeError)#4 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(11) "Const hello"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(3) "abc"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
int(1)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
float(1.23)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
NULL
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
bool(true)
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
bool(false)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(3) {
[0]=>
string(1) "a"
[1]=>
string(1) "b"
[2]=>
string(1) "c"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(4) {
["a"]=>
string(1) "a"
["b"]=>
string(1) "b"
["c"]=>
string(1) "c"
[0]=>
string(4) "Zero"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(5) "never"
Success: throwable: Undefined constant "never"
--------------[ TESTCASE ]--------------
string(4) "void"
Success: throwable: Undefined constant "void"
--------------[ TESTCASE ]--------------
enum(SomeEnum::Spades)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#6 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#1 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#2 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#3 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(DateTimeImmutable)#7 (3) {
["date"]=>
string(26) "2026-01-30 13:31:14.007531"
["timezone_type"]=>
int(3)
["timezone"]=>
string(16) "Europe/Amsterdam"
}
Error: why is it not a return TypeError?
Output for 8.2.24
--------------[ TESTCASE ]--------------
string(9) "no-return"
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
string(15) "no-return-value"
Success: a return statement without a value is always valid.
--------------[ TESTCASE ]--------------
string(5) "$this"
Success: throwable: Using $this when not in object context
--------------[ TESTCASE ]--------------
object(ShouldTypeError)#4 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(11) "Const hello"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(3) "abc"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
int(1)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
float(1.23)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
NULL
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
bool(true)
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
bool(false)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(3) {
[0]=>
string(1) "a"
[1]=>
string(1) "b"
[2]=>
string(1) "c"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(4) {
["a"]=>
string(1) "a"
["b"]=>
string(1) "b"
["c"]=>
string(1) "c"
[0]=>
string(4) "Zero"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(5) "never"
Success: throwable: Undefined constant "never"
--------------[ TESTCASE ]--------------
string(4) "void"
Success: throwable: Undefined constant "void"
--------------[ TESTCASE ]--------------
enum(SomeEnum::Spades)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#6 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#1 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#2 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#3 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(DateTimeImmutable)#7 (3) {
["date"]=>
string(26) "2026-01-30 13:31:14.004044"
["timezone_type"]=>
int(3)
["timezone"]=>
string(16) "Europe/Amsterdam"
}
Error: why is it not a return TypeError?
Output for 8.2.23
--------------[ TESTCASE ]--------------
string(9) "no-return"
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
string(15) "no-return-value"
Success: a return statement without a value is always valid.
--------------[ TESTCASE ]--------------
string(5) "$this"
Success: throwable: Using $this when not in object context
--------------[ TESTCASE ]--------------
object(ShouldTypeError)#4 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(11) "Const hello"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(3) "abc"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
int(1)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
float(1.23)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
NULL
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
bool(true)
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
bool(false)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(3) {
[0]=>
string(1) "a"
[1]=>
string(1) "b"
[2]=>
string(1) "c"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(4) {
["a"]=>
string(1) "a"
["b"]=>
string(1) "b"
["c"]=>
string(1) "c"
[0]=>
string(4) "Zero"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(5) "never"
Success: throwable: Undefined constant "never"
--------------[ TESTCASE ]--------------
string(4) "void"
Success: throwable: Undefined constant "void"
--------------[ TESTCASE ]--------------
enum(SomeEnum::Spades)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#6 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#1 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#2 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#3 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(DateTimeImmutable)#7 (3) {
["date"]=>
string(26) "2026-01-30 13:31:14.009033"
["timezone_type"]=>
int(3)
["timezone"]=>
string(16) "Europe/Amsterdam"
}
Error: why is it not a return TypeError?
Output for 8.2.22
--------------[ TESTCASE ]--------------
string(9) "no-return"
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
string(15) "no-return-value"
Success: a return statement without a value is always valid.
--------------[ TESTCASE ]--------------
string(5) "$this"
Success: throwable: Using $this when not in object context
--------------[ TESTCASE ]--------------
object(ShouldTypeError)#4 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(11) "Const hello"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(3) "abc"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
int(1)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
float(1.23)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
NULL
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
bool(true)
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
bool(false)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(3) {
[0]=>
string(1) "a"
[1]=>
string(1) "b"
[2]=>
string(1) "c"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(4) {
["a"]=>
string(1) "a"
["b"]=>
string(1) "b"
["c"]=>
string(1) "c"
[0]=>
string(4) "Zero"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(5) "never"
Success: throwable: Undefined constant "never"
--------------[ TESTCASE ]--------------
string(4) "void"
Success: throwable: Undefined constant "void"
--------------[ TESTCASE ]--------------
enum(SomeEnum::Spades)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#6 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#1 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#2 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#3 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(DateTimeImmutable)#7 (3) {
["date"]=>
string(26) "2026-01-30 13:31:14.009599"
["timezone_type"]=>
int(3)
["timezone"]=>
string(16) "Europe/Amsterdam"
}
Error: why is it not a return TypeError?
Output for 8.2.21
--------------[ TESTCASE ]--------------
string(9) "no-return"
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
string(15) "no-return-value"
Success: a return statement without a value is always valid.
--------------[ TESTCASE ]--------------
string(5) "$this"
Success: throwable: Using $this when not in object context
--------------[ TESTCASE ]--------------
object(ShouldTypeError)#4 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(11) "Const hello"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(3) "abc"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
int(1)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
float(1.23)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
NULL
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
bool(true)
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
bool(false)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(3) {
[0]=>
string(1) "a"
[1]=>
string(1) "b"
[2]=>
string(1) "c"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(4) {
["a"]=>
string(1) "a"
["b"]=>
string(1) "b"
["c"]=>
string(1) "c"
[0]=>
string(4) "Zero"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(5) "never"
Success: throwable: Undefined constant "never"
--------------[ TESTCASE ]--------------
string(4) "void"
Success: throwable: Undefined constant "void"
--------------[ TESTCASE ]--------------
enum(SomeEnum::Spades)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#6 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#1 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#2 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#3 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(DateTimeImmutable)#7 (3) {
["date"]=>
string(26) "2026-01-30 13:31:14.003976"
["timezone_type"]=>
int(3)
["timezone"]=>
string(16) "Europe/Amsterdam"
}
Error: why is it not a return TypeError?
Output for 8.2.20
--------------[ TESTCASE ]--------------
string(9) "no-return"
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
string(15) "no-return-value"
Success: a return statement without a value is always valid.
--------------[ TESTCASE ]--------------
string(5) "$this"
Success: throwable: Using $this when not in object context
--------------[ TESTCASE ]--------------
object(ShouldTypeError)#4 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(11) "Const hello"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(3) "abc"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
int(1)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
float(1.23)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
NULL
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
bool(true)
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
bool(false)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(3) {
[0]=>
string(1) "a"
[1]=>
string(1) "b"
[2]=>
string(1) "c"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(4) {
["a"]=>
string(1) "a"
["b"]=>
string(1) "b"
["c"]=>
string(1) "c"
[0]=>
string(4) "Zero"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(5) "never"
Success: throwable: Undefined constant "never"
--------------[ TESTCASE ]--------------
string(4) "void"
Success: throwable: Undefined constant "void"
--------------[ TESTCASE ]--------------
enum(SomeEnum::Spades)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#6 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#1 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#2 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#3 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(DateTimeImmutable)#7 (3) {
["date"]=>
string(26) "2026-01-30 13:31:14.008217"
["timezone_type"]=>
int(3)
["timezone"]=>
string(16) "Europe/Amsterdam"
}
Error: why is it not a return TypeError?
Output for 8.2.19
--------------[ TESTCASE ]--------------
string(9) "no-return"
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
string(15) "no-return-value"
Success: a return statement without a value is always valid.
--------------[ TESTCASE ]--------------
string(5) "$this"
Success: throwable: Using $this when not in object context
--------------[ TESTCASE ]--------------
object(ShouldTypeError)#4 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(11) "Const hello"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(3) "abc"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
int(1)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
float(1.23)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
NULL
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
bool(true)
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
bool(false)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(3) {
[0]=>
string(1) "a"
[1]=>
string(1) "b"
[2]=>
string(1) "c"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(4) {
["a"]=>
string(1) "a"
["b"]=>
string(1) "b"
["c"]=>
string(1) "c"
[0]=>
string(4) "Zero"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(5) "never"
Success: throwable: Undefined constant "never"
--------------[ TESTCASE ]--------------
string(4) "void"
Success: throwable: Undefined constant "void"
--------------[ TESTCASE ]--------------
enum(SomeEnum::Spades)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#6 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#1 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#2 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#3 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(DateTimeImmutable)#7 (3) {
["date"]=>
string(26) "2026-01-30 13:31:14.009232"
["timezone_type"]=>
int(3)
["timezone"]=>
string(16) "Europe/Amsterdam"
}
Error: why is it not a return TypeError?
Output for 8.2.18
--------------[ TESTCASE ]--------------
string(9) "no-return"
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
string(15) "no-return-value"
Success: a return statement without a value is always valid.
--------------[ TESTCASE ]--------------
string(5) "$this"
Success: throwable: Using $this when not in object context
--------------[ TESTCASE ]--------------
object(ShouldTypeError)#4 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(11) "Const hello"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(3) "abc"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
int(1)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
float(1.23)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
NULL
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
bool(true)
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
bool(false)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(3) {
[0]=>
string(1) "a"
[1]=>
string(1) "b"
[2]=>
string(1) "c"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(4) {
["a"]=>
string(1) "a"
["b"]=>
string(1) "b"
["c"]=>
string(1) "c"
[0]=>
string(4) "Zero"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(5) "never"
Success: throwable: Undefined constant "never"
--------------[ TESTCASE ]--------------
string(4) "void"
Success: throwable: Undefined constant "void"
--------------[ TESTCASE ]--------------
enum(SomeEnum::Spades)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#6 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#1 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#2 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#3 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(DateTimeImmutable)#7 (3) {
["date"]=>
string(26) "2026-01-30 13:31:14.009242"
["timezone_type"]=>
int(3)
["timezone"]=>
string(16) "Europe/Amsterdam"
}
Error: why is it not a return TypeError?
Output for 8.2.17
--------------[ TESTCASE ]--------------
string(9) "no-return"
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
string(15) "no-return-value"
Success: a return statement without a value is always valid.
--------------[ TESTCASE ]--------------
string(5) "$this"
Success: throwable: Using $this when not in object context
--------------[ TESTCASE ]--------------
object(ShouldTypeError)#4 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(11) "Const hello"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(3) "abc"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
int(1)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
float(1.23)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
NULL
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
bool(true)
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
bool(false)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(3) {
[0]=>
string(1) "a"
[1]=>
string(1) "b"
[2]=>
string(1) "c"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(4) {
["a"]=>
string(1) "a"
["b"]=>
string(1) "b"
["c"]=>
string(1) "c"
[0]=>
string(4) "Zero"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(5) "never"
Success: throwable: Undefined constant "never"
--------------[ TESTCASE ]--------------
string(4) "void"
Success: throwable: Undefined constant "void"
--------------[ TESTCASE ]--------------
enum(SomeEnum::Spades)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#6 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#1 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#2 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#3 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(DateTimeImmutable)#7 (3) {
["date"]=>
string(26) "2026-01-30 13:31:14.010500"
["timezone_type"]=>
int(3)
["timezone"]=>
string(16) "Europe/Amsterdam"
}
Error: why is it not a return TypeError?
Output for 8.2.16
--------------[ TESTCASE ]--------------
string(9) "no-return"
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
string(15) "no-return-value"
Success: a return statement without a value is always valid.
--------------[ TESTCASE ]--------------
string(5) "$this"
Success: throwable: Using $this when not in object context
--------------[ TESTCASE ]--------------
object(ShouldTypeError)#4 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(11) "Const hello"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(3) "abc"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
int(1)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
float(1.23)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
NULL
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
bool(true)
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
bool(false)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(3) {
[0]=>
string(1) "a"
[1]=>
string(1) "b"
[2]=>
string(1) "c"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(4) {
["a"]=>
string(1) "a"
["b"]=>
string(1) "b"
["c"]=>
string(1) "c"
[0]=>
string(4) "Zero"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(5) "never"
Success: throwable: Undefined constant "never"
--------------[ TESTCASE ]--------------
string(4) "void"
Success: throwable: Undefined constant "void"
--------------[ TESTCASE ]--------------
enum(SomeEnum::Spades)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#6 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#1 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#2 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#3 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(DateTimeImmutable)#7 (3) {
["date"]=>
string(26) "2026-01-30 13:31:14.008106"
["timezone_type"]=>
int(3)
["timezone"]=>
string(16) "Europe/Amsterdam"
}
Error: why is it not a return TypeError?
Output for 8.2.15
--------------[ TESTCASE ]--------------
string(9) "no-return"
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
string(15) "no-return-value"
Success: a return statement without a value is always valid.
--------------[ TESTCASE ]--------------
string(5) "$this"
Success: throwable: Using $this when not in object context
--------------[ TESTCASE ]--------------
object(ShouldTypeError)#4 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(11) "Const hello"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(3) "abc"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
int(1)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
float(1.23)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
NULL
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
bool(true)
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
bool(false)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(3) {
[0]=>
string(1) "a"
[1]=>
string(1) "b"
[2]=>
string(1) "c"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(4) {
["a"]=>
string(1) "a"
["b"]=>
string(1) "b"
["c"]=>
string(1) "c"
[0]=>
string(4) "Zero"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(5) "never"
Success: throwable: Undefined constant "never"
--------------[ TESTCASE ]--------------
string(4) "void"
Success: throwable: Undefined constant "void"
--------------[ TESTCASE ]--------------
enum(SomeEnum::Spades)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#6 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#1 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#2 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#3 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(DateTimeImmutable)#7 (3) {
["date"]=>
string(26) "2026-01-30 13:31:14.009861"
["timezone_type"]=>
int(3)
["timezone"]=>
string(16) "Europe/Amsterdam"
}
Error: why is it not a return TypeError?
Output for 8.2.14
--------------[ TESTCASE ]--------------
string(9) "no-return"
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
string(15) "no-return-value"
Success: a return statement without a value is always valid.
--------------[ TESTCASE ]--------------
string(5) "$this"
Success: throwable: Using $this when not in object context
--------------[ TESTCASE ]--------------
object(ShouldTypeError)#4 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(11) "Const hello"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(3) "abc"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
int(1)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
float(1.23)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
NULL
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
bool(true)
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
bool(false)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(3) {
[0]=>
string(1) "a"
[1]=>
string(1) "b"
[2]=>
string(1) "c"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(4) {
["a"]=>
string(1) "a"
["b"]=>
string(1) "b"
["c"]=>
string(1) "c"
[0]=>
string(4) "Zero"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(5) "never"
Success: throwable: Undefined constant "never"
--------------[ TESTCASE ]--------------
string(4) "void"
Success: throwable: Undefined constant "void"
--------------[ TESTCASE ]--------------
enum(SomeEnum::Spades)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#6 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#1 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#2 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#3 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(DateTimeImmutable)#7 (3) {
["date"]=>
string(26) "2026-01-30 13:31:14.007894"
["timezone_type"]=>
int(3)
["timezone"]=>
string(16) "Europe/Amsterdam"
}
Error: why is it not a return TypeError?
Output for 8.2.13
--------------[ TESTCASE ]--------------
string(9) "no-return"
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
string(15) "no-return-value"
Success: a return statement without a value is always valid.
--------------[ TESTCASE ]--------------
string(5) "$this"
Success: throwable: Using $this when not in object context
--------------[ TESTCASE ]--------------
object(ShouldTypeError)#4 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(11) "Const hello"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(3) "abc"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
int(1)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
float(1.23)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
NULL
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
bool(true)
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
bool(false)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(3) {
[0]=>
string(1) "a"
[1]=>
string(1) "b"
[2]=>
string(1) "c"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(4) {
["a"]=>
string(1) "a"
["b"]=>
string(1) "b"
["c"]=>
string(1) "c"
[0]=>
string(4) "Zero"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(5) "never"
Success: throwable: Undefined constant "never"
--------------[ TESTCASE ]--------------
string(4) "void"
Success: throwable: Undefined constant "void"
--------------[ TESTCASE ]--------------
enum(SomeEnum::Spades)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#6 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#1 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#2 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#3 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(DateTimeImmutable)#7 (3) {
["date"]=>
string(26) "2026-01-30 13:31:14.007829"
["timezone_type"]=>
int(3)
["timezone"]=>
string(16) "Europe/Amsterdam"
}
Error: why is it not a return TypeError?
Output for 8.2.12
--------------[ TESTCASE ]--------------
string(9) "no-return"
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
string(15) "no-return-value"
Success: a return statement without a value is always valid.
--------------[ TESTCASE ]--------------
string(5) "$this"
Success: throwable: Using $this when not in object context
--------------[ TESTCASE ]--------------
object(ShouldTypeError)#4 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(11) "Const hello"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(3) "abc"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
int(1)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
float(1.23)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
NULL
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
bool(true)
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
bool(false)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(3) {
[0]=>
string(1) "a"
[1]=>
string(1) "b"
[2]=>
string(1) "c"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(4) {
["a"]=>
string(1) "a"
["b"]=>
string(1) "b"
["c"]=>
string(1) "c"
[0]=>
string(4) "Zero"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(5) "never"
Success: throwable: Undefined constant "never"
--------------[ TESTCASE ]--------------
string(4) "void"
Success: throwable: Undefined constant "void"
--------------[ TESTCASE ]--------------
enum(SomeEnum::Spades)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#6 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#1 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#2 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#3 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(DateTimeImmutable)#7 (3) {
["date"]=>
string(26) "2026-01-30 13:31:14.006985"
["timezone_type"]=>
int(3)
["timezone"]=>
string(16) "Europe/Amsterdam"
}
Error: why is it not a return TypeError?
Output for 8.2.11
--------------[ TESTCASE ]--------------
string(9) "no-return"
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
string(15) "no-return-value"
Success: a return statement without a value is always valid.
--------------[ TESTCASE ]--------------
string(5) "$this"
Success: throwable: Using $this when not in object context
--------------[ TESTCASE ]--------------
object(ShouldTypeError)#4 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(11) "Const hello"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(3) "abc"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
int(1)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
float(1.23)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
NULL
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
bool(true)
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
bool(false)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(3) {
[0]=>
string(1) "a"
[1]=>
string(1) "b"
[2]=>
string(1) "c"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(4) {
["a"]=>
string(1) "a"
["b"]=>
string(1) "b"
["c"]=>
string(1) "c"
[0]=>
string(4) "Zero"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(5) "never"
Success: throwable: Undefined constant "never"
--------------[ TESTCASE ]--------------
string(4) "void"
Success: throwable: Undefined constant "void"
--------------[ TESTCASE ]--------------
enum(SomeEnum::Spades)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#6 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#1 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#2 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#3 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(DateTimeImmutable)#7 (3) {
["date"]=>
string(26) "2026-01-30 13:31:14.004200"
["timezone_type"]=>
int(3)
["timezone"]=>
string(16) "Europe/Amsterdam"
}
Error: why is it not a return TypeError?
Output for 8.2.10
--------------[ TESTCASE ]--------------
string(9) "no-return"
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
string(15) "no-return-value"
Success: a return statement without a value is always valid.
--------------[ TESTCASE ]--------------
string(5) "$this"
Success: throwable: Using $this when not in object context
--------------[ TESTCASE ]--------------
object(ShouldTypeError)#4 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(11) "Const hello"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(3) "abc"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
int(1)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
float(1.23)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
NULL
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
bool(true)
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
bool(false)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(3) {
[0]=>
string(1) "a"
[1]=>
string(1) "b"
[2]=>
string(1) "c"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(4) {
["a"]=>
string(1) "a"
["b"]=>
string(1) "b"
["c"]=>
string(1) "c"
[0]=>
string(4) "Zero"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(5) "never"
Success: throwable: Undefined constant "never"
--------------[ TESTCASE ]--------------
string(4) "void"
Success: throwable: Undefined constant "void"
--------------[ TESTCASE ]--------------
enum(SomeEnum::Spades)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#6 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#1 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#2 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#3 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(DateTimeImmutable)#7 (3) {
["date"]=>
string(26) "2026-01-30 13:31:14.006517"
["timezone_type"]=>
int(3)
["timezone"]=>
string(16) "Europe/Amsterdam"
}
Error: why is it not a return TypeError?
Output for 8.2.9
--------------[ TESTCASE ]--------------
string(9) "no-return"
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
string(15) "no-return-value"
Success: a return statement without a value is always valid.
--------------[ TESTCASE ]--------------
string(5) "$this"
Success: throwable: Using $this when not in object context
--------------[ TESTCASE ]--------------
object(ShouldTypeError)#4 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(11) "Const hello"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(3) "abc"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
int(1)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
float(1.23)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
NULL
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
bool(true)
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
bool(false)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(3) {
[0]=>
string(1) "a"
[1]=>
string(1) "b"
[2]=>
string(1) "c"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(4) {
["a"]=>
string(1) "a"
["b"]=>
string(1) "b"
["c"]=>
string(1) "c"
[0]=>
string(4) "Zero"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(5) "never"
Success: throwable: Undefined constant "never"
--------------[ TESTCASE ]--------------
string(4) "void"
Success: throwable: Undefined constant "void"
--------------[ TESTCASE ]--------------
enum(SomeEnum::Spades)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#6 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#1 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#2 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#3 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(DateTimeImmutable)#7 (3) {
["date"]=>
string(26) "2026-01-30 13:31:14.004375"
["timezone_type"]=>
int(3)
["timezone"]=>
string(16) "Europe/Amsterdam"
}
Error: why is it not a return TypeError?
Output for 8.2.8
--------------[ TESTCASE ]--------------
string(9) "no-return"
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
string(15) "no-return-value"
Success: a return statement without a value is always valid.
--------------[ TESTCASE ]--------------
string(5) "$this"
Success: throwable: Using $this when not in object context
--------------[ TESTCASE ]--------------
object(ShouldTypeError)#4 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(11) "Const hello"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(3) "abc"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
int(1)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
float(1.23)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
NULL
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
bool(true)
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
bool(false)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(3) {
[0]=>
string(1) "a"
[1]=>
string(1) "b"
[2]=>
string(1) "c"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(4) {
["a"]=>
string(1) "a"
["b"]=>
string(1) "b"
["c"]=>
string(1) "c"
[0]=>
string(4) "Zero"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(5) "never"
Success: throwable: Undefined constant "never"
--------------[ TESTCASE ]--------------
string(4) "void"
Success: throwable: Undefined constant "void"
--------------[ TESTCASE ]--------------
enum(SomeEnum::Spades)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#6 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#1 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#2 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#3 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(DateTimeImmutable)#7 (3) {
["date"]=>
string(26) "2026-01-30 13:31:14.004199"
["timezone_type"]=>
int(3)
["timezone"]=>
string(16) "Europe/Amsterdam"
}
Error: why is it not a return TypeError?
Output for 8.2.7
--------------[ TESTCASE ]--------------
string(9) "no-return"
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
string(15) "no-return-value"
Success: a return statement without a value is always valid.
--------------[ TESTCASE ]--------------
string(5) "$this"
Success: throwable: Using $this when not in object context
--------------[ TESTCASE ]--------------
object(ShouldTypeError)#4 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(11) "Const hello"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(3) "abc"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
int(1)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
float(1.23)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
NULL
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
bool(true)
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
bool(false)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(3) {
[0]=>
string(1) "a"
[1]=>
string(1) "b"
[2]=>
string(1) "c"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(4) {
["a"]=>
string(1) "a"
["b"]=>
string(1) "b"
["c"]=>
string(1) "c"
[0]=>
string(4) "Zero"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(5) "never"
Success: throwable: Undefined constant "never"
--------------[ TESTCASE ]--------------
string(4) "void"
Success: throwable: Undefined constant "void"
--------------[ TESTCASE ]--------------
enum(SomeEnum::Spades)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#6 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#1 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#2 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#3 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(DateTimeImmutable)#7 (3) {
["date"]=>
string(26) "2026-01-30 13:31:14.004312"
["timezone_type"]=>
int(3)
["timezone"]=>
string(16) "Europe/Amsterdam"
}
Error: why is it not a return TypeError?
Output for 8.2.6
--------------[ TESTCASE ]--------------
string(9) "no-return"
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
string(15) "no-return-value"
Success: a return statement without a value is always valid.
--------------[ TESTCASE ]--------------
string(5) "$this"
Success: throwable: Using $this when not in object context
--------------[ TESTCASE ]--------------
object(ShouldTypeError)#4 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(11) "Const hello"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(3) "abc"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
int(1)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
float(1.23)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
NULL
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
bool(true)
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
bool(false)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(3) {
[0]=>
string(1) "a"
[1]=>
string(1) "b"
[2]=>
string(1) "c"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(4) {
["a"]=>
string(1) "a"
["b"]=>
string(1) "b"
["c"]=>
string(1) "c"
[0]=>
string(4) "Zero"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(5) "never"
Success: throwable: Undefined constant "never"
--------------[ TESTCASE ]--------------
string(4) "void"
Success: throwable: Undefined constant "void"
--------------[ TESTCASE ]--------------
enum(SomeEnum::Spades)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#6 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#1 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#2 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#3 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(DateTimeImmutable)#7 (3) {
["date"]=>
string(26) "2026-01-30 13:31:14.004228"
["timezone_type"]=>
int(3)
["timezone"]=>
string(16) "Europe/Amsterdam"
}
Error: why is it not a return TypeError?
Output for 8.2.5
--------------[ TESTCASE ]--------------
string(9) "no-return"
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
string(15) "no-return-value"
Success: a return statement without a value is always valid.
--------------[ TESTCASE ]--------------
string(5) "$this"
Success: throwable: Using $this when not in object context
--------------[ TESTCASE ]--------------
object(ShouldTypeError)#4 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(11) "Const hello"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(3) "abc"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
int(1)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
float(1.23)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
NULL
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
bool(true)
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
bool(false)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(3) {
[0]=>
string(1) "a"
[1]=>
string(1) "b"
[2]=>
string(1) "c"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(4) {
["a"]=>
string(1) "a"
["b"]=>
string(1) "b"
["c"]=>
string(1) "c"
[0]=>
string(4) "Zero"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(5) "never"
Success: throwable: Undefined constant "never"
--------------[ TESTCASE ]--------------
string(4) "void"
Success: throwable: Undefined constant "void"
--------------[ TESTCASE ]--------------
enum(SomeEnum::Spades)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#6 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#1 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#2 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#3 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(DateTimeImmutable)#7 (3) {
["date"]=>
string(26) "2026-01-30 13:31:14.009888"
["timezone_type"]=>
int(3)
["timezone"]=>
string(16) "Europe/Amsterdam"
}
Error: why is it not a return TypeError?
Output for 8.2.4
--------------[ TESTCASE ]--------------
string(9) "no-return"
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
string(15) "no-return-value"
Success: a return statement without a value is always valid.
--------------[ TESTCASE ]--------------
string(5) "$this"
Success: throwable: Using $this when not in object context
--------------[ TESTCASE ]--------------
object(ShouldTypeError)#4 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(11) "Const hello"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(3) "abc"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
int(1)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
float(1.23)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
NULL
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
bool(true)
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
bool(false)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(3) {
[0]=>
string(1) "a"
[1]=>
string(1) "b"
[2]=>
string(1) "c"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(4) {
["a"]=>
string(1) "a"
["b"]=>
string(1) "b"
["c"]=>
string(1) "c"
[0]=>
string(4) "Zero"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(5) "never"
Success: throwable: Undefined constant "never"
--------------[ TESTCASE ]--------------
string(4) "void"
Success: throwable: Undefined constant "void"
--------------[ TESTCASE ]--------------
enum(SomeEnum::Spades)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#6 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#1 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#2 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#3 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(DateTimeImmutable)#7 (3) {
["date"]=>
string(26) "2026-01-30 13:31:14.007618"
["timezone_type"]=>
int(3)
["timezone"]=>
string(16) "Europe/Amsterdam"
}
Error: why is it not a return TypeError?
Output for 8.2.3
--------------[ TESTCASE ]--------------
string(9) "no-return"
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
string(15) "no-return-value"
Success: a return statement without a value is always valid.
--------------[ TESTCASE ]--------------
string(5) "$this"
Success: throwable: Using $this when not in object context
--------------[ TESTCASE ]--------------
object(ShouldTypeError)#4 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(11) "Const hello"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(3) "abc"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
int(1)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
float(1.23)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
NULL
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
bool(true)
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
bool(false)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(3) {
[0]=>
string(1) "a"
[1]=>
string(1) "b"
[2]=>
string(1) "c"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(4) {
["a"]=>
string(1) "a"
["b"]=>
string(1) "b"
["c"]=>
string(1) "c"
[0]=>
string(4) "Zero"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(5) "never"
Success: throwable: Undefined constant "never"
--------------[ TESTCASE ]--------------
string(4) "void"
Success: throwable: Undefined constant "void"
--------------[ TESTCASE ]--------------
enum(SomeEnum::Spades)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#6 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#1 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#2 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#3 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(DateTimeImmutable)#7 (3) {
["date"]=>
string(26) "2026-01-30 13:31:14.010620"
["timezone_type"]=>
int(3)
["timezone"]=>
string(16) "Europe/Amsterdam"
}
Error: why is it not a return TypeError?
Output for 8.2.2
--------------[ TESTCASE ]--------------
string(9) "no-return"
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
string(15) "no-return-value"
Success: a return statement without a value is always valid.
--------------[ TESTCASE ]--------------
string(5) "$this"
Success: throwable: Using $this when not in object context
--------------[ TESTCASE ]--------------
object(ShouldTypeError)#4 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(11) "Const hello"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(3) "abc"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
int(1)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
float(1.23)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
NULL
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
bool(true)
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
bool(false)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(3) {
[0]=>
string(1) "a"
[1]=>
string(1) "b"
[2]=>
string(1) "c"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(4) {
["a"]=>
string(1) "a"
["b"]=>
string(1) "b"
["c"]=>
string(1) "c"
[0]=>
string(4) "Zero"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(5) "never"
Success: throwable: Undefined constant "never"
--------------[ TESTCASE ]--------------
string(4) "void"
Success: throwable: Undefined constant "void"
--------------[ TESTCASE ]--------------
enum(SomeEnum::Spades)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#6 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#1 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#2 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#3 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(DateTimeImmutable)#7 (3) {
["date"]=>
string(26) "2026-01-30 13:31:14.010120"
["timezone_type"]=>
int(3)
["timezone"]=>
string(16) "Europe/Amsterdam"
}
Error: why is it not a return TypeError?
Output for 8.2.0
--------------[ TESTCASE ]--------------
string(9) "no-return"
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
string(15) "no-return-value"
Success: a return statement without a value is always valid.
--------------[ TESTCASE ]--------------
string(5) "$this"
Success: throwable: Using $this when not in object context
--------------[ TESTCASE ]--------------
object(ShouldTypeError)#4 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(11) "Const hello"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(3) "abc"
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
int(1)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
float(1.23)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
NULL
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
bool(true)
Success: without a return statement is always valid.
--------------[ TESTCASE ]--------------
bool(false)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(3) {
[0]=>
string(1) "a"
[1]=>
string(1) "b"
[2]=>
string(1) "c"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
array(4) {
["a"]=>
string(1) "a"
["b"]=>
string(1) "b"
["c"]=>
string(1) "c"
[0]=>
string(4) "Zero"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
string(5) "never"
Success: throwable: Undefined constant "never"
--------------[ TESTCASE ]--------------
string(4) "void"
Success: throwable: Undefined constant "void"
--------------[ TESTCASE ]--------------
enum(SomeEnum::Spades)
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#6 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#1 (0) {
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#2 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(Closure)#3 (1) {
["function"]=>
string(12) "SomeFunction"
}
Error: why is it not a return TypeError?
--------------[ TESTCASE ]--------------
object(DateTimeImmutable)#7 (3) {
["date"]=>
string(26) "2026-01-30 13:31:14.010001"
["timezone_type"]=>
int(3)
["timezone"]=>
string(16) "Europe/Amsterdam"
}
Error: why is it not a return TypeError?