<?php class StrWrap { public string $s = ''; } // Configuration du tableau pour piéger les pointeurs internes $obj = new StrWrap(); $data = array(); $data[0] = $obj; $data[1] = "different"; // Valide $a !== $b $data[2] = "encore_different"; // Valide $b !== $c // On utilise une référence classique pour forcer PHP à lier $data[1] au retour de prev // Ou plus simplement, on triche sur la sérialisation en forçant la structure attendue :
You have javascript disabled. You will not be able to edit any code.