Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions allowed_bindings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ bind! {
// ext_php_rs_zend_object_release,
// ext_php_rs_zend_string_init,
// ext_php_rs_zend_string_release,
// ext_php_rs_is_kown_valid_utf8,
// ext_php_rs_set_kown_valid_utf8,
// ext_php_rs_is_known_valid_utf8,
// ext_php_rs_set_known_valid_utf8,
object_properties_init,
php_error_docref,
php_info_print_table_end,
Expand Down
2 changes: 1 addition & 1 deletion guide/src/macros/function.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ pub fn greet(name: String, age: Option<i32>, description: Option<String>) -> Str
## Variadic Functions

Variadic functions can be implemented by specifying the last argument in the Rust
function to the type `&[&Zval]`. This is the equivelant of a PHP function using
function to the type `&[&Zval]`. This is the equivalent of a PHP function using
the `...$args` syntax.

```rust,no_run
Expand Down
6 changes: 3 additions & 3 deletions src/embed/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ impl Embed {
/// # Returns
///
/// * `Ok(())` - The script was executed successfully
/// * `Err(EmbedError)` - An error occured during the execution of the
/// * `Err(EmbedError)` - An error occurred during the execution of the
/// script
///
/// # Example
Expand Down Expand Up @@ -154,7 +154,7 @@ impl Embed {
match unsafe { *Box::from_raw(panic as *mut std::thread::Result<R>) } {
Ok(r) => r,
Err(err) => {
// we resume the panic here so it can be catched correctly by the test framework
// we resume the panic here so it can be caught correctly by the test framework
resume_unwind(err);
}
}
Expand All @@ -168,7 +168,7 @@ impl Embed {
/// # Returns
///
/// * `Ok(Zval)` - The result of the evaluation
/// * `Err(EmbedError)` - An error occured during the evaluation
/// * `Err(EmbedError)` - An error occurred during the evaluation
///
/// # Example
///
Expand Down
2 changes: 1 addition & 1 deletion src/macros.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//! Macros for interacting with PHP, mainly when the function takes variadic
//! arguments. Unforutunately, this is the best way to handle these.
//! arguments. Unfortunately, this is the best way to handle these.
//! Note that most of these will introduce unsafe into your code base.

/// Starts the PHP extension information table displayed when running
Expand Down
2 changes: 1 addition & 1 deletion src/types/array.rs
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ impl ZendHashTable {
/// Panics if memory for the hashtable could not be allocated.
pub fn with_capacity(size: u32) -> ZBox<Self> {
unsafe {
// SAFETY: PHP allocater handles the creation of the array.
// SAFETY: PHP allocator handles the creation of the array.
let ptr = _zend_new_array(size);

// SAFETY: `as_mut()` checks if the pointer is null, and panics if it is not.
Expand Down
2 changes: 1 addition & 1 deletion src/zend/globals.rs
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ impl ProcessGlobals {
///
/// # Panics
/// There is an outstanding issue with the implementation of this function.
/// Untill resolved, this function will allways panic.
/// Until resolved, this function will always panic.
///
/// - <https://github.com/davidcole1340/ext-php-rs/issues/331>
/// - <https://github.com/php/php-src/issues/16541>
Expand Down
2 changes: 1 addition & 1 deletion src/zend/try_catch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ fn do_try_catch<R, F: FnMut() -> R + RefUnwindSafe>(func: F, first: bool) -> Res
match unsafe { *Box::from_raw(panic as *mut std::thread::Result<R>) } {
Ok(r) => Ok(r),
Err(err) => {
// we resume the panic here so it can be catched correctly by the test framework
// we resume the panic here so it can be caught correctly by the test framework
resume_unwind(err);
}
}
Expand Down
2 changes: 1 addition & 1 deletion tests/src/integration/_utils.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ function assert_exception_thrown(callable $callback): void
} catch (\Throwable $th) {
return;
}
throw new Exception("Excption was not thrown", 255);
throw new Exception("Exception was not thrown", 255);
}