3v4l.org

run code in 300+ PHP versions simultaneously
<?php $xmlstr = <<<XML <medium val="cpa"> <source val="affilinet"> <campaign val=""> <lever3 val="affiliation" /> <lever2 val="affiliation" /> <lever1 val="trafic_payant" /> </campaign> </source> </medium> XML; $xml = simplexml_load_string($xmlstr); print_r($xml); //$levers = array(array("comparateur-google_shopping", "comparateur", "trafic_payant"), // array("display", "display", "trafic_payant"), // array("email-auchanfr", "email_auchanfr", "email_auchanfr") // ); //$begin = 41; //$end = 50; //for ($i = $begin; $i <= $end; ++$i){ // $index = rand(0,2); // $query = "UPDATE IGNORE piwik_log_visit SET lever3='" . $levers[$index][0] . "', lever2='" . $levers[$index][1] . "', lever1='" . //$levers[$index][2] . "' WHERE idvisit=" . $i . ";"; // echo $query . "\n"; //} //print_r($levers[rand(0,2)]);
Output for git.master, git.master_jit, rfc.property-hooks
SimpleXMLElement Object ( [@attributes] => Array ( [val] => cpa ) [source] => SimpleXMLElement Object ( [@attributes] => Array ( [val] => affilinet ) [campaign] => SimpleXMLElement Object ( [@attributes] => Array ( [val] => ) [lever3] => SimpleXMLElement Object ( [@attributes] => Array ( [val] => affiliation ) ) [lever2] => SimpleXMLElement Object ( [@attributes] => Array ( [val] => affiliation ) ) [lever1] => SimpleXMLElement Object ( [@attributes] => Array ( [val] => trafic_payant ) ) ) ) )

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