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=\'10650\' id=\'client_id\' /></div><div><input type=\'hidden\' name=\'client_type\' value=\'client\' 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=\'MACHIN2\' 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\' 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=\'Chômeur\' 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=\'Parallel\' 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 !!\' 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=\'Quelqu\'un\' 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 kjFDT
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 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='10650' id='client_id' \/><\/div><div><input type='hidden' name='client_type' value='client' 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='MACHIN2' 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\u00e9nom<\/label><div class='col-md-8'><input type='text' name='client_prenom' id='client_prenom' value='Truc' 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\u00e9l\u00e9phone<\/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\u00e9<\/label><div class='col-md-8'><input type='text' name='client_activite' id='client_activite' value='Ch\u00f4meur' 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='Parallel' 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 !!' 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='Quelqu'un' 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>"}
Output for 5.0.0 - 5.1.6
Fatal error: Call to undefined function json_encode() in /in/qkWB5 on line 5
Process exited with code 255.
Output for 4.4.5 - 4.4.9
Fatal error: Call to undefined function: json_encode() in /in/qkWB5 on line 5
Process exited with code 255.
Output for 4.3.2 - 4.4.4
Fatal error: Call to undefined function: json_encode() in /in/qkWB5 on line 5
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Call to undefined function: json_encode() in /in/qkWB5 on line 5