3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $a = array('samlp:aExtensions', null, array('ext:aReferer', null, array('ext:aRefererScheme', null, "on" == $_SERVER["HTTPS"] ? "https" : "http"), array('ext:aRefererHost', null, $_SERVER["SERVER_NAME"]), array('ext:aRefererPort', null, $_SERVER["SERVER_PORT"]), ), ); $b = array('samlp:bExtensions', null, array('ext:bReferer', null, array('ext:bRefererScheme', null, "on" == $_SERVER["HTTPS"] ? "https" : "http"), array('ext:bRefererHost', null, $_SERVER["SERVER_NAME"]), array('ext:bRefererPort', null, $_SERVER["SERVER_PORT"]), ), ); //$c = array_merge($a, $b); $c = $a + $b; var_dump($c);
Output for 5.3.0 - 7.1.0
Notice: Undefined index: HTTPS in /in/AMCWT on line 4 Notice: Undefined index: SERVER_NAME in /in/AMCWT on line 5 Notice: Undefined index: SERVER_PORT in /in/AMCWT on line 6 Notice: Undefined index: HTTPS in /in/AMCWT on line 11 Notice: Undefined index: SERVER_NAME in /in/AMCWT on line 12 Notice: Undefined index: SERVER_PORT in /in/AMCWT on line 13 array(3) { [0]=> string(17) "samlp:aExtensions" [1]=> NULL [2]=> array(5) { [0]=> string(12) "ext:aReferer" [1]=> NULL [2]=> array(3) { [0]=> string(18) "ext:aRefererScheme" [1]=> NULL [2]=> string(4) "http" } [3]=> array(3) { [0]=> string(16) "ext:aRefererHost" [1]=> NULL [2]=> NULL } [4]=> array(3) { [0]=> string(16) "ext:aRefererPort" [1]=> NULL [2]=> NULL } } }
Output for 4.3.0 - 5.2.17
Notice: Undefined index: HTTPS in /in/AMCWT on line 4 Notice: Undefined index: SERVER_NAME in /in/AMCWT on line 5 Notice: Undefined index: SERVER_PORT in /in/AMCWT on line 6 Notice: Undefined index: HTTPS in /in/AMCWT on line 11 Notice: Undefined index: SERVER_NAME in /in/AMCWT on line 12 Notice: Undefined index: SERVER_PORT in /in/AMCWT on line 13 array(3) { [0]=> string(17) "samlp:aExtensions" [1]=> NULL [2]=> array(5) { [0]=> string(12) "ext:aReferer" [1]=> NULL [2]=> array(3) { [0]=> string(18) "ext:aRefererScheme" [1]=> NULL [2]=> string(4) "http" } [3]=> array(3) { [0]=> string(16) "ext:aRefererHost" [1]=> NULL [2]=> NULL } [4]=> array(3) { [0]=> string(16) "ext:aRefererPort" [1]=> NULL [2]=> NULL } } }