3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $array = [ 'reference' => '2548945316', 'date_livraison' => '2018-11-24', 'demi_journee_livraison' => 'matin', 'magasin' => [ 'id' => 132, 'nom' => 'Conforama Montpellier' ], 'client' => [ 'nom' => 'Dupont', 'prenom' => 'Robert', 'email' => 'dupont.robert@outlook.fr', 'tel_fixe' => '0123456789', 'tel_mobile' => '0612345678' ], 'adresse_livraison' => [ 'adresse' => '1 Avenue Charles de Gaulle', 'adresse2' => 'Appt 12', 'code_postal' => '34000', 'ville' => 'Montpellier', 'centre_ville' => false, 'ascenseur' => true, 'etage' => 1, 'latitude' => '1.5426547', 'longitude' => '42.6544869413' ], 'produits' => [ [ 'ean' => '0050644683542', 'nom' => 'ANDREIA coloris gris/blanc', 'quantite' => 1, 'montage' => true, ], [ 'ean' => '0050644683543', 'nom' => 'Bureau design fonctionnel avec etagere clove rouge', 'quantite' => 1, 'montage' => true, ], ] ]; echo(json_encode($array));
based on Fh3C1
Output for 5.6.38 - 7.3.0rc3
{"reference":"2548945316","date_livraison":"2018-11-24","demi_journee_livraison":"matin","magasin":{"id":132,"nom":"Conforama Montpellier"},"client":{"nom":"Dupont","prenom":"Robert","email":"dupont.robert@outlook.fr","tel_fixe":"0123456789","tel_mobile":"0612345678"},"adresse_livraison":{"adresse":"1 Avenue Charles de Gaulle","adresse2":"Appt 12","code_postal":"34000","ville":"Montpellier","centre_ville":false,"ascenseur":true,"etage":1,"latitude":"1.5426547","longitude":"42.6544869413"},"produits":[{"ean":"0050644683542","nom":"ANDREIA coloris gris\/blanc","quantite":1,"montage":true},{"ean":"0050644683543","nom":"Bureau design fonctionnel avec etagere clove rouge","quantite":1,"montage":true}]}