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);
Output for 7.0.0 - 7.3.0rc3
object(stdClass)#1 (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"]=> object(stdClass)#8 (1) { ["EDatosDetalleFactura"]=> array(6) { [0]=> object(stdClass)#2 (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]=> object(stdClass)#3 (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]=> object(stdClass)#4 (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]=> object(stdClass)#5 (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]=> object(stdClass)#6 (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]=> object(stdClass)#7 (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" } } } } bool(true)
Output for 5.6.0 - 5.6.30, hhvm-3.15.4
object(stdClass)#1 (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"]=> object(stdClass)#2 (1) { ["EDatosDetalleFactura"]=> array(6) { [0]=> object(stdClass)#3 (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]=> object(stdClass)#4 (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]=> object(stdClass)#5 (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]=> object(stdClass)#6 (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]=> object(stdClass)#7 (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]=> object(stdClass)#8 (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" } } } } bool(true)