ext-php-rs/example/skel/test.php
David 349d497793
Added ability to throw exceptions (#21)
* Exceptions have static lifetimes

* Added functions for throwing exceptions

Changed the `ClassEntry` implementation to unwrap the result before
returning, as these types are guaranteed to be valid. Also replaced the
'a lifetime with 'static lifetimes.
2021-04-18 15:52:02 +12:00

13 lines
219 B
PHP

<?php
$x = new TestClass();
skeleton_version(1, 2);
var_dump($x->call(function ($v1, $v2) {
// var_dump($v1, $v2);
// echo "Hello, world! I'm a callable.".PHP_EOL;
// return "Ok rust";
return 0;
}));