3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php atest(); function atest(){ $test = array( "StartDate" => "08/01/2013", "StartTime" =>"08:00:00", "DepartmentID" => "75275", "# Contacts Offered" => "3", "# Contacts Handled" => "4", "Average Talk Time" => "491.250000", "Average Delay" => "5.666667", "Percent SLA" => "1.333333"); $formatted = sprintf("%s %s TCSDATA %d %d %d %01.2f 0 %01.2f %01.2f \r\n", $test["StartDate"], $test["StartTime"], $test['DepartmentID'], $test['# Contacts Offered'], $test['# Contacts Handled'], $test['Average Talk Time'], $test['Average Delay'], $test['Percent SLA'] ); echo('<pre>'); echo( var_dump($test) ); echo('</pre>'); echo $formatted; } ?>

Shows result from various feature-branches currently under review from the php developers. Contact me to have additional branches featured.

Output for Typed properties v2
<pre>array(8) { ["StartDate"]=> string(10) "08/01/2013" ["StartTime"]=> string(8) "08:00:00" ["DepartmentID"]=> string(5) "75275" ["# Contacts Offered"]=> string(1) "3" ["# Contacts Handled"]=> string(1) "4" ["Average Talk Time"]=> string(10) "491.250000" ["Average Delay"]=> string(8) "5.666667" ["Percent SLA"]=> string(8) "1.333333" } </pre>08/01/2013 08:00:00 TCSDATA 75275 3 4 491.25 0 5.67 1.33
Output for Array change keys
<pre>array(8) { ["StartDate"]=> string(10) "08/01/2013" ["StartTime"]=> string(8) "08:00:00" ["DepartmentID"]=> string(5) "75275" ["# Contacts Offered"]=> string(1) "3" ["# Contacts Handled"]=> string(1) "4" ["Average Talk Time"]=> string(10) "491.250000" ["Average Delay"]=> string(8) "5.666667" ["Percent SLA"]=> string(8) "1.333333" } </pre>08/01/2013 08:00:00 TCSDATA 75275 3 4 491.25 0 5.67 1.33
Output for Lexical anon
<pre>array(8) { ["StartDate"]=> string(10) "08/01/2013" ["StartTime"]=> string(8) "08:00:00" ["DepartmentID"]=> string(5) "75275" ["# Contacts Offered"]=> string(1) "3" ["# Contacts Handled"]=> string(1) "4" ["Average Talk Time"]=> string(10) "491.250000" ["Average Delay"]=> string(8) "5.666667" ["Percent SLA"]=> string(8) "1.333333" } </pre>08/01/2013 08:00:00 TCSDATA 75275 3 4 491.25 0 5.67 1.33

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page