3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public $dt; function __construct($dt) { $this->dt = $dt; } } $foo = new Foo(new DateTime); $std = new stdClass; $arr = [$foo, $foo, $std, $std, $std]; var_dump(array_unique($arr, SORT_REGULAR));
Output for git.master
array(2) { [0]=> object(Foo)#1 (1) { ["dt"]=> object(DateTime)#2 (3) { ["date"]=> string(26) "2018-03-12 13:26:43.003423" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } } [2]=> object(stdClass)#3 (0) { } }
Output for git.master_jit
array(2) { [0]=> object(Foo)#1 (1) { ["dt"]=> object(DateTime)#2 (3) { ["date"]=> string(26) "2018-03-12 13:26:43.004072" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } } [2]=> object(stdClass)#3 (0) { } }
Output for rfc.property-hooks
array(2) { [0]=> object(Foo)#1 (1) { ["dt"]=> object(DateTime)#2 (3) { ["date"]=> string(26) "2018-03-12 13:26:43.003706" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } } [2]=> object(stdClass)#3 (0) { } }

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