#1: hello
Fatal error: Uncaught TypeError: Cannot access offset of type string on string in /in/XVA87:4
Stack trace:
#0 {main}
thrown in /in/XVA87 on line 4
Process exited with code 255.
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.3.28
/bin/php-8.3.28: /usr/lib/libm.so.6: version `GLIBC_2.38' not found (required by /bin/php-8.3.28)
/bin/php-8.3.28: /usr/lib/libm.so.6: version `GLIBC_2.35' not found (required by /bin/php-8.3.28)
/bin/php-8.3.28: /usr/lib/libc.so.6: version `GLIBC_2.34' not found (required by /bin/php-8.3.28)
/bin/php-8.3.28: /usr/lib/libc.so.6: version `GLIBC_2.38' not found (required by /bin/php-8.3.28)
Process exited with code 1.
Output for 7.4.0 - 7.4.33
#1: hello
Warning: Illegal string offset 'test' in /in/XVA87 on line 4
string(1) "h"
Notice: String offset cast occurred in /in/XVA87 on line 5
string(1) "h"
Notice: String offset cast occurred in /in/XVA87 on line 6
string(1) "e"
string(1) "l"
#2: 42
Notice: Trying to access array offset on value of type int in /in/XVA87 on line 11
NULL
Notice: Trying to access array offset on value of type int in /in/XVA87 on line 12
NULL
Notice: Trying to access array offset on value of type int in /in/XVA87 on line 13
NULL
#2: null
Notice: Trying to access array offset on value of type null in /in/XVA87 on line 17
NULL
Notice: Trying to access array offset on value of type null in /in/XVA87 on line 18
NULL
Notice: Trying to access array offset on value of type null in /in/XVA87 on line 19
NULL
Have fun with it...
best regards,
your PHP
Output for 7.3.32 - 7.3.33
#1: hello
Warning: Illegal string offset 'test' in /in/XVA87 on line 4
string(1) "h"
string(1) "h"
string(1) "e"
string(1) "l"
#2: 42
NULL
NULL
NULL
#2: null
NULL
NULL
NULL
Have fun with it...
best regards,
your PHP
#1: hello
Warning: Illegal string offset 'test' in /in/XVA87 on line 4
string(1) "h"
Notice: String offset cast occurred in /in/XVA87 on line 5
string(1) "h"
Notice: String offset cast occurred in /in/XVA87 on line 6
string(1) "e"
string(1) "l"
#2: 42
NULL
NULL
NULL
#2: null
NULL
NULL
NULL
Have fun with it...
best regards,
your PHP