Skip to content

Commit c807dd8

Browse files
committed
Fix some compilation issues
1 parent b350ae6 commit c807dd8

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

guide/src/macros/classes.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,10 +88,11 @@ The following example implements [`ArrayAccess`](https://www.php.net/manual/en/c
8888
# #![cfg_attr(windows, feature(abi_vectorcall))]
8989
# extern crate ext_php_rs;
9090
use ext_php_rs::prelude::*;
91-
use ext_php_rs::{exception::PhpException, zend::ce, types::Zval};
91+
use ext_php_rs::{exception::PhpResult, types::Zval, zend::ce};
9292
9393
#[php_class]
9494
#[implements(ce::arrayaccess())]
95+
#[derive(Default)]
9596
pub struct EvenNumbersArray;
9697
9798
/// Returns `true` if the array offset is an even number.
@@ -125,4 +126,9 @@ impl EvenNumbersArray {
125126
Err("Setting values is not supported".into())
126127
}
127128
}
129+
# #[php_module]
130+
# pub fn get_module(module: ModuleBuilder) -> ModuleBuilder {
131+
# module
132+
# }
133+
# fn main() {}
128134
```

0 commit comments

Comments
 (0)