If you don't understand, why do parameters in methods like exec (), preg_match_all () have output without declaring variables?

for example:

$str = "123123";
preg_match_all("/(\d*)/", $str, $arr);
var_dump($arr);

or:

exec("date", $output);
var_dump($output);

this is not declared $output , and can be output as $arr ? What is the reason for this?

add

<?php
var_dump($res);   // ,

//
function test(&$a){
        $aPP;
}

test($a);
echo $a;   //  1% 
Php
May.12,2021

you can, too.

function fun($a,&$b)
{
    $b = $a;
}
fun(1,$x);
var_dump($x);

Variables in

php do not need to be declared before use, and for output variables that pass addresses, initializes is not necessary if you do not use initial values.

see
http://php.net/manual/en/lang.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b4077d-2c511.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b4077d-2c511.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?