编程学问
  • 文章
  • 问题
  • 读书
  • 关于
  • 登录
  • « Threaded::count
  • Threaded::from »
  • PHP Manual
  • Threaded
  • Runtime Manipulation

Threaded::extend

(PECL pthreads >= 2.0.8)

Threaded::extend — Runtime Manipulation

说明

public Threaded::extend ( string $class ) : bool

Makes thread safe standard class at runtime

参数

class

The class to extend

返回值

A boolean indication of success

范例

Example #1 Runtime inheritance

<?php
class My {}

Threaded::extend(My::class);

$my = new My();

var_dump($my instanceof Threaded);
?>

以上例程会输出:

bool(true)

相关文章
php parallel the parallel runtime classphp commonmark node ast manipulationphp commonmark node ast manipulationphp commonmark node ast manipulationphp commonmark node ast manipulationphp commonmark node ast manipulationphp imap 函数 returns a tree of threaded messagephp php 选项/信息 函数 别名 set magic quotes runtimephp uopz 函数 extend a class at runtimephp uopz 函数 rename a function at runtimephp swoole server set the runtime settings of the swoole server.php threaded runtime manipulationphp threaded creationphp threaded 错误检测php threaded 状态检测php threaded 状态检测php threaded manipulationphp ui draw brush gradient stop manipulationphp ui draw brush gradient stop manipulationphp ui draw brush gradient stop manipulation
关注编程学问公众号
编程学问网 湘ICP备20001732号