3v4l.org

run code in 300+ PHP versions simultaneously
<pre> <?php interface Greetable{ public function sayHello(); public function sayBye(); } interface Happyble{ public function sayHello(); } class Person implements Greetable, Happyble{ //CONCLUSIÓN: # 1. Las clases que implementen una interfaz implementar TODOS los métodos definidos en ellas! # 2. No pueden pasar de public a private de ninguna forma (herencia, interfaces) private $name = "Rowinson Gallego Medina"; public function sayHello(){ echo "Hello, $this->name!\n\n"; } public function sayBye(){} } $a = new Person(); $a->sayHello();
Output for git.master, git.master_jit, rfc.property-hooks
<pre> Hello, Rowinson Gallego Medina!

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
39.34 ms | 401 KiB | 8 Q