3v4l.org

run code in 300+ PHP versions simultaneously
<?php var_export([ // string, then mask 'a:ab' => trim('a', 'ab'), // '' ...cast to 0 'ab:a' => trim('ab', 'a'), // 'b' ...cast to 0 '0:1' => trim('0', '1'), // '0' ...cast to 0 '1:0' => trim('1', '0'), // '1' ...cast to 1 ]); echo "\n---\n"; $params = [ ['one' => 'a', 'two' => 'ab', 'three' => '0', 'four' => '1'], // string ['three' => '1', 'one' => 'ab', 'four' => '0', 'two' => 'a'], // mask 'trim' ]; var_export([ 'udiff' => array_udiff_assoc(...$params), 'uintersect' => array_uintersect_assoc(...$params), ]);
Output for git.master, git.master_jit, rfc.property-hooks
array ( 'a:ab' => '', 'ab:a' => 'b', '0:1' => '0', '1:0' => '1', ) --- array ( 'udiff' => array ( 'four' => '1', ), 'uintersect' => array ( 'one' => 'a', 'two' => 'ab', 'three' => '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:
79.29 ms | 406 KiB | 5 Q