|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2011-07-12 13:48 UTC] cataphract@php.net
-Status: Open
+Status: Bogus
[2011-07-12 13:48 UTC] cataphract@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Dec 04 06:00:01 2025 UTC |
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() ... }