Warum kann PHP keinen spitzen Wert als globale Variable behalten?Kann eine globale PHP-Variable auf einen Zeiger gesetzt werden?
<?php
$a = array();
$a[] = 'works';
function myfunc() {
global $a, $b ,$c;
$b = $a[0];
$c = &$a[0];
}
myfunc();
echo ' $b '.$b; //works
echo ', $c '.$c; //fails
?>
siehe diese Seite http://stackoverflow.com/questions/746224/are-there-pointers-in-php –