RE: [PHP-DEV] in latest CVS, Parser Drops out at 1000+ lines...[PROBLEMS WITH ISAPI]
| From: | James Moore | Date: | Tue, 29 Aug 2000 11:00:24 +0000 |
| Subject: | RE: [PHP-DEV] in latest CVS, Parser Drops out at 1000+ lines...[PROBLEMS WITH ISAPI] | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-31047@lists.php.net to get a copy of this message | ||
>
> <?
>
> require("class1.class");
> require("class2.class");
> this line should be in class2 -->require("class3.class");
>
>
>
> $class1p = new class1();
> $class2p = ....
> $class1p->somemethod($class2p);
>
>
>
>
> ?>
OK I cant get this to happen at all using RC1 (zeevs build), What version
are you using? What I have is the following (Its very convoluated.. perhaps
you could give me a pointer or try it on your system to see if the same
occurs again:
==== Test.php ====
<?php
require("class1.class");
require("class2.class");
$class1int = new class1();
$class2int = new class2();
$class1int->test($class2int, $class2int->class3);
?>
===================
===== class1.class ======
<?php
class class1 {
function test($class2, $class3) {
global $class2int, $class3int;
echo "========================<br>";
var_dump($class2);
echo "<br>========================<br>";
var_dump($class3);
echo "<br>========================<br>";
var_dump($class2int);
echo "<br>========================<br>";
var_dump($class3int);
echo "<br>========================<br>";
$class2->vardump();
}
}
?>
===========================
======== class2.class ==========
<?php
class class2 {
var $test = "hello";
var $num = 1;
var $class3;
function class2() {
global $class3int;
$this->test = "This is a test";
require("class3.class");
$this->class3 = new class3();
$class3int = new class3();
}
function vardump() {
var_dump($this);
}
}
?>
===================================
======== class3.class =============
<?php
class class3 {
var $class = "hello";
var $num = 1;
function class3() {
$this->class = "This is a test in class 3";
}
}
?>
=====================================
============== Output ===============
========================
object(class2)(3) { ["test"]=> string(14) "This is a test"
["num"]=> int(1)
["class3"]=> object(class3)(2) { ["class"]=> string(25) "This is a
test in
class 3" ["num"]=> int(1) } }
========================
object(class3)(2) { ["class"]=> string(25) "This is a test in class 3"
["num"]=> int(1) }
========================
object(class2)(3) { ["test"]=> string(14) "This is a test"
["num"]=> int(1)
["class3"]=> object(class3)(2) { ["class"]=> string(25) "This is a
test in
class 3" ["num"]=> int(1) } }
========================
object(class3)(2) { ["class"]=> string(25) "This is a test in class 3"
["num"]=> int(1) }
========================
object(class2)(3) { ["test"]=> string(14) "This is a test"
["num"]=> int(1)
["class3"]=> object(class3)(2) { ["class"]=> string(25) "This is a
test in
class 3" ["num"]=> int(1) } }
=====================================
I have had 3-5 people test this every time (Thanks to the folks on #php) so
there have been plently of users and still noone got an error.
I also tried this with IIS Cgi and once again no luck.
This does sound to me like a problem with your TSRM could you try (If you
have not already of course ;)) The latests RC1, you can get it from
http://www.php.net/~zeev/php-4.0.2-dev-Win32-22-8-2000.zip
and see if your
script works with that. If not can you please try and find the time to help
me reproduce this..
James