use Ds\Queue;
$queue = new Queue();
$queue->push(1, 2, 3);
foreach ($queue->copy() as $value) {
// Segfaults
}
The work around is to store the copy in a new variable:
use Ds\Queue;
$queue = new Queue();
$queue->push(1, 2, 3);
$copy = $queue->copy();
foreach ($copy as $value) {
// No Segfaults
}
PHP error: Process finished with exit code 135 (interrupted by signal 7: SIGEMT).
dmesg on off chance it helps: [ 6054.379466] traps: php7.2[11022] trap stack segment ip:7f96bd8f584c sp:7fff08522930 error:0 in ds.so[7f96bd8e2000+2f000]
Iterating directly on a copied queue seg faults:
The work around is to store the copy in a new variable:
Process finished with exit code 135 (interrupted by signal 7: SIGEMT)
.[ 6054.379466] traps: php7.2[11022] trap stack segment ip:7f96bd8f584c sp:7fff08522930 error:0 in ds.so[7f96bd8e2000+2f000]