3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Pumpkin { public $a; protected $b; private $c; public function __construct ($a, $b, $c) { $this->a = $a; $this->b = $b; $this->c = $c; } } $x = new Pumpkin(1, 2, 3); $zpublic = new Pumpkin(99, 2, 3); // public property differs $zprotected = new Pumpkin(1, 99, 3); // protected property differs $zprivate = new Pumpkin(1, 2, 99); //private property differs $ztypediffers = new Pumpkin("1", 2, 3); // same values but different types... var_dump($x == $zpublic); // ? var_dump($x == $zprotected); var_dump($x == $zprivate); var_dump($x == $ztypediffers);
Output for git.master, git.master_jit, rfc.property-hooks
bool(false) bool(false) bool(false) bool(true)

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:
37.84 ms | 401 KiB | 8 Q