我爱占星网 我爱占星网
首页
编程
java
php
前端
首页 编程 java php 前端

PHP C扩展,利用Late Static Binding

I'm trying to figure out how to make use of late static binding within a PHP C-extension,

Example, I want to recreate this method:

public final static function create() {
    return new static;
}

How is this possible using the Zend Engine?

EDIT:

I finally got the answer (from http://www.kchodorow.com/blog/2011/08/11/php-extensions-made-eldrich-classes/), within my create method I have this:

zend_class_entry *ce = NULL ;
ce = EG(called_scope);
object_init_ex(return_value, ce);

:) Thanks.

近期文章

  • 搜索系统不搜索姓名和姓氏
  • Paypal与cart66的运输计算器连接
  • PHP PDO登录脚本不起作用。 包含错误
  • php symfony doctrine或从2个表中获取数据
  • 仅在一台计算机上的网页上出现500错误
  • 如何使用Magento的Position框来订购数组
  • 如何上传使用php创建的csv文件?
  • 如何获得paypal自适应支付IPN帖子?
  • APACHE 2.4.4.0 CRASH,模块php5ts.dll(PHP 5.4.19)
  • PHP Oracle Pagination Cant使用ROWNUM显示数据
  • 使用“LIKE”匹配mysql查询中的多个单词
  • PHP电子邮件像素跟踪在雅虎邮件中不起作用
  • 使用单个php表单将数据添加到两个表
  • 删除Codeigniter中文件上传中的扩展名
  • 如果不等于WordPress PHP但是如果大于
  • 如何使用php制作curl类型的http请求?
  • MySQL执行对唯一列组合的检查
  • 我需要CodeIgniter的帮助,从数据库中获取数据
  • 如何通过mysqli_multi_query()插入多行?
  • cURL无法使用Minecraft API代理

Copyright ©2022 我爱占星 All Rights Reserved.

浙ICP备2022030071号-1

部分图文来自网络,如有侵犯您的版权,请告诉我们删除

友情链接:代码精华