3v4l.org

run code in 300+ PHP versions simultaneously
<?php var_export([ // string, then mask 'a:ba' => strcspn('a', 'ba'), // 0 'ba:a' => strcspn('ba', 'a'), // 1 'a:a' => strcspn('a', 'a'), // 0 'ba:ba' => strcspn('ba', 'ba'), // 0 ]); echo "\n---\n"; $params = [ ['one' => 'a', 'two' => 'ba', 'three' => 'a', 'four' => 'ba'], // strings ['three' => 'a', 'one' => 'ba', 'four' => 'ba', 'two' => 'a'], // masks 'strcspn' ]; var_export([ 'udiff' => array_udiff_assoc(...$params), 'uintersect' => array_uintersect_assoc(...$params), ]);
Output for git.master, git.master_jit, rfc.property-hooks
array ( 'a:ba' => 0, 'ba:a' => 1, 'a:a' => 0, 'ba:ba' => 0, ) --- array ( 'udiff' => array ( 'two' => 'ba', ), 'uintersect' => array ( 'one' => 'a', 'three' => 'a', 'four' => 'ba', ), )

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