3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $str = '{"default":"2e383ed31c48c9f3de68c874d63124baeb6d104c|170711095139118140|593983231640|0100001676|201.218.12.210","ekey":"1C|915|0000100001676","codigo_factura":"1391","cuenta_debito":"|PRUEBA","empresa":"2","contrapartida":"0840","valor":"5.00","detalle_factura":{"EDatosDetalleFactura":[{"Codigo":"8405","CodigoFactura":"1391","CodigoInterno":"79889047","FlagEncabezado":"1","Nombre":"SERVICIO","Orden":"1","Valor":"RECAUDACIONES"},{"Codigo":"8406","CodigoFactura":"1391","CodigoInterno":"79889047","FlagEncabezado":"1","Nombre":"NOMBRE","Orden":"2","Valor":"ZUMIGA PUEBLA DIANA CAROLINA"},{"Codigo":"8407","CodigoFactura":"1391","CodigoInterno":"79889047","FlagEncabezado":"1","Nombre":"DESCRIPCION","Orden":"3","Valor":"CONSULTA"},{"Codigo":"8408","CodigoFactura":"1391","CodigoInterno":"79889047","FlagEncabezado":"2","Nombre":"VALOR ADEUDADO","Orden":"1","Valor":"5,00"},{"Codigo":"8409","CodigoFactura":"1391","CodigoInterno":"79889047","FlagEncabezado":"2","Nombre":"COMISION","Orden":"1","Valor":"0,00"},{"Codigo":"8410","CodigoFactura":"1391","CodigoInterno":"79889047","FlagEncabezado":"2","Nombre":"TOTAL PAGAR","Orden":"2","Valor":"5,00"}]}}'; var_dump(json_decode($str, true));
based on FfZvU
Output for 5.6.0 - 5.6.30, hhvm-3.15.4, 7.0.0 - 7.2.6
array(8) { ["default"]=> string(98) "2e383ed31c48c9f3de68c874d63124baeb6d104c|170711095139118140|593983231640|0100001676|201.218.12.210" ["ekey"]=> string(20) "1C|915|0000100001676" ["codigo_factura"]=> string(4) "1391" ["cuenta_debito"]=> string(7) "|PRUEBA" ["empresa"]=> string(1) "2" ["contrapartida"]=> string(4) "0840" ["valor"]=> string(4) "5.00" ["detalle_factura"]=> array(1) { ["EDatosDetalleFactura"]=> array(6) { [0]=> array(7) { ["Codigo"]=> string(4) "8405" ["CodigoFactura"]=> string(4) "1391" ["CodigoInterno"]=> string(8) "79889047" ["FlagEncabezado"]=> string(1) "1" ["Nombre"]=> string(8) "SERVICIO" ["Orden"]=> string(1) "1" ["Valor"]=> string(13) "RECAUDACIONES" } [1]=> array(7) { ["Codigo"]=> string(4) "8406" ["CodigoFactura"]=> string(4) "1391" ["CodigoInterno"]=> string(8) "79889047" ["FlagEncabezado"]=> string(1) "1" ["Nombre"]=> string(6) "NOMBRE" ["Orden"]=> string(1) "2" ["Valor"]=> string(28) "ZUMIGA PUEBLA DIANA CAROLINA" } [2]=> array(7) { ["Codigo"]=> string(4) "8407" ["CodigoFactura"]=> string(4) "1391" ["CodigoInterno"]=> string(8) "79889047" ["FlagEncabezado"]=> string(1) "1" ["Nombre"]=> string(11) "DESCRIPCION" ["Orden"]=> string(1) "3" ["Valor"]=> string(8) "CONSULTA" } [3]=> array(7) { ["Codigo"]=> string(4) "8408" ["CodigoFactura"]=> string(4) "1391" ["CodigoInterno"]=> string(8) "79889047" ["FlagEncabezado"]=> string(1) "2" ["Nombre"]=> string(14) "VALOR ADEUDADO" ["Orden"]=> string(1) "1" ["Valor"]=> string(4) "5,00" } [4]=> array(7) { ["Codigo"]=> string(4) "8409" ["CodigoFactura"]=> string(4) "1391" ["CodigoInterno"]=> string(8) "79889047" ["FlagEncabezado"]=> string(1) "2" ["Nombre"]=> string(8) "COMISION" ["Orden"]=> string(1) "1" ["Valor"]=> string(4) "0,00" } [5]=> array(7) { ["Codigo"]=> string(4) "8410" ["CodigoFactura"]=> string(4) "1391" ["CodigoInterno"]=> string(8) "79889047" ["FlagEncabezado"]=> string(1) "2" ["Nombre"]=> string(11) "TOTAL PAGAR" ["Orden"]=> string(1) "2" ["Valor"]=> string(4) "5,00" } } } }