3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Report_Filter { public $And_Or; public $Report_Field_ID; public $Comparison; public $Value; } class Report_Order_By { public $Report_Field_ID; public $Direction; } class Fixed_Width_Info { public $Report_Field_ID; public $Column_Width; } class Text_Export_Formatting { public $Field_Delimiter = ","; public $Text_Qualifier = "\""; public $Include_Headers = true; public $Apply_Delimiter_To_Headers = true; public $Apply_Qualifier_To_Headers = true; public $Fixed_Width = false; public $Fixed_Widths = array(); // array with Fixed_Width_Info objects } class Header_Formatting { public $Report_Field_ID; public $Bold; public $Italic; public $Underline; public $Alignment; } class Table_Field { public $Area; // Table_Area public $Index; } class Column_Formatting { public $Report_Field_ID; public $Bold; public $Italic; public $Underline; public $Alignment; public $Data_Type; // Data_Type type public $Summary_Type; // Summary_Type type public $Total; public $Pivot_Table_Field; // = new Table_Field(); // Table_Field type } class Table_Theme { private $Header_Total_Background_Color = "#538DD5"; private $Header_Total_Font_Color = "#FFFFFF"; private $Alternating_Row_Background_Color = "#DCE6F1"; private $Alternating_Row_Font_Color = "#000000"; } class Excel_Export_Formatting { public $Type; public $Include_Headers; public $Include_Data_Tab; public $Header_Format; // array of Header_Formatting objects public $Column_Format; // array of Column_Formatting objects public $Table_Theming; // = new Table_Theme(); } class Share_Drive_Information { public $Address; public $Username; public $Password; } class EMail_Information { public $Recipient; public $CC_Recipient; public $BCC_Recipient; public $Subject; public $Body; } class FTP_Information { public $Secure; public $Address; public $Port; public $Path; public $Username; public $Password; } class Delivery_Method { public $Type; public $Share_Drive_Info; //= new Share_Drive_Information(); public $EMail_Info; //= new EMail_Information(); public $FTP_Info; //= new FTP_Information(); } class ReportSettings { public $Report_Platform_ID = null; public $Report_Type_ID = null; public $Report_Field_IDs = array(); // array with native type public $Report_Filters = array(); // array with Report_Filter objects public $Report_Order_Bys = array(); // array with Report_Order_By objects public $Export_Type = "Text"; public $Text_Export; //= new Text_Export_Formatting(); public $Excel_Export; //= new Excel_Export_Formatting(); public $Zip_File = null; public $Encrypt_File = null; public $AES_Encrypt = null; public $Encrypt_Password = "RANDOM PASSWORD"; public $Export_Filename = null; public $Delivery_Methods; //= new Delivery_Method(); } $rp = new ReportSettings(); $rp->Report_Platform_ID = 11; $rp->Report_Type_ID = 11; $rp->Report_Field_IDs = array(12,54,34,23); // $filter_list is an array of filters $filter_list = array( array( 'And_Or' => null, 'Report_Field_ID' => 12, 'Comparison' => '>=', 'Value' => '5000' ), array( 'And_Or' => 'or', 'Report_Field_ID' => 12, 'Comparison' => '<=', 'Value' => '15000' ) ); foreach($filter_list as $f) { $o = new Report_Filter(); $o->And_Or = $f['And_Or']; $o->Report_Field_ID = $f['Report_Field_ID']; $o->Comparison = $f['Comparison']; $o->Value = $f['Value']; $rp->Report_Filters[] = $o; } // $sorted_list is an array of sort filters $sorted_list = array( array( 'Direction' => 'ASC', 'Report_Field_ID' => 12 ) ); foreach($sorted_list as $s) { $o = new Report_Order_By(); $o->Direction = $s['Direction']; $o->Report_Field_ID = $s['Report_Field_ID']; $rp->Report_Order_Bys[] = $o; } $rp->Export_Type = 'text'; $rp->Text_Export = new Text_Export_Formatting(); // $export_settings is an array of settings $rp->Text_Export->Field_Delimiter = ','; $rp->Text_Export->Text_Qualifier = '"'; $rp->Text_Export->Include_Headers = true; $rp->Text_Export->Apply_Delimiter_To_Headers = true; $rp->Text_Export->Apply_Qualifier_To_Headers = true; $rp->Text_Export->Fixed_Width = true; $fixed_widths = array( array( 'Column_Width' => '100', 'Report_Field_ID' => 12 ), array( 'Column_Width' => '200', 'Report_Field_ID' => 54 ) ); if($rp->Text_Export->Fixed_Width) { foreach ($fixed_widths as $e) { $o = new Report_Order_By(); $o->Column_Width = $e['Column_Width']; $o->Report_Field_ID = $e['Report_Field_ID']; $rp->Text_Export->Fixed_Widths[] = $o; } } $rp->Zip_File = 'myzipfile.zip'; $rp->Encrypt_File = true; $rp->AES_Encrypt = false; $rp->Encrypt_Password = 'mys3cr3tp455w0rd5hhh'; $rp->Export_Filename = 'myreport.txt'; $rp->Delivery_Methods = new Delivery_Method(); $rp->Delivery_Methods->Type = 'ftp'; $rp->Delivery_Methods->FTP_Info = new FTP_Information(); $rp->Delivery_Methods->FTP_Info->Secure = true; $rp->Delivery_Methods->FTP_Info->Address = '69.54.18.1'; $rp->Delivery_Methods->FTP_Info->Port = 22; $rp->Delivery_Methods->FTP_Info->Path = '/home/mistermister/htdocs'; $rp->Delivery_Methods->FTP_Info->Username = 'direwolf'; $rp->Delivery_Methods->FTP_Info->Password = 'gh05t'; var_dump($rp);
Output for git.master, git.master_jit, rfc.property-hooks
Deprecated: Creation of dynamic property Report_Order_By::$Column_Width is deprecated in /in/0AMiM on line 227 Deprecated: Creation of dynamic property Report_Order_By::$Column_Width is deprecated in /in/0AMiM on line 227 object(ReportSettings)#1 (14) { ["Report_Platform_ID"]=> int(11) ["Report_Type_ID"]=> int(11) ["Report_Field_IDs"]=> array(4) { [0]=> int(12) [1]=> int(54) [2]=> int(34) [3]=> int(23) } ["Report_Filters"]=> array(2) { [0]=> object(Report_Filter)#2 (4) { ["And_Or"]=> NULL ["Report_Field_ID"]=> int(12) ["Comparison"]=> string(2) ">=" ["Value"]=> string(4) "5000" } [1]=> object(Report_Filter)#3 (4) { ["And_Or"]=> string(2) "or" ["Report_Field_ID"]=> int(12) ["Comparison"]=> string(2) "<=" ["Value"]=> string(5) "15000" } } ["Report_Order_Bys"]=> array(1) { [0]=> object(Report_Order_By)#4 (2) { ["Report_Field_ID"]=> int(12) ["Direction"]=> string(3) "ASC" } } ["Export_Type"]=> string(4) "text" ["Text_Export"]=> object(Text_Export_Formatting)#5 (7) { ["Field_Delimiter"]=> string(1) "," ["Text_Qualifier"]=> string(1) """ ["Include_Headers"]=> bool(true) ["Apply_Delimiter_To_Headers"]=> bool(true) ["Apply_Qualifier_To_Headers"]=> bool(true) ["Fixed_Width"]=> bool(true) ["Fixed_Widths"]=> array(2) { [0]=> object(Report_Order_By)#6 (3) { ["Report_Field_ID"]=> int(12) ["Direction"]=> NULL ["Column_Width"]=> string(3) "100" } [1]=> object(Report_Order_By)#7 (3) { ["Report_Field_ID"]=> int(54) ["Direction"]=> NULL ["Column_Width"]=> string(3) "200" } } } ["Excel_Export"]=> NULL ["Zip_File"]=> string(13) "myzipfile.zip" ["Encrypt_File"]=> bool(true) ["AES_Encrypt"]=> bool(false) ["Encrypt_Password"]=> string(20) "mys3cr3tp455w0rd5hhh" ["Export_Filename"]=> string(12) "myreport.txt" ["Delivery_Methods"]=> object(Delivery_Method)#8 (4) { ["Type"]=> string(3) "ftp" ["Share_Drive_Info"]=> NULL ["EMail_Info"]=> NULL ["FTP_Info"]=> object(FTP_Information)#9 (6) { ["Secure"]=> bool(true) ["Address"]=> string(10) "69.54.18.1" ["Port"]=> int(22) ["Path"]=> string(25) "/home/mistermister/htdocs" ["Username"]=> string(8) "direwolf" ["Password"]=> string(5) "gh05t" } } }

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

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


preferences:
38.47 ms | 409 KiB | 8 Q