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); var_dump($c);
Output for 5.3.0 - 7.1.0
Notice: Undefined index: HTTPS in /in/va9OQ on line 4 Notice: Undefined index: SERVER_NAME in /in/va9OQ on line 5 Notice: Undefined index: SERVER_PORT in /in/va9OQ on line 6 Notice: Undefined index: HTTPS in /in/va9OQ on line 11 Notice: Undefined index: SERVER_NAME in /in/va9OQ on line 12 Notice: Undefined index: SERVER_PORT in /in/va9OQ on line 13 array(6) { [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 } } [3]=> string(17) "samlp:bExtensions" [4]=> NULL [5]=> array(5) { [0]=> string(12) "ext:bReferer" [1]=> NULL [2]=> array(3) { [0]=> string(18) "ext:bRefererScheme" [1]=> NULL [2]=> string(4) "http" } [3]=> array(3) { [0]=> string(16) "ext:bRefererHost" [1]=> NULL [2]=> NULL } [4]=> array(3) { [0]=> string(16) "ext:bRefererPort" [1]=> NULL [2]=> NULL } } }
Output for 4.3.0 - 5.2.17
Notice: Undefined index: HTTPS in /in/va9OQ on line 4 Notice: Undefined index: SERVER_NAME in /in/va9OQ on line 5 Notice: Undefined index: SERVER_PORT in /in/va9OQ on line 6 Notice: Undefined index: HTTPS in /in/va9OQ on line 11 Notice: Undefined index: SERVER_NAME in /in/va9OQ on line 12 Notice: Undefined index: SERVER_PORT in /in/va9OQ on line 13 array(6) { [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 } } [3]=> string(17) "samlp:bExtensions" [4]=> NULL [5]=> array(5) { [0]=> string(12) "ext:bReferer" [1]=> NULL [2]=> array(3) { [0]=> string(18) "ext:bRefererScheme" [1]=> NULL [2]=> string(4) "http" } [3]=> array(3) { [0]=> string(16) "ext:bRefererHost" [1]=> NULL [2]=> NULL } [4]=> array(3) { [0]=> string(16) "ext:bRefererPort" [1]=> NULL [2]=> NULL } } }