mirror of
https://github.com/YunoHost-Apps/z-push_ynh.git
synced 2024-09-03 18:05:58 +02:00
29 lines
547 B
PHP
29 lines
547 B
PHP
<?php
|
|
|
|
function test_function(&$text) {
|
|
echo "Text is $text\n";
|
|
$text = "Something new";
|
|
}
|
|
|
|
$testing = "Something";
|
|
$existing = "Existing";
|
|
$nullset = null;
|
|
|
|
test_function(($testing === null ? $testing : $existing));
|
|
test_function(($nullset === null ? $existing : $nullset));
|
|
|
|
if ($testing === null) {
|
|
test_function($testing);
|
|
}
|
|
else {
|
|
test_function($existing);
|
|
// $existing should have a new value after this, but it doesn't
|
|
}
|
|
|
|
if ($nullset === null) {
|
|
test_function($existing);
|
|
}
|
|
else {
|
|
test_function($nullset);
|
|
}
|
|
?>
|