Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

each() function is deprecated in php 7.2.0 #6

Open
ghost opened this issue Dec 5, 2017 · 7 comments
Open

each() function is deprecated in php 7.2.0 #6

ghost opened this issue Dec 5, 2017 · 7 comments

Comments

@ghost
Copy link

ghost commented Dec 5, 2017

I just updating my php version to 7.2.0, and it seems the each function is deprecated in this version. http://php.net/manual/en/function.each.php

@stevenjoezhang
Copy link

I replaced while \( list\( (.*), (.*) \) = each\( (.*) \) \) \{ with foreach ( $3 as $1 => $2 ) { in src/phpf.php to avoid this problem, but when I tried to run it with PHP 7.2.12, a fatal error occured:
Allowed memory size of 134217728 bytes exhausted (tried to allocate 16777224 bytes)
I don't know why nor how to fix it.

@saurabh-cimpress
Copy link

I tried the same thing and got the same error for PHP 7.3
Did you get any solution for this?

I replaced while \( list\( (.*), (.*) \) = each\( (.*) \) \) \{ with foreach ( $3 as $1 => $2 ) { in src/phpf.php to avoid this problem, but when I tried to run it with PHP 7.2.12, a fatal error occured:
Allowed memory size of 134217728 bytes exhausted (tried to allocate 16777224 bytes)
I don't know why nor how to fix it.

@stevenjoezhang
Copy link

I can only guess that this is a memory leak issue (such as infinite recursion), but haven't researched how to fix it. Given that this project has lost maintenance, perhaps you can find an alternative to it.

@saurabh-cimpress
Copy link

I can only guess that this is a memory leak issue (such as infinite recursion), but haven't researched how to fix it. Given that this project has lost maintenance, perhaps you can find an alternative to it.

Any suggestions for alternatives?

@stevenjoezhang
Copy link

@saurabh-cimpress
Copy link

I will check it out :)
Thanks

@stevenjoezhang
Copy link

You're welcome :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants