Sortie du snippet PHP "Créez un tableau à taille fixe avec PHP "

Environnement :

  • Strangebuzz Snippet VM : 6.4.2
  • PHP : 8.3

Sortie du code exécuté :

object(SplFixedArray)#1895 (5) {
  [0]=>
  NULL
  [1]=>
  NULL
  [2]=>
  NULL
  [3]=>
  string(3) "foo"
  [4]=>
  string(3) "bar"
}
Size of array: 5

Error: Index invalid or out of range

array(5) {
  [0]=>
  NULL
  [1]=>
  NULL
  [2]=>
  NULL
  [3]=>
  string(3) "foo"
  [4]=>
  string(3) "bar"
}