Fixed day_of_week function as it could sometimes return negative values internally.
Fixed possible read after end of buffer and use after free.
Fixed bug #68545 NULL pointer dereference in unserialize.c

Conflicts:
	ext/standard/var_unserializer.c
5.6.4