编程学问
  • 文章
  • 问题
  • 读书
  • 关于
  • 登录
  • « 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 pht the threaded interfacephp commonmark node ast manipulationphp commonmark node ast manipulationphp php 选项/信息 函数 设置当前 magic quotes runtime 配置选项的激活状态php uopz 函数 implements an interface at runtimephp uopz 函数 rename a function at runtimephp locale sets the default runtime localephp parallel runtime runtime constructionphp parallel runtime runtime joinphp parallel runtime parallel executionphp pht runnable the entry point of a threaded classphp threaded 操作php threaded 操作php threaded runtime manipulationphp threaded manipulationphp threaded 同步控制php threaded 同步控制php threaded synchronizationphp ui draw brush gradient stop manipulationphp ui executor interval manipulation
关注编程学问公众号
编程学问网 湘ICP备20001732号