Req #55191 [Opn->Bgs]: PHP Object Oriented Approach
Edit report at https://bugs.php.net/bug.php?id=55191&edit=1
ID: 55191
Updated by: cataphract@php.net
Reported by: takingsides at gmail dot com
Summary: PHP Object Oriented Approach
-Status: Open
+Status: Bogus
Type: Feature/Change Request
Package: Unknown/Other Function
Operating System: -
PHP Version: Irrelevant
Block user comment: N
Private report: N
New Comment:
This is not the place for brainstorming; see the internals mailing list instead, though I can tell
you that essentially redesigning the language will not be seriously considered.
Previous Comments:
------------------------------------------------------------------------
[2011-07-12 12:58:34] takingsides at gmail dot com
Description:
------------
I was just wondering in the new version of PHP (PHP 6) I understand is becoming
more OOP based, such as C, Ruby etc. I was wondering if every single function is
going to be placed into an object?
This change request is simply to suggest an architecture for the new OOP
approach
to PHP, similarly to C/C++/C# and Ruby/Rails. Notonly implementing an OOP
approach, but also forcing strict typing.
$a = "0";
$b = 0;
var_dump( ($a == $b), ($a === $b) ); // bool(true) bool(false)
to make == act like == automatically so strings/ints/bools cannot compare as
TRUE?
--- Also: OOP ideas ---
$var = "test"; // basically becomes $test = new Object("test",
"string");
$var->strtolower(); // test.
$var->strtoupper(); // TEST.
$var->ucfirst()->substr(0, 2); // Te (st is cut off).
class Object {
protected $_var; // variable data
protected $_type; // string, int, bool, resource, etc.
public function __construct($element) ...
public function strtolower() {
// code
return $this;
}
public function strtoupper() ...
}
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=55191&edit=1
Thread (2 messages)