From: Operating system: - PHP version: Irrelevant Package: Unknown/Other Function Bug Type: Feature/Change Request Bug description:PHP Object Oriented Approach
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 bug report at https://bugs.php.net/bug.php?id=55191&edit=1 -- Try a snapshot (PHP 5.2): https://bugs.php.net/fix.php?id=55191&r=trysnapshot52 Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=55191&r=trysnapshot53 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=55191&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=55191&r=fixed Fixed in SVN and need be documented: https://bugs.php.net/fix.php?id=55191&r=needdocs Fixed in release: https://bugs.php.net/fix.php?id=55191&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=55191&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=55191&r=needscript Try newer version: https://bugs.php.net/fix.php?id=55191&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=55191&r=support Expected behavior: https://bugs.php.net/fix.php?id=55191&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=55191&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=55191&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=55191&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=55191&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=55191&r=dst IIS Stability: https://bugs.php.net/fix.php?id=55191&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=55191&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=55191&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=55191&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=55191&r=mysqlcfg Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=55191&r=trysnapshot54