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);

Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).

VersionSystem time (s)User time (s)Memory (MiB)
5.4.270.0130.04018.87
5.4.260.0200.03719.16
5.4.250.0130.03719.16
5.4.240.0100.04019.30
5.4.230.0170.04019.07
5.4.220.0270.02318.98
5.4.210.0300.03019.21
5.4.200.0200.03318.98
5.4.190.0230.02718.83
5.4.180.0200.03319.07
5.4.170.0100.04019.07
5.4.160.0130.03719.14
5.4.150.0130.03719.07
5.4.140.0100.04016.51
5.4.130.0170.03016.42
5.4.120.0200.03716.38
5.4.110.0070.04016.61
5.4.100.0130.03316.41
5.4.90.0170.03316.61
5.4.80.0100.03716.58
5.4.70.0170.04316.39
5.4.60.0230.03016.59
5.4.50.0200.03016.39
5.4.40.0200.04016.48
5.4.30.0200.03316.39
5.4.20.0170.03716.43
5.4.10.0130.03316.58
5.4.00.0170.03016.22
5.3.280.0200.03316.22
5.3.270.0230.04316.22
5.3.260.0230.04016.22
5.3.250.0200.03016.22
5.3.240.0200.03316.22
5.3.230.0200.07716.22
5.3.220.0130.03716.22
5.3.210.0130.04016.22
5.3.200.0100.04016.22
5.3.190.0270.07316.22
5.3.180.0130.04016.22
5.3.170.0170.05316.22
5.3.160.0230.07316.22
5.3.150.0230.06716.22
5.3.140.0200.04016.22
5.3.130.0230.06716.22
5.3.120.0130.07316.22
5.3.110.0200.06716.22
5.3.100.0200.04716.22
5.3.90.0200.04716.22
5.3.80.0170.04016.22
5.3.70.0170.07716.22
5.3.60.0270.07016.22
5.3.50.0270.06316.22
5.3.40.0170.05716.22
5.3.30.0230.07316.22
5.3.20.0170.06316.22
5.3.10.0130.04316.22
5.3.00.0270.04316.22

preferences:
141.51 ms | 1394 KiB | 7 Q