Overview
KB
Technical FAQ
PHP Manual
CSS2 Manual
HTML Manual
JS Guide
JS Reference
PhpDock Manual
Nu-Coder Manual
PhpExpress Manual
PHP Joomla
Development
Learn PHP
 
<SplObserver::updateSplSubject::attach>
^InterfacesLast updated: Mon, 26 Oct 2026

The SplSubject interface

(PHP 5 >= 5.1.0, PHP 7, PHP 8)

Introduction

The SplSubject interface is used alongside SplObserver to implement the Observer Design Pattern.

Interface synopsis

interface SplSubject {
/* Methods */
public function attach(SplObserver $observer): void
public function detach(SplObserver $observer): void
public function notify(): void
}

Table of Contents


<SplObserver::updateSplSubject::attach>
^InterfacesLast updated: Mon, 26 Oct 2026