3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $arr = array ( 'db' => array ( 'from' => array ( 'SAVING_0', 'PPERS_0', 'SUPP_0' ), 'select' => array ( 'ORGSUPP' => NULL, 'UIDSUPP' => NULL, 'NAMSUPP' => NULL, 'UIDPPERS' => NULL, 'NAMPPERS' => NULL, 'REFSAVING' => NULL, 'MONTHSAVING' => NULL, 'YRSAVING' => NULL, 'INITAMOUNT' => NULL, 'NETSAVING' => NULL, 'ESTSAVING' => NULL, 'ESTIMATED' => NULL, 'SUPPLIER' => NULL, 'COMMENTS' => NULL, 'CREATED' => NULL, 'CREATEDDATE' => NULL, ), 'where' => array ( 'UIDSAVING' => '#UIDPPERS', 'ORGSUPP' => '#ORGPPERS', '#1.STATUS' => 'Y', '#2.STATUS' => 'Y', 'SAVING' => 'Y', ), 'filters' => NULL ), 'dynamic' => TRUE, 'editable' => TRUE, 'number' => NULL, 'title' => "Savings from the staff in the FP group.", 'subtitle' => NULL, 'num_columns' => 10, 'graph' => NULL, 'headers' => array ( array ( 'layout' => array ( 'ORGSUPP' => FALSE, 'UIDSUPP' => FALSE, 'NAMSUPP' => FALSE, 'UIDPPERS' => FALSE, 'NAMPPERS' => FALSE, 'REFSAVING' => array('class' => "text-center"), 'MONTHSAVING' => array('class' => "text-center"), 'YRSAVING' => array('class' => "text-center"), 'INITAMOUNT' => array('class' => "text-center"), 'NETSAVING' => array('class' => "text-center"), 'ESTSAVING' => array('class' => "text-center"), 'ESTIMATED' => array('class' => "text-center"), 'SUPPLIER' => array('class' => "text-center"), 'COMMENTS' => array('class' => "text-center"), 'CREATED' => array('class' => "text-center"), 'CREATEDDATE' => array('class' => "text-center"), ), 'data' => array ( 'REFSAVING' => "Order / contract ref.", 'MONTHSAVING' => "Month", 'YRSAVING' => "Year", 'INITAMOUNT' => "Initial Amount (CHF)", 'NETSAVING' => "Firm saving (CHF)", 'ESTSAVING' => "Estimated saving (CHF)", 'ESTIMATED' => "Is it estimated?", 'SUPPLIER' => "Supplier", 'COMMENTS' => "Comments", 'CREATED' => "Created by", 'CREATEDDATE' => "Date", ), ), ), 'body' => array ( 'layout' => array ( 'REFSAVING' => array('class' => "text-left no-wrap"), 'MONTHSAVING' => array('class' => "text-center no-wrap"), 'YRSAVING' => array('class' => "text-center no-wrap"), 'INITAMOUNT' => array('class' => "text-right no-wrap", 'data-format' => 'currency'), 'NETSAVING' => array('class' => "text-right no-wrap", 'data-format' => 'currency'), 'ESTSAVING' => array('class' => "text-right no-wrap", 'data-format' => ' currency'), 'ESTIMATED' => array('class' => "border-left border-right text-center"), 'SUPPLIER' => array('class' => "no-wrap"), 'COMMENTS' => array('class' => "text-min-width"), 'CREATED' => NULL, 'CREATEDDATE' => array('class' => "text-center no-wrap", 'data-format' => 'date'), ), 'format' => array ( 'MONTHSAVING' => 'format_date_month', 'YRSAVING' => 'format_date_year', 'INITAMOUNT' => array('format_french_number', 'format_no_decimals'), 'NETSAVING' => array('format_french_number', 'format_no_decimals'), 'ESTSAVING' => array('format_french_number', 'format_no_decimals'), 'CREATEDDATE' => 'format_date', ) ), 'footers' => array ( FALSE ), ); echo json_encode($arr);
Output for 5.2.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
{"db":{"from":["SAVING_0","PPERS_0","SUPP_0"],"select":{"ORGSUPP":null,"UIDSUPP":null,"NAMSUPP":null,"UIDPPERS":null,"NAMPPERS":null,"REFSAVING":null,"MONTHSAVING":null,"YRSAVING":null,"INITAMOUNT":null,"NETSAVING":null,"ESTSAVING":null,"ESTIMATED":null,"SUPPLIER":null,"COMMENTS":null,"CREATED":null,"CREATEDDATE":null},"where":{"UIDSAVING":"#UIDPPERS","ORGSUPP":"#ORGPPERS","#1.STATUS":"Y","#2.STATUS":"Y","SAVING":"Y"},"filters":null},"dynamic":true,"editable":true,"number":null,"title":"Savings from the staff in the FP group.","subtitle":null,"num_columns":10,"graph":null,"headers":[{"layout":{"ORGSUPP":false,"UIDSUPP":false,"NAMSUPP":false,"UIDPPERS":false,"NAMPPERS":false,"REFSAVING":{"class":"text-center"},"MONTHSAVING":{"class":"text-center"},"YRSAVING":{"class":"text-center"},"INITAMOUNT":{"class":"text-center"},"NETSAVING":{"class":"text-center"},"ESTSAVING":{"class":"text-center"},"ESTIMATED":{"class":"text-center"},"SUPPLIER":{"class":"text-center"},"COMMENTS":{"class":"text-center"},"CREATED":{"class":"text-center"},"CREATEDDATE":{"class":"text-center"}},"data":{"REFSAVING":"Order \/ contract ref.","MONTHSAVING":"Month","YRSAVING":"Year","INITAMOUNT":"Initial Amount (CHF)","NETSAVING":"Firm saving (CHF)","ESTSAVING":"Estimated saving (CHF)","ESTIMATED":"Is it estimated?","SUPPLIER":"Supplier","COMMENTS":"Comments","CREATED":"Created by","CREATEDDATE":"Date"}}],"body":{"layout":{"REFSAVING":{"class":"text-left no-wrap"},"MONTHSAVING":{"class":"text-center no-wrap"},"YRSAVING":{"class":"text-center no-wrap"},"INITAMOUNT":{"class":"text-right no-wrap","data-format":"currency"},"NETSAVING":{"class":"text-right no-wrap","data-format":"currency"},"ESTSAVING":{"class":"text-right no-wrap","data-format":" currency"},"ESTIMATED":{"class":"border-left border-right text-center"},"SUPPLIER":{"class":"no-wrap"},"COMMENTS":{"class":"text-min-width"},"CREATED":null,"CREATEDDATE":{"class":"text-center no-wrap","data-format":"date"}},"format":{"MONTHSAVING":"format_date_month","YRSAVING":"format_date_year","INITAMOUNT":["format_french_number","format_no_decimals"],"NETSAVING":["format_french_number","format_no_decimals"],"ESTSAVING":["format_french_number","format_no_decimals"],"CREATEDDATE":"format_date"}},"footers":[false]}
Output for 5.0.0 - 5.1.6
Fatal error: Call to undefined function json_encode() in /in/778Ea on line 118
Process exited with code 255.
Output for 4.4.5 - 4.4.9
Fatal error: Call to undefined function: json_encode() in /in/778Ea on line 118
Process exited with code 255.
Output for 4.3.2 - 4.4.4
Fatal error: Call to undefined function: json_encode() in /in/778Ea on line 118
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Call to undefined function: json_encode() in /in/778Ea on line 118