rfc:get_debug_type

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revisionBoth sides next revision
rfc:get_debug_type [2020/02/29 23:11] nikicrfc:get_debug_type [2020/03/01 13:21] marandall
Line 3: Line 3:
   * Date: 2020-02-15   * Date: 2020-02-15
   * Author: Mark Randall, marandall@php.net   * Author: Mark Randall, marandall@php.net
-  * Status: Under Discussion+  * Status: Voting
   * First Published at: https://wiki.php.net/rfc/get_debug_type   * First Published at: https://wiki.php.net/rfc/get_debug_type
  
Line 14: Line 14:
 $bar = $arr['key']; $bar = $arr['key'];
 if (!($bar instanceof Foo)) {  if (!($bar instanceof Foo)) { 
 +  // this shows the most simple of patterns, to get the real type an assoc array
 +  // must be present to convert long-form "integer" into int etc.
   throw new TypeError('Expected ' . Foo::class . ' got ' . (is_object($bar) ? get_class($bar) : gettype($bar)));   throw new TypeError('Expected ' . Foo::class . ' got ' . (is_object($bar) ? get_class($bar) : gettype($bar)));
 } }
Line 43: Line 45:
 PHP 8.0 PHP 8.0
  
-===== Proposed Voting Choices ===== +===== Voting =====
-Yes / no vote on adding the new function.+
  
-Yes / no on resource names be resolved - Would appear as resource(resource_type). +<doodle title="Add get_debug_type as described" auth="marandall" voteType="single" closed="false"> 
- +   * Yes 
-(Optional) A vote on the name, if there is not a clear majority consensus during RFC discussion.+   * No 
 +</doodle>
  
  
rfc/get_debug_type.txt · Last modified: 2020/08/01 23:41 by carusogabriel