string(3) "xyz"
Warning: foo(): Argument #1 ($str) must be passed by reference, value given in /in/OEOA1 on line 12
string(3) "abc"
Warning: foo(): Argument #1 ($str) must be passed by reference, value given in /in/OEOA1 on line 15
string(3) "abc"
Warning: foo(): Argument #1 ($str) must be passed by reference, value given in /in/OEOA1 on line 21
array(3) {
[0]=>
string(3) "abc"
[1]=>
string(3) "abc"
[2]=>
string(3) "abc"
}
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.
string(3) "xyz"
Warning: Parameter 1 to foo() expected to be a reference, value given in /in/OEOA1 on line 12
string(3) "abc"
Warning: Parameter 1 to foo() expected to be a reference, value given in /in/OEOA1 on line 15
string(3) "abc"
Warning: Parameter 1 to foo() expected to be a reference, value given in /in/OEOA1 on line 21
array(3) {
[0]=>
string(3) "abc"
[1]=>
string(3) "abc"
[2]=>
string(3) "abc"
}
Output for 7.0.0 - 7.0.8, 7.0.10 - 7.0.20
string(3) "xyz"
string(3) "xyz"
string(3) "abc"
Warning: Parameter 1 to foo() expected to be a reference, value given in /in/OEOA1 on line 21
array(3) {
[0]=>
string(3) "abc"
[1]=>
string(3) "abc"
[2]=>
string(3) "abc"
}
Output for 7.0.9
string(3) "xyz"
Warning: Parameter 1 to foo() expected to be a reference, value given in /in/OEOA1 on line 12
string(3) "abc"
string(3) "abc"
Warning: Parameter 1 to foo() expected to be a reference, value given in /in/OEOA1 on line 21
array(3) {
[0]=>
string(3) "abc"
[1]=>
string(3) "abc"
[2]=>
string(3) "abc"
}
Output for 5.6.0 - 5.6.26
string(3) "xyz"
Warning: Parameter 1 to foo() expected to be a reference, value given in /in/OEOA1 on line 12
string(3) "abc"
string(3) "abc"
array(3) {
[0]=>
string(3) "abc"
[1]=>
string(3) "abc"
[2]=>
string(3) "abc"
}