3v4l.org

run code in 300+ PHP versions simultaneously
<?php // A unit testing framework in a tweet. https://gist.github.com/mathiasverraes/9046427 function it($m,$p){echo ($p?'✔︎':'✘')." It $m\n"; if(!$p){$GLOBALS['f']=1;}}function done(){if(@$GLOBALS['f'])die(1);} function consistsOfTheSameValues(array $a, array $b) { return count(array_diff(array_merge($a, $b), array_intersect($a, $b))) === 0; } it('consist of the same values', consistsOfTheSameValues([1], [1]) === true ); it('consist of the same values', consistsOfTheSameValues([1, 1], [1, 1]) === true ); it('consist of the same values', consistsOfTheSameValues(['1', 1], ['1', 1]) === true ); it('consist of the same values', consistsOfTheSameValues(['1', 1], [1, '1']) === true ); it('consist of the same values', consistsOfTheSameValues([1, '1'], ['1', 1]) === true ); it('consist of the same values', consistsOfTheSameValues([1, '1'], [1, '1']) === true ); it('consist of the same values', consistsOfTheSameValues(['x' => 1], ['x' => 1]) === true ); it('consist of the same values', consistsOfTheSameValues(['x' => 1], ['y' => 1]) === true ); it('consist of the same values', consistsOfTheSameValues(['y' => 1], ['x' => 1]) === true ); it('consist of the same values', consistsOfTheSameValues(['x' => 1, 'y' => 1], ['x' => 1, 'y' => 1]) === true ); it('consist of the same values', consistsOfTheSameValues(['y' => 1, 'x' => 1], ['x' => 1, 'y' => 1]) === true ); it('consist of the same values', consistsOfTheSameValues(['x' => 1, 'y' => 1], ['y' => 1, 'x' => 1]) === true ); it('consist of the same values', consistsOfTheSameValues(['y' => 1, 'x' => 1], ['y' => 1, 'x' => 1]) === true ); it('consist of the same values', consistsOfTheSameValues(['x' => 2, 'y' => 1], ['x' => 1, 'y' => 2]) === true ); it('does not consist of the same values', consistsOfTheSameValues([1], [2]) === false ); it('does not consist of the same values', consistsOfTheSameValues(['1'], [1]) === false ); it('does not consist of the same values', consistsOfTheSameValues([1], ['1']) === false ); it('does not consist of the same values', consistsOfTheSameValues([1], [1, 1]) === false ); it('does not consist of the same values', consistsOfTheSameValues([1, 1], [1]) === false ); it('does not consist of the same values', consistsOfTheSameValues(['1', 1], [1, 1]) === false ); it('does not consist of the same values', consistsOfTheSameValues([1, '1'], [1, 1]) === false ); it('does not consist of the same values', consistsOfTheSameValues([1, 1], ['1', 1]) === false ); it('does not consist of the same values', consistsOfTheSameValues([1, 1], [1, '1']) === false ); it('does not consist of the same values', consistsOfTheSameValues(['1', '1'], [1, 1]) === false ); it('does not consist of the same values', consistsOfTheSameValues(['1', '1'], ['1', 1]) === false ); it('does not consist of the same values', consistsOfTheSameValues(['1', '1'], [1, '1']) === false ); it('does not consist of the same values', consistsOfTheSameValues([1, 1], ['1', '1']) === false ); it('does not consist of the same values', consistsOfTheSameValues(['1', 1], ['1', '1']) === false ); it('does not consist of the same values', consistsOfTheSameValues([1, '1'], ['1', '1']) === false ); it('does not consist of the same values', consistsOfTheSameValues(['x' => 1], ['x' => 2]) === false ); it('does not consist of the same values', consistsOfTheSameValues(['x' => 1, 'y' => 1], ['x' => 1, 'y' => 2]) === false ); it('does not consist of the same values', consistsOfTheSameValues(['x' => 1, 'y' => 1], ['x' => 2, 'y' => 1]) === false ); it('does not consist of the same values', consistsOfTheSameValues(['x' => 2, 'y' => 1], ['x' => 1, 'y' => 1]) === false );
Output for git.master, git.master_jit, rfc.property-hooks
✔︎ It consist of the same values ✔︎ It consist of the same values ✔︎ It consist of the same values ✔︎ It consist of the same values ✔︎ It consist of the same values ✔︎ It consist of the same values ✔︎ It consist of the same values ✔︎ It consist of the same values ✔︎ It consist of the same values ✔︎ It consist of the same values ✔︎ It consist of the same values ✔︎ It consist of the same values ✔︎ It consist of the same values ✔︎ It consist of the same values ✔︎ It does not consist of the same values ✘ It does not consist of the same values ✘ It does not consist of the same values ✘ It does not consist of the same values ✘ It does not consist of the same values ✘ It does not consist of the same values ✘ It does not consist of the same values ✘ It does not consist of the same values ✘ It does not consist of the same values ✘ It does not consist of the same values ✘ It does not consist of the same values ✘ It does not consist of the same values ✘ It does not consist of the same values ✘ It does not consist of the same values ✘ It does not consist of the same values ✔︎ It does not consist of the same values ✔︎ It does not consist of the same values ✔︎ It does not consist of the same values ✘ It does not consist of the same values

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:
56.56 ms | 404 KiB | 8 Q