--- /dev/null
+--TEST--
+__set_state first parameter must be an array
+--FILE--
+<?php
+
+class Foo {
+ public static function __set_state(int $properties) {}
+}
+
+?>
+--EXPECTF--
+Fatal error: Foo::__set_state(): Parameter #1 ($properties) must be of type array when declared in %s on line %d
zend_check_magic_method_args(1, ce, fptr, error_type);
zend_check_magic_method_static(ce, fptr, error_type);
zend_check_magic_method_public(ce, fptr, error_type);
+ zend_check_magic_method_arg_type(0, ce, fptr, error_type, MAY_BE_ARRAY);
zend_check_magic_method_return_type(ce, fptr, error_type, MAY_BE_OBJECT);
} else if (zend_string_equals_literal(lcname, "__invoke")) {
zend_check_magic_method_non_static(ce, fptr, error_type);