On 24 July 2018 at 00:13, Johannes Findeisen <mail...@hanez.org> wrote:
> Hello,
>
> Are there any good information somewhere on how to do porting right?

A lot of information is here: https://wiki.php.net/phpng-upgrading


> Is it possible to port it to PHP7  and stay PHP5 compatible?

Yes, through the copious use of macros.

The source for Imagick compiles against 5.3 to 7.3 with the use of
macros https://github.com/mkoppanen/imagick

The only parts that were difficult to do on a line-by-line level were
the pieces of code that operate over arrays, where the code has
changed so much it was easier to duplicate the whole functions, rather
than wrapping individual lines in #ifdef's.

I don't read this mailing list frequently - feel free to ping me on
twitter if you have a specific question about a difficult bit
https://twitter.com/MrDanack/

cheers
Dan
Ack

-- 
PECL development discussion Mailing List (http://pecl.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to