From: Operating system: Irrelevant PHP version: Irrelevant Package: Class/Object related Bug Type: Feature/Change Request Bug description:make array to support mode class
Description: ------------ In my mind, we phper can thoroughly throw away the concept of Object(class instance), we only need Array and Mode Class: All arrays in initial mode support any array function as it's method: <?php $array1->array_flip(this); ?> Use "->mode()" to validate the minimal data set, and then switch mode class: <?php $array1->mode('class1', $success); ?> Any mode class has no "construct()" in it, but has "validate()" to validate the minimal data set. The array in a mode still could use array function as its method, but after using any of them the array will be switched back into basic array mode, and we need to use "->mode('class1', $success);" to switch mode back. The radical thought is data-centric programming, we need seperate the data(array) and the activity(class method). We could modify php engine, to get rid of parts of OO(object oriented), and support Mode Class, we could call it MyPHP. For example: $array_man1 could be set into two modes:cls_normal_man and cls_crazy_man: <?php $array_man1->mode('cls_normal_man')->normal_method1()->mode('cls_crazy_man')->crazy_method1(); ?> -- Edit bug report at https://bugs.php.net/bug.php?id=55617&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=55617&r=trysnapshot54 Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=55617&r=trysnapshot53 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=55617&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=55617&r=fixed Fixed in SVN and need be documented: https://bugs.php.net/fix.php?id=55617&r=needdocs Fixed in release: https://bugs.php.net/fix.php?id=55617&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=55617&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=55617&r=needscript Try newer version: https://bugs.php.net/fix.php?id=55617&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=55617&r=support Expected behavior: https://bugs.php.net/fix.php?id=55617&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=55617&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=55617&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=55617&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=55617&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=55617&r=dst IIS Stability: https://bugs.php.net/fix.php?id=55617&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=55617&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=55617&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=55617&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=55617&r=mysqlcfg