#39635 [NEW]: Better control for serialization (keyword for permit property serialization)

Ask a Question related to PHP Bugs, Design and Development.

  1. #1

    Default #39635 [NEW]: Better control for serialization (keyword for permit property serialization)

    From: t dot prochazka at centrum dot cz
    Operating system: all
    PHP version: 5CVS-2006-11-26 (CVS)
    PHP Bug Type: Feature/Change Request
    Bug description: Better control for serialization (keyword for permit property serialization)

    Description:
    ------------
    PHP has no advanced support for serialization.

    I think, that is problem, that PHP serialize all properties. What about
    add single keyword (as transient) for property which can't be
    serializable?

    Example:

    class Foo {

    public $a;
    public transient $b;

    }

    Description of Java transient keyword:

    [url]http://java.sun.com/docs/books/jls/second_edition/html/classes.doc.html#78119[/url]


    --
    Edit bug report at [url]http://bugs.php.net/?id=39635&edit=1[/url]
    --
    Try a CVS snapshot (PHP 4.4): [url]http://bugs.php.net/fix.php?id=39635&r=trysnapshot44[/url]
    Try a CVS snapshot (PHP 5.2): [url]http://bugs.php.net/fix.php?id=39635&r=trysnapshot52[/url]
    Try a CVS snapshot (PHP 6.0): [url]http://bugs.php.net/fix.php?id=39635&r=trysnapshot60[/url]
    Fixed in CVS: [url]http://bugs.php.net/fix.php?id=39635&r=fixedcvs[/url]
    Fixed in release: [url]http://bugs.php.net/fix.php?id=39635&r=alreadyfixed[/url]
    Need backtrace: [url]http://bugs.php.net/fix.php?id=39635&r=needtrace[/url]
    Need Reproduce Script: [url]http://bugs.php.net/fix.php?id=39635&r=needscript[/url]
    Try newer version: [url]http://bugs.php.net/fix.php?id=39635&r=oldversion[/url]
    Not developer issue: [url]http://bugs.php.net/fix.php?id=39635&r=support[/url]
    Expected behavior: [url]http://bugs.php.net/fix.php?id=39635&r=notwrong[/url]
    Not enough info: [url]http://bugs.php.net/fix.php?id=39635&r=notenoughinfo[/url]
    Submitted twice: [url]http://bugs.php.net/fix.php?id=39635&r=submittedtwice[/url]
    register_globals: [url]http://bugs.php.net/fix.php?id=39635&r=globals[/url]
    PHP 3 support discontinued: [url]http://bugs.php.net/fix.php?id=39635&r=php3[/url]
    Daylight Savings: [url]http://bugs.php.net/fix.php?id=39635&r=dst[/url]
    IIS Stability: [url]http://bugs.php.net/fix.php?id=39635&r=isapi[/url]
    Install GNU Sed: [url]http://bugs.php.net/fix.php?id=39635&r=gnused[/url]
    Floating point limitations: [url]http://bugs.php.net/fix.php?id=39635&r=float[/url]
    No Zend Extensions: [url]http://bugs.php.net/fix.php?id=39635&r=nozend[/url]
    MySQL Configuration Error: [url]http://bugs.php.net/fix.php?id=39635&r=mysqlcfg[/url]
    t dot prochazka at centrum dot cz Guest

  2. Similar Questions and Discussions

    1. Custom control code serialization to class file
      I have a custom control that includes a custom collection. In the collection editor, I add a new item to the collection and that item gets...
    2. server control serialization problem with UiTypeEditor
      Have a expandable property that is passed to a uitypeeditor which the property does not get serialized. Value from uitypeeditor updates in the...
    3. Serialization of an inherited property.
      Hopefully this is the right group. I am getting the following exeption: Member 'PPRP602AType.RPLY_HEADER' hides inherited member...
    4. serialization problem - eventhandling by control
      Hi folks! I am developing a custom TreeView and I have got a problem with the serialization of my TreeViewModel: public class...
    5. avoiding XML serialization, different WSDL generation, soap serialization
      Hello, I think my problem is interesting for most of developers who wish to exchange actual business entities with webservices, not just xml...
  3. #2

    Default #39635 [Com]: Better control for serialization (keyword for permit property serialization)

    ID: 39635
    Comment by: spam at thishell dot com
    Reported By: t dot prochazka at centrum dot cz
    Status: Open
    Bug Type: Feature/Change Request
    Operating System: all
    PHP Version: 5CVS-2006-11-26 (CVS)
    New Comment:

    While it is possible to exclude members from serialization using
    __sleep(), it has downsides:
    - Using get_object_vars($this) to return the members is extremely slow
    - Manually maintaining an array with the members is error prone and can
    be quite some work

    A transient keyword to exclude members from serialization would make it
    easier ...


    Previous Comments:
    ------------------------------------------------------------------------

    [2006-11-26 11:40:40] t dot prochazka at centrum dot cz

    Description:
    ------------
    PHP has no advanced support for serialization.

    I think, that is problem, that PHP serialize all properties. What about
    add single keyword (as transient) for property which can't be
    serializable?

    Example:

    class Foo {

    public $a;
    public transient $b;

    }

    Description of Java transient keyword:

    [url]http://java.sun.com/docs/books/jls/second_edition/html/classes.doc.html#78119[/url]



    ------------------------------------------------------------------------


    --
    Edit this bug report at [url]http://bugs.php.net/?id=39635&edit=1[/url]
    spam at thishell dot com Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139