rfc:debug-info

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
rfc:debug-info [2014/01/22 12:02] – Revision 1.1, Rename to __debugInfo(), Add Alternates/Expansion headings pollitarfc:debug-info [2017/09/22 13:28] (current) – external edit 127.0.0.1
Line 4: Line 4:
   * Date: 2014-01-21   * Date: 2014-01-21
   * Author: Sara Golemon, pollita@php.net   * Author: Sara Golemon, pollita@php.net
-  * Status: Under Discussion+  * Status: Accepted (implemented in 5.6)
   * First Published at: http://wiki.php.net/rfc/debug-info   * First Published at: http://wiki.php.net/rfc/debug-info
  
Line 54: Line 54:
 ===== Alternates under discussion ===== ===== Alternates under discussion =====
  
-  * Rather than use __debugInfo() as the whole property info result, either merge it with the properties table or stuff it into a "__debugInfo" property and return it with the full properties table.+  * Rather than use <nowiki>__debugInfo() as the whole property info result, either merge it with the properties table or stuff it into a "__debugInfo"</nowiki> property and return it with the full properties table.
  
-IMO, this takes control away from the user and removes a particularly useful reason for having the __debugInfo() magic method in the first place.  Consider an object which points at itself (or more likely, another object which points back at the original).  This normally results in a recursive loop.  This is detected by the var_dump() routine, but only after a couple cycles.  A more intelligent __debugInfo() output could avoid any iterations of the loop.+IMO, this takes control away from the user and removes a particularly useful reason for having the <nowiki>__debugInfo() magic method in the first place.  Consider an object which points at itself (or more likely, another object which points back at the original).  This normally results in a recursive loop.  This is detected by the var_dump() routine, but only after a couple cycles.  A more intelligent __debugInfo() output could avoid any iterations of the loop.</nowiki>
  
 ===== Potential expansions of scope ===== ===== Potential expansions of scope =====
  
-  * Add ReflectionClass::getDebugInfo() to return the result of zend_object_handlers->get_debug_info as an array of ReflectionParameter objects+  * Add ReflectionObject::getDebugInfo() to return the result of zend_object_handlers->get_debug_info as an array of ReflectionParameter objects
  
 ===== Revision History ===== ===== Revision History =====
  
-  * 1.1 (2014-01-22) - Changed name from __debug_info to __debugUnfo and added alternates/expansion headings+  * 1.1 (2014-01-22) - Changed name from <nowiki>__debug_info to __debugInfo</nowiki> and added alternates/expansion headings
   * 1.0 (2014-01-21) - Initial Revision   * 1.0 (2014-01-21) - Initial Revision
 +
 +===== Vote 1 =====
 +
 +  * Vote start: 2014/02/03
 +  * Vote end: 2014/02/17
 +
 +Vote [YES] to merge the <nowiki>__debugInfo()</nowiki> patch.  See Vote 2 for options on what name it will have.
 +
 +<doodle title="Merge ___debugInfo()" auth="pollita" voteType="single" closed="true">
 +   * Yes (5.6)
 +   * Yes (5.7)
 +   * No
 +</doodle>
 +
 +===== Vote 2 =====
 +
 +  * Vote start: 2014/02/03
 +  * Vote end: 2014/02/17
 +
 +If Vote 1 passes, what should the userland magic method be called?
 +
 +<doodle title="Name ___debugInfo()" auth="pollita" voteType="single" closed="true">
 +   * __debugInfo()
 +   * __debug()
 +</doodle>
  
 ===== Implementation ===== ===== Implementation =====
rfc/debug-info.1390392129.txt.gz · Last modified: 2017/09/22 13:28 (external edit)