[PHP-DEV] Re: unset a reference of property object

2022-04-10 Thread Glash Gnome
se I think it's best never to show the reference : zval zdata; ZVAL_COPY(&zdata, Z_ISREF(intern->data) ? &Z_REF(intern->data)->val : &intern->data); zend_hash_str_update(debug_info, "data", sizeof("data")-1, &zdata); If I need to debug references/

[PHP-DEV] Re: unset a reference of property object

2022-04-09 Thread Glash Gnome
ebug_info; } my_handlers.get_debug_info = my_get_debug_info; struct _my {// intern structure zval data;// array of unsigned int zend_object std; }; Le sam. 9 avr. 2022 à 15:42, Glash Gnome a écrit : > Hello, > > I am developing a PHP extension. I can't reproduce the be

[PHP-DEV] unset a reference of property object

2022-04-09 Thread Glash Gnome
Hello, I am developing a PHP extension. I can't reproduce the behavior of references of Zend/PHP. Here is some Code illustrating Zend's behavior: baz; $foo->baz = [123];//set array has reference var_dump($foo); Output object(Foo)#1 (1) { ["baz"]=> &array(1) { [0]=> int(1

Re: [PHP-DEV] Why do PHP 8.1 extensions need PHP headers during make install (worked in <8.1)?

2021-12-09 Thread Glash Gnome
broken > since 8.1, and not what I'm talking about. > > > On Thu, Dec 9, 2021 at 4:53 PM Glash Gnome wrote: > > > > Thanks a lot. > > I use PHP 8.2.0-dev (cli) (built: Dec 8 2021 23:53:19) (NTS) > > And I can't reproduce the error with my build pro

Re: [PHP-DEV] Why do PHP 8.1 extensions need PHP headers during make install (worked in <8.1)?

2021-12-09 Thread Glash Gnome
:/tmp/build-ext-cairo/php-ext-cairo-src# ./configure > --prefix=/app/.heroku/php > … > > root@8f6813d6dc88:/tmp/build-ext-cairo/php-ext-cairo-src# make -j9 > … > Build complete. > Don't forget to run 'make test'. > > root@8f6813d6dc88:/tmp/build-ext-cai

Re: [PHP-DEV] Why do PHP 8.1 extensions need PHP headers during make install (worked in <8.1)?

2021-12-08 Thread Glash Gnome
ble standalone (think e.g. 'apt-get install php81-imagick'). > > > > On Thu, Dec 9, 2021 at 12:33 AM Glash Gnome wrote: > > > > Hello, > > > > Can you tell me what the program is in step 7) > > > > > package up > > > > Thanks y

Re: [PHP-DEV] Why do PHP 8.1 extensions need PHP headers during make install (worked in <8.1)?

2021-12-08 Thread Glash Gnome
Hello, Can you tell me what the program is in step 7) > package up Thanks you, Le mer. 8 déc. 2021 à 16:25, David Zuelke via internals < internals@lists.php.net> a écrit : > Hi all, > > When building shared extensions for PHP for the purpose of packaging > and distributing the builds, the bui

[PHP-DEV] Cache zend_function*

2021-11-28 Thread Glash Gnome
Hello internals, I'm doing the Cairo C API extension. Also there is a wrapper written in php for the OOP side( example: https://github.com/gtkphp/gtkphp/blob/main/lib/Cairo/Context.php) So far, so good. Now let's do the same thing with Gtk, (https://github.com/gtkphp/gtkphp/blob/main/lib/Gtk/Wid

[PHP-DEV] PHP RFC: Locked Classes

2021-11-05 Thread Glash Gnome
Hi internals, I was reading the RFC https://wiki.php.net/rfc/locked-classes Have you thought about the possibility of using the keyword "*struct*"? struct TestClass { // locked properties } class TestClass { // dynamic properties } Best regards,

[PHP-DEV] What is the equivalent of zend_object_store_get_object in PHP7/8

2021-04-02 Thread Glash Gnome
Internals, In the wiki( https://wiki.php.net/internals/engine/objects), there is an occurrence of "zend_object_store_get_object()". I looked in the github repository but I can't find its implementation. Do you have any information on this function ? - zend_object_store_get_object() - zend_objects_

Re: [PHP-DEV] [RFC] class_name:namespace

2021-02-26 Thread Glash Gnome
Hola Manuel, "Don't you think the same ?" I was thinking of something more generi, maybe : ``` namespace Foo\Bar; class A { static function getNamespace() { static $ns = __NAMESPACE__;// https://wiki.php.net/rfc/static_variable_inheritance return $ns; } } namespace My\

Re: [PHP-DEV] [RFC] Static variables in inherited methods

2021-02-25 Thread Glash Gnome
I can understand that some people coming from C++, Java may be shocked by the behavior of a static variable in a static function. And the need to improve things. Maybe can you add *virtual static* keywords as a replacement for old behavior in your RFC

Re: [PHP-DEV] [RFC] Static variables in inherited methods

2021-02-25 Thread Glash Gnome
Dears, Let me briefly introduce myself. I have been a C coder for 19 years, including 12 years with php. And I also do Java, C++, Javascript... from time to time. Nikita, What would the equivalent of this code be after RFC modification? a écrit : > Hi internals, > > While looking into various