1--TEST--
2Test unserialize() with non-bool/array allowed_classes
3--FILE--
4<?php
5class foo {
6        public $x = "bar";
7}
8$z = array(new foo(), 2, "3");
9$s = serialize($z);
10
11var_dump(unserialize($s, ["allowed_classes" => null]));
12var_dump(unserialize($s, ["allowed_classes" => 0]));
13var_dump(unserialize($s, ["allowed_classes" => 1]));
14--EXPECTF--
15Warning: unserialize(): allowed_classes option should be array or boolean in %s on line %d
16bool(false)
17
18Warning: unserialize(): allowed_classes option should be array or boolean in %s on line %d
19bool(false)
20
21Warning: unserialize(): allowed_classes option should be array or boolean in %s on line %d
22bool(false)
23