3v4l.org

run code in 300+ PHP versions simultaneously
<?php var_export([ // haystack, then needle '0:1' => strpbrk('0', '1'), // false '1:0' => strpbrk('1', '0'), // false '0:0' => strpbrk('0', '0'), // '0' '1:1' => strpbrk('1', '1'), // '1' 'a:b' => strpbrk('a', 'b'), // false 'b:a' => strpbrk('b', 'a'), // false 'a:a' => strpbrk('a', 'a'), // 'a' 'b:b' => strpbrk('b', 'b'), // 'b' 'a as bool' => (bool)'a', 'a as int' => (int)'a', 'a as bool then int' => (int)(bool)'a', ]); echo "\n---\n"; $params = [ ['one' => '0', 'two' => '1', 'three' => '0', 'four' => '1', 'five' => 'a', 'six' => 'b', 'seven' => 'a', 'eight' => 'b'], // haystacks ['three' => '0', 'one' => '1', 'four' => '1', 'two' => '0', 'five' => 'a', 'eight' => 'b', 'six' => 'b', 'seven' => 'a'], // needles 'strpbrk' ]; var_export([ 'udiff' => array_udiff_assoc(...$params), 'uintersect' => array_uintersect_assoc(...$params), ]);
Output for git.master, git.master_jit, rfc.property-hooks
array ( '0:1' => false, '1:0' => false, '0:0' => '0', '1:1' => '1', 'a:b' => false, 'b:a' => false, 'a:a' => 'a', 'b:b' => 'b', 'a as bool' => true, 'a as int' => 0, 'a as bool then int' => 1, ) --- array ( 'udiff' => array ( 'four' => '1', ), 'uintersect' => array ( 'one' => '0', 'two' => '1', 'three' => '0', 'five' => 'a', 'six' => 'b', 'seven' => 'a', 'eight' => 'b', ), )

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:
30.16 ms | 406 KiB | 5 Q