3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function myfunction($v1,$v2) { $v1 = preg_replace('#^(idev_pages_pages\.|idev_pages_pages_lang\.)#','',$v1); $v2 = preg_replace('#^(idev_pages_pages\.|idev_pages_pages_lang\.)#','',$v2);var_dump($v1,$v2); if ($v1===$v2) { return 0; } if ($v1 > $v2) return 1; return -1; } $a1=array('idev_pages_pages.uid', 'idev_pages_pages.parent', 'name'); $a2=array('name', 'url', 'menu_text'); array_uintersect($a1,$a2,"myfunction");
Output for 7.0.0 - 7.1.7
string(3) "uid" string(6) "parent" string(4) "name" string(6) "parent" string(4) "name" string(3) "url" string(3) "url" string(9) "menu_text" string(4) "name" string(9) "menu_text" string(4) "name" string(9) "menu_text" string(4) "name" string(4) "name" string(4) "name" string(6) "parent" string(6) "parent" string(3) "url" string(3) "uid" string(3) "url"
Output for 5.0.0 - 5.6.28
string(6) "parent" string(3) "uid" string(4) "name" string(6) "parent" string(3) "url" string(4) "name" string(9) "menu_text" string(3) "url" string(4) "name" string(9) "menu_text" string(4) "name" string(9) "menu_text" string(4) "name" string(4) "name" string(4) "name" string(6) "parent" string(6) "parent" string(3) "url" string(3) "uid" string(3) "url"
Output for 4.4.5 - 4.4.9
<br /> <b>Fatal error</b>: Call to undefined function: array_uintersect() in <b>/in/a4IJm</b> on line <b>16</b><br />
Process exited with code 255.
Output for 4.3.2 - 4.4.4
<br /> <b>Fatal error</b>: Call to undefined function: array_uintersect() in <b>/in/a4IJm</b> on line <b>16</b><br />
Process exited with code 255.
Output for 4.3.0 - 4.3.1
<br /> <b>Fatal error</b>: Call to undefined function: array_uintersect() in <b>/in/a4IJm</b> on line <b>16</b><br />