3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = array(); $arr["Intercambio"]["0"]["Versao"]["0"] = "2"; $arr["Intercambio"]["0"]["TipoIdentificacaoRemetente"]["0"] = "cnpj"; $arr["Intercambio"]["0"]["IdentificacaoRemetente"]["0"] = "02089969001420"; $arr["TextosCodificados"]["TextoCodificado"]["0"]["QualificadorAssunto"]["0"] = "ALL"; $arr["TextosCodificados"]["TextoCodificado"]["0"]["Texto"] = "Vnd mer.adq.rec.ter.op.mer.sj.rg.sub.trb.cnd.sub.t"; $arr["TextosCodificados"]["TextoCodificado"]["1"]["QualificadorAssunto"]["0"] = "AAI"; $arr["TextosCodificados"]["TextoCodificado"]["1"]["Texto"] = "Protocolo ICMS 18809 e 1192012 ICMS Retido Art 313W"; $arr["TextosCodificados"]["TextoCodificado"]["2"]["QualificadorAssunto"]["0"] = "IVN"; $arr["TextosCodificados"]["TextoCodificado"]["2"]["Texto"] = "Pedido Interno:0000283278 ID da Carga:"; function teste($arr) { foreach($arr as $k => $v) { var_dump($v); if(is_array($v)){ } else { } } } $newArr = array(); $rst = teste($arr); //var_dump($rst);
Output for git.master, git.master_jit, rfc.property-hooks
array(1) { [0]=> array(3) { ["Versao"]=> array(1) { [0]=> string(1) "2" } ["TipoIdentificacaoRemetente"]=> array(1) { [0]=> string(4) "cnpj" } ["IdentificacaoRemetente"]=> array(1) { [0]=> string(14) "02089969001420" } } } array(1) { ["TextoCodificado"]=> array(3) { [0]=> array(2) { ["QualificadorAssunto"]=> array(1) { [0]=> string(3) "ALL" } ["Texto"]=> string(50) "Vnd mer.adq.rec.ter.op.mer.sj.rg.sub.trb.cnd.sub.t" } [1]=> array(2) { ["QualificadorAssunto"]=> array(1) { [0]=> string(3) "AAI" } ["Texto"]=> string(51) "Protocolo ICMS 18809 e 1192012 ICMS Retido Art 313W" } [2]=> array(2) { ["QualificadorAssunto"]=> array(1) { [0]=> string(3) "IVN" } ["Texto"]=> string(38) "Pedido Interno:0000283278 ID da Carga:" } } }

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:
41.47 ms | 403 KiB | 8 Q