<?php class Foo { protected $foo = 'foo'; public string $bar { get { $return = $this->foo; if (Fiber::getCurrent()) { Fiber::suspend(); } print ($return); return $return; } } } $foo = new Foo(); $fiber = new Fiber(function () use ($foo) { $foo->bar; }); $value = $fiber->start(); $foo->bar; $fiber->resume('test');
You have javascript disabled. You will not be able to edit any code.