Opened 3 years ago
Closed 2 years ago
#238 closed defect (worksforme)
if and else execute together! (class extends)
| Reported by: | ehsanch | Owned by: | moo |
|---|---|---|---|
| Priority: | critical | Milestone: | 1.3.2 |
| Component: | cacher | Version: | 1.3.0 |
| Keywords: | Cc: | ||
| Application: | PHP Version: | tested on 5.2.6 | |
| Other Exts: | SAPI: | FastCGI | |
| Probability: | Always | Blocked By: | |
| Blocking: |
Description
i create a simple php script :
<?php
class newclass {
public function newfunc() {
echo 'class exist';
}
}
if (true) {
class myclass1 extends newclass {}
}
else {
class myclass2 extends newclass {}
}
$test = new myclass2;
$test->newfunc();
[root@server]# php test.php
Fatal error: Class 'myclass2' not found in test.php on line 15
[root@server]# php-cgi test.php
X-Powered-By: PHP/5.2.6
Content-type: text/html
class exist
Change History (2)
comment:1 Changed 3 years ago by moo
- Status changed from new to assigned
comment:2 Changed 2 years ago by moo
- Resolution set to worksforme
- Status changed from assigned to closed
Note: See
TracTickets for help on using
tickets.


pls try 1.3.1 or 1.3.2 or svn branches/1.3