Enable javascript to submit You have javascript disabled. You will not be able to edit any code.
Output for 8.4.1 - 8.4.14 , 8.4.16 , 8.5.0 - 8.5.1 Deprecated: {closure:/in/pnXfM:9}(): Implicitly marking parameter $str as nullable is deprecated, the explicit nullable type must be used instead in /in/pnXfM on line 9
parameter allowsNull isOptional getDefaultValue getType
$str true false throws ReflectionException null
$str = 'hello' true true hello null
string $str false false throws ReflectionException ReflectionNamedType
?string $str = NULL true true ReflectionNamedType
?string $str true false throws ReflectionException ReflectionNamedType
?Database $db true false throws ReflectionException ReflectionNamedType
Database $db = new \Database() false true Database Object() ReflectionNamedType
?string $str true false throws ReflectionException ReflectionNamedType
string $str = 'hello' false true hello ReflectionNamedType
?string $str = 'hello' true true hello ReflectionNamedType
string|int $str false false throws ReflectionException ReflectionUnionType
?string $str = NULL true true ReflectionNamedType
?string $str = 'hello' true true hello ReflectionNamedType
Output for 8.4.15 /bin/php-8.4.15: /usr/lib/libm.so.6: version `GLIBC_2.38' not found (required by /bin/php-8.4.15)
/bin/php-8.4.15: /usr/lib/libm.so.6: version `GLIBC_2.35' not found (required by /bin/php-8.4.15)
/bin/php-8.4.15: /usr/lib/libc.so.6: version `GLIBC_2.34' not found (required by /bin/php-8.4.15)
/bin/php-8.4.15: /usr/lib/libc.so.6: version `GLIBC_2.38' not found (required by /bin/php-8.4.15)
Process exited with code 1 . Output for 8.1.30 - 8.1.33 , 8.2.10 - 8.2.29 , 8.3.0 - 8.3.28 parameter allowsNull isOptional getDefaultValue getType
$str true false throws ReflectionException null
$str = 'hello' true true hello null
string $str false false throws ReflectionException ReflectionNamedType
?string $str = NULL true true ReflectionNamedType
?string $str true false throws ReflectionException ReflectionNamedType
?Database $db true false throws ReflectionException ReflectionNamedType
Database $db = new \Database() false true Database Object() ReflectionNamedType
?string $str true false throws ReflectionException ReflectionNamedType
string $str = 'hello' false true hello ReflectionNamedType
?string $str = 'hello' true true hello ReflectionNamedType
string|int $str false false throws ReflectionException ReflectionUnionType
?string $str = NULL true true ReflectionNamedType
?string $str = 'hello' true true hello ReflectionNamedType
Output for 8.0.11 Fatal error: Constant expression contains invalid operations in /in/pnXfM on line 12
Process exited with code 255 . Output for 7.1.6 , 7.4.33 Parse error: syntax error, unexpected '|', expecting variable (T_VARIABLE) in /in/pnXfM on line 13
Process exited with code 255 . Output for 5.6.40 Parse error: syntax error, unexpected '?', expecting variable (T_VARIABLE) in /in/pnXfM on line 10
Process exited with code 255 . Output for 5.4.43 , 5.5.11 Parse error: syntax error, unexpected '?', expecting '&' or variable (T_VARIABLE) in /in/pnXfM on line 10
Process exited with code 255 .