File tree Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -519,15 +519,17 @@ impl ZendHashTable {
519519 /// # Example
520520 ///
521521 /// ```no_run
522- /// use ext_php_rs::types::ZendHashTable;
522+ /// use ext_php_rs::types::{ ZendHashTable, ArrayKey} ;
523523 ///
524524 /// let mut ht = ZendHashTable::new();
525525 ///
526526 /// for (key, val) in ht.iter() {
527- /// // ^ Index if inserted at an index.
528- /// // ^ Optional string key, if inserted like a hashtable.
529- /// // ^ Inserted value.
530- ///
527+ /// match &key {
528+ /// ArrayKey::Long(index) => {
529+ /// }
530+ /// ArrayKey::String(key) => {
531+ /// }
532+ /// }
531533 /// dbg!(key, val);
532534 /// }
533535 #[ inline]
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ mod object;
1313mod string;
1414mod zval;
1515
16- pub use array:: ZendHashTable ;
16+ pub use array:: { ArrayKey , ZendHashTable } ;
1717pub use callable:: ZendCallable ;
1818pub use class_object:: ZendClassObject ;
1919pub use iterable:: Iterable ;
You can’t perform that action at this time.
0 commit comments