MadelineProto/src/Volatile.php

16 lines
306 B
PHP
Raw Normal View History

<?php
2017-05-16 21:19:42 +01:00
2017-05-16 20:19:54 +00:00
if (!extension_loaded('pthreads')) {
class Volatile extends Threaded
{
public function __set($offset, $value)
{
if ($offset === null) {
2017-05-17 21:51:39 +00:00
$offset = count((array) $this);
2017-05-16 20:19:54 +00:00
}
2017-05-16 21:19:42 +01:00
2017-05-17 22:51:13 +01:00
return $this->{$offset} = $value;
2017-05-16 20:19:54 +00:00
}
}
}