User Tools

Site Tools


hd:working_notes

This is an old revision of the document!


  • per-user settings can be stored in a more or less standard way using hook_user and/or user_save
  • something strange in PHP. It seems that global arrays defined in an INCLUDED files are local to the included file and their range disappears in the including file:

<php> <?php foo.php $ar = array('alice', 'bob') ; function baz() { global $ar ; echo is_array($ar) ? 'True' : 'False' ; } ?> </php> <php> <?php bar.php include 'foo.php';

baz(); ?> </php>

<php> <?php qux.php require 'foo.php'; baz(); ?> </php> * qux.php displays True as expected. * bar.php displays False instead of True as would seem logical. To be examined in more detail. * Tested with PHP 5.0.4

hd/working_notes.1129153607.txt.gz · Last modified: 2020/11/23 17:23 (external edit)