You can compare CTypes if you want to know if the type are correct
\FFI::typeof(\FFI::addr($a)) == \FFI::typeof(\FFI::new("void *"))
CType need some methods, like equal() or toString(), but .....
PHP - Manual: FFI\CType
2024-11-14
(PHP 7 >= 7.4.0, PHP 8)
You can compare CTypes if you want to know if the type are correct
\FFI::typeof(\FFI::addr($a)) == \FFI::typeof(\FFI::new("void *"))
CType need some methods, like equal() or toString(), but .....