Re: [PHP] Ver 5.0 Questions ...
Check these two nice articles on PHP5: http://www.sitepoint.com/print/1192 by Harry Fuecks [http://www.phppatterns.com] http://www.phpvolcano.com/articles/php5/index.php I was wondering if there is a timeline for version 5, if so where can I find it ... Also I am developing an application that I pass a lot of objects by reference, will that cause problems in version 5 ? As far as I can see in the http://www.php.net/zend-engine-2.php there is nothing there to suggest that this will be a problem thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Reference problem
I'm trying to build a tree of objects using PHP4, but I'm getting tangled in reference problems. Some test code that illustrates the problem: class X { var $parent; var $ident; var $kids; function X (&$parent,$number) { $this->parent = $parent; $this->ident = $number; $this->kids = array(); } } $root = new X($here,1); $here =& $root; for ($i = 2; $i < 5; $i++) { $elem = new X($here,$i); $here->kids[] = $elem; $here =& $elem; #--- ??? } print_r($root); I'm hoping for a structure where each node has a link to the parent node and an array of child nodes. Instead I get a recursive set of trees; removing the & on the line marked "???" means I get an empty kids array in the first child node. I've been sprinkling &'s around (and unsprinkling them ;-) and my head is starting to hurt. Can anyone tell me what I'm doing wrong here? TIA, - John English | mailto:[EMAIL PROTECTED] Senior Lecturer | http://www.it.bton.ac.uk/staff/je Dept. of Computing| ** NON-PROFIT CD FOR CS STUDENTS ** University of Brighton|-- see http://burks.bton.ac.uk - -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP and passwords
William Lovaton wrote: > > If you use just and .inc file any user with a browser can hit in the > URL: http://www.site.com/connect.inc and see what is inside. ...unless you keep your include directory outside the web tree (which is what I always do). That way the files can only be accessed by an include/require from a PHP script inside the web tree. ----- John English | mailto:[EMAIL PROTECTED] Senior Lecturer | http://www.it.bton.ac.uk/staff/je Dept. of Computing| ** NON-PROFIT CD FOR CS STUDENTS ** University of Brighton|-- see http://burks.bton.ac.uk - -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php