#27656 [Bgs]: array problems and objects $this
| From: | emanuel at oxylus dot ro | Date: | Fri, 19 Mar 2004 12:07:22 +0000 |
| Subject: | #27656 [Bgs]: array problems and objects $this | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-56675@lists.php.net to get a copy of this message | ||
ID: 27656
User updated by: emanuel at oxylus dot ro
Reported By: emanuel at oxylus dot ro
Status: Bogus
Bug Type: Scripting Engine problem
Operating System: Redhat 9/Apache 1.3.29
PHP Version: 5.0.0RC1
New Comment:
What about the backward compatibility ? php4-5?
Isnt suposed to work all what was made using php4 in php5 ?
Thanks.
Previous Comments:
------------------------------------------------------------------------
[2004-03-19 06:50:36] derick@php.net
Sorry, but your problem does not imply a bug in PHP itself. For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system
is not the
appropriate forum for asking support questions.
Thank you for your interest in PHP.
You can never nest functions like you did.
------------------------------------------------------------------------
[2004-03-19 06:41:20] emanuel at oxylus dot ro
Description:
------------
I'm getting this error in php5rc1
Fatal error: Cannot use string offset as an array in
/www/base/modules/eshop/module.php on line 374
count($product["prices"][1]["prices"])>0 , which worked in 4.x
its kinda too hard to check step by step to be sure is array
["prices"], then ["prices"]["1"] and then
["prices"][1]["prices"]
The second problem is with some objects:
this is the code:
<?php
class CObject {
function Test() {
$this->var1 = "test";
function Test2( $this ) {
echo $this->var1;
}
Test2(&$this);
}
}
$test = new CObject;
$test->Test();
?>
in php4.x the output is "test"
in 5rc1
Fatal error: Non-static method CObject::Test2() cannot be called
statically in /home/www/work.phpbase.net/obj/test.php on line 13
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=27656&edit=1