You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Closures cannot be serialised inside of arrays. This is because arrays are simply serialised with PHP's internal serialiser. Closures require special handling with serialisation, and so arrays will need to be serialised differently if this is going to work. The ph_hashtable_t type should be reusable for this, so it should be a matter of mapping PHP's hash table to phactor's hash table.
Example:
<?phpusephactor\{ActorSystem, Actor, ActorRef};
$as = newActorSystem(1);
class A extends Actor
{
publicfunction__construct(array$a){}
publicfunctionreceive(){}
}
$a = newActorRef(A::class, [[function(){}]], 'a');
ActorSystem::shutdown();
The text was updated successfully, but these errors were encountered:
Closures cannot be serialised inside of arrays. This is because arrays are simply serialised with PHP's internal serialiser. Closures require special handling with serialisation, and so arrays will need to be serialised differently if this is going to work. The
ph_hashtable_t
type should be reusable for this, so it should be a matter of mapping PHP's hash table to phactor's hash table.Example:
The text was updated successfully, but these errors were encountered: