<?php
interface Animal {
public function __construct();
public function __toString();
}
interface Human {
}
class People implements Animal, Human {
public function __construct() {
//
}
}
new People();
//
Fatal error: Class People contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (Animal::__toString) in /in/iC1Pn on line 11
Process exited with code 255.
Output for 8.3.5
Warning: PHP Startup: Unable to load dynamic library 'sodium.so' (tried: /usr/lib/php/8.3.5/modules/sodium.so (libsodium.so.23: cannot open shared object file: No such file or directory), /usr/lib/php/8.3.5/modules/sodium.so.so (/usr/lib/php/8.3.5/modules/sodium.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
Fatal error: Class People contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (Animal::__toString) in /in/iC1Pn on line 11
Process exited with code 255.
Output for 5.5.24 - 5.5.35, 5.6.8 - 5.6.28
Fatal error: Class People contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (Animal::__toString) in /in/iC1Pn on line 15
Process exited with code 255.