3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $test = array ( 'html' => '<div class=\'modal-content\'><div class=\'modal-header\'><h1 class=\'modal-title\' id=\'modalTitle\'>Saisir une raison sociale</h1></div><form action=\'\' method=\'post\' name=\'form_cible\' id=\'form_cible\' class=\'form-horizontal\' role=\'form\'data-url=\'/dev/gestionclient/saveclient/\'><div class=\'modal-body\'><div id=\'table_saisie_gestion_header\' class=\'table_saisie_gestion content-fluid\'><fieldset><legend>Informations du contact</legend><div><input type=\'hidden\' name=\'client_id\' value=\'10651\' id=\'client_id\' /></div><div><input type=\'hidden\' name=\'client_type\' value=\'\' id=\'client_type\' /></div><div class=\'col-sm-6\'><div class=\'form-group has-success\'><label class=\'col-md-4 control-label\'>Raison soc.</label><div class=\'col-md-8\'><input type=\'text\' name=\'client_raisonsociale\' id=\'client_raisonsociale\' value=\'Monsieur\' class=\'form-control\' required=\'1\' /></div></div></div><div class=\'col-sm-6\'><div class=\'form-group has-success\'><label class=\'col-md-4 control-label\'>Nom</label><div class=\'col-md-8\'><input type=\'text\' name=\'client_nom\' id=\'client_nom\' value=\'MACHIN\' class=\'form-control\' required=\'1\' /></div></div></div><div class=\'col-sm-6\'><div class=\'form-group has-success\'><label class=\'col-md-4 control-label\'>Prénom</label><div class=\'col-md-8\'><input type=\'text\' name=\'client_prenom\' id=\'client_prenom\' value=\'Truc Bidule\' class=\'form-control\' required=\'1\' /></div></div></div><div class=\'col-sm-6\'><div class=\'form-group \'><label class=\'col-md-4 control-label\'>Téléphone</label><div class=\'col-md-8\'><input type=\'text\' name=\'client_telephone\' id=\'client_telephone\' value=\'06 66 66 66 66\' class=\'form-control\' /></div></div></div><div class=\'col-sm-6\'><div class=\'form-group \'><label class=\'col-md-4 control-label\'>Activité</label><div class=\'col-md-8\'><input type=\'text\' name=\'client_activite\' id=\'client_activite\' value=\'Sismique2\' class=\'form-control\' /></div></div></div><div class=\'col-sm-6\'><div class=\'form-group \'><label class=\'col-md-4 control-label\'>Segment</label><div class=\'col-md-8\'><input type=\'text\' name=\'client_segment\' id=\'client_segment\' value=\'Droite\' class=\'form-control\' /></div></div></div><div class=\'col-sm-6\'><div class=\'form-group \'><label class=\'col-md-4 control-label\'>Commentaire</label><div class=\'col-md-8\'><input type=\'text\' name=\'client_commentaire\' id=\'client_commentaire\' value=\'COMMENTAIRE !! 222\' class=\'form-control\' /></div></div></div></fieldset><fieldset><legend>Origine du contact</legend><div class=\'col-sm-6\'><div class=\'form-group \'><label class=\'col-md-4 control-label\'>Origine</label><div class=\'col-md-8\'><input type=\'text\' name=\'client_origine\' id=\'client_origine\' value=\'Origine\' class=\'form-cible-autocomplete form-control\' data-autocomplete=\'/dev/ajax/clientform/champs/origine\' /></div></div></div><div class=\'col-sm-6\'><div class=\'form-group \'><label class=\'col-md-4 control-label\'>Prescripteur interne</label><div class=\'col-md-8\'><input type=\'text\' name=\'client_prescripteur_interne\' id=\'client_prescripteur_interne\' value=\'interne\' class=\'form-cible-autocomplete form-control\' data-autocomplete=\'/dev/ajax/clientform/champs/interne\' /></div></div></div><div class=\'col-sm-6\'><div class=\'form-group \'><label class=\'col-md-4 control-label\'>Prescripteur externe</label><div class=\'col-md-8\'><input type=\'text\' name=\'client_prescripteur_externe\' id=\'client_prescripteur_externe\' value=\'externe\' class=\'form-cible-autocomplete form-control\' data-autocomplete=\'/dev/ajax/clientform/champs/externe\' /></div></div></div></fieldset><fieldset><legend>Informations de perte</legend><div class=\'col-sm-6\'><div class=\'form-group \'><label class=\'col-md-4 control-label\'>Date de sortie</label><div class=\'col-md-8\'><input type=\'text\' name=\'client_date_sortie\' id=\'client_date_sortie\' value=\'\' class=\'form-control dp\' /></div></div></div><div class=\'col-sm-6\'><div class=\'form-group \'><label class=\'col-md-4 control-label\'>Raison de la sortie</label><div class=\'col-md-8\'><input type=\'text\' name=\'client_raison_sortie\' id=\'client_raison_sortie\' value=\'\' class=\'form-control\' /></div></div></div><div class=\'col-sm-6\'><div class=\'form-group \'><label class=\'col-md-4 control-label\'>Montant perdu</label><div class=\'col-md-8\'><input type=\'text\' name=\'client_montant_perdu\' id=\'client_montant_perdu\' value=\'\' class=\'form-control\' /></div></div></div></fieldset></div></div><div class=\'modal-footer\'><input type=\'image\' name=\'form_btn_action_submit\' id=\'form_enregistrer\' src=\'https://web.efficial.com/dev/images/sauver.png\' value=\'enregistrer\' class=\'btn btn-default\' /><input type=\'image\' name=\'form_btn_action_cancel\' id=\'form_annuler\' src=\'https://web.efficial.com/dev/images/delete.png\' value=\'annuler\' class=\'btn btn-default\' /></div></form></div>', ); echo json_encode($test);
based on eACMa
Output for 5.2.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
{"html":"<div class='modal-content'><div \nclass='modal-header'><h1 class='modal-title' \nid='modalTitle'>Saisir une raison \nsociale<\/h1><\/div><form action='' method='post' \nname='form_cible' id='form_cible' class='form-horizontal' \nrole='form'data-url='\/dev\/gestionclient\/saveclient\/'><div \nclass='modal-body'><div id='table_saisie_gestion_header' \nclass='table_saisie_gestion \ncontent-fluid'><fieldset><legend>Informations du \ncontact<\/legend><div><input type='hidden' \nname='client_id' value='10651' id='client_id' \n\/><\/div><div><input type='hidden' \nname='client_type' value='' id='client_type' \n\/><\/div><div class='col-sm-6'><div \nclass='form-group has-success'><label class='col-md-4 \ncontrol-label'>Raison soc.<\/label><div \nclass='col-md-8'><input type='text' \nname='client_raisonsociale' id='client_raisonsociale' \nvalue='Monsieur' class='form-control' required='1' \n\/><\/div><\/div><\/div><div \nclass='col-sm-6'><div class='form-group \nhas-success'><label class='col-md-4 \ncontrol-label'>Nom<\/label><div \nclass='col-md-8'><input type='text' name='client_nom' \nid='client_nom' value='MACHIN' class='form-control' required='1'\n \/><\/div><\/div><\/div><div \nclass='col-sm-6'><div class='form-group \nhas-success'><label class='col-md-4 \ncontrol-label'>Pr\u00e9nom<\/label><div \nclass='col-md-8'><input type='text' name='client_prenom' \nid='client_prenom' value='Truc Bidule' class='form-control' \nrequired='1' \/><\/div><\/div><\/div><div \nclass='col-sm-6'><div class='form-group '><label \nclass='col-md-4 control-label'>T\u00e9l\u00e9phone<\/label><div \nclass='col-md-8'><input type='text' name='client_telephone' \nid='client_telephone' value='06 66 66 66 66' class='form-control' \n\/><\/div><\/div><\/div><div \nclass='col-sm-6'><div class='form-group '><label \nclass='col-md-4 control-label'>Activit\u00e9<\/label><div \nclass='col-md-8'><input type='text' name='client_activite' \nid='client_activite' value='Sismique2' class='form-control' \n\/><\/div><\/div><\/div><div \nclass='col-sm-6'><div class='form-group '><label \nclass='col-md-4 control-label'>Segment<\/label><div \nclass='col-md-8'><input type='text' name='client_segment' \nid='client_segment' value='Droite' class='form-control' \n\/><\/div><\/div><\/div><div \nclass='col-sm-6'><div class='form-group '><label \nclass='col-md-4 control-label'>Commentaire<\/label><div \nclass='col-md-8'><input type='text' \nname='client_commentaire' id='client_commentaire' \nvalue='COMMENTAIRE !! 222' class='form-control' \n\/><\/div><\/div><\/div><\/fieldset><fieldset><legend>Origine\n du contact<\/legend><div class='col-sm-6'><div \nclass='form-group '><label class='col-md-4 \ncontrol-label'>Origine<\/label><div \nclass='col-md-8'><input type='text' name='client_origine' \nid='client_origine' value='Origine' class='form-cible-autocomplete \nform-control' data-autocomplete='\/dev\/ajax\/clientform\/champs\/origine'\n \/><\/div><\/div><\/div><div \nclass='col-sm-6'><div class='form-group '><label \nclass='col-md-4 control-label'>Prescripteur \ninterne<\/label><div class='col-md-8'><input \ntype='text' name='client_prescripteur_interne' \nid='client_prescripteur_interne' value='interne' \nclass='form-cible-autocomplete form-control' \ndata-autocomplete='\/dev\/ajax\/clientform\/champs\/interne' \n\/><\/div><\/div><\/div><div \nclass='col-sm-6'><div class='form-group '><label \nclass='col-md-4 control-label'>Prescripteur \nexterne<\/label><div class='col-md-8'><input \ntype='text' name='client_prescripteur_externe' \nid='client_prescripteur_externe' value='externe' \nclass='form-cible-autocomplete form-control' \ndata-autocomplete='\/dev\/ajax\/clientform\/champs\/externe' \n\/><\/div><\/div><\/div><\/fieldset><fieldset><legend>Informations\n de perte<\/legend><div class='col-sm-6'><div \nclass='form-group '><label class='col-md-4 \ncontrol-label'>Date de sortie<\/label><div \nclass='col-md-8'><input type='text' \nname='client_date_sortie' id='client_date_sortie' value='' \nclass='form-control dp' \n\/><\/div><\/div><\/div><div \nclass='col-sm-6'><div class='form-group '><label \nclass='col-md-4 control-label'>Raison de la \nsortie<\/label><div class='col-md-8'><input \ntype='text' name='client_raison_sortie' id='client_raison_sortie' \nvalue='' class='form-control' \n\/><\/div><\/div><\/div><div \nclass='col-sm-6'><div class='form-group '><label \nclass='col-md-4 control-label'>Montant perdu<\/label><div \nclass='col-md-8'><input type='text' \nname='client_montant_perdu' id='client_montant_perdu' value='' \nclass='form-control' \n\/><\/div><\/div><\/div><\/fieldset><\/div><\/div><div\n class='modal-footer'><input type='image' \nname='form_btn_action_submit' id='form_enregistrer' \nsrc='https:\/\/web.efficial.com\/dev\/images\/sauver.png' \nvalue='enregistrer' class='btn btn-default' \/><input \ntype='image' name='form_btn_action_cancel' id='form_annuler' \nsrc='https:\/\/web.efficial.com\/dev\/images\/delete.png' value='annuler'\n class='btn btn-default' \/><\/div><\/form><\/div>"}
Output for 5.0.0 - 5.1.6
Fatal error: Call to undefined function json_encode() in /in/ndqXl on line 109
Process exited with code 255.
Output for 4.4.5 - 4.4.9
Fatal error: Call to undefined function: json_encode() in /in/ndqXl on line 109
Process exited with code 255.
Output for 4.3.2 - 4.4.4
Fatal error: Call to undefined function: json_encode() in /in/ndqXl on line 109
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Call to undefined function: json_encode() in /in/ndqXl on line 109