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 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 Fixed_Width_Info { public $Report_Field_ID; public $Column_Width; } 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; } class Header_Formatting { public $Report_Field_ID; public $Bold; public $Italic; public $Underline; public $Alignment; } class Excel_Export_Formatting { public $Type; public $Include_Headers; public $Include_Data_Tab; public $Header_Format = array(); // array of Header_Formatting objects public $Column_Format = array(); // array of Column_Formatting objects public $Table_Theming; } class Delivery_Method { public $Type; public $Share_Drive_Info; public $EMail_Info; public $FTP_Info; } class FTP_Information { public $Secure; public $Address; public $Port; public $Path; public $Username; public $Password; } class EMail_Information { public $Recipient; public $CC_Recipient; public $BCC_Recipient; public $Subject; public $Body; } class Share_Drive_Information { public $Address; public $Username; public $Password; } class ReportSettings { public $Report_Platform_ID = null; public $Report_Type_ID = null; public $Zip_File = null; public $Encrypt_File = null; public $AES_Encrypt = null; public $Encrypt_Password = "RANDOM PASSWORD"; public $Export_Filename = null; public $Export_Type = "Text"; public $Report_Field_IDs = array(); // array with native type /* Requires setter methods */ // Setter method: setReportFilters() public $Report_Filters = array(); // array with Report_Filter objects // Setter method: setReportOrderBy() public $Report_Order_Bys = array(); // array with Report_Order_By objects // Setter method: setTextExport() public $Text_Export; // Setter method: setExcelExport() public $Excel_Export; // Setter method: setDeliveryMethod() public $Delivery_Methods; public function setReportFilters($data) { foreach($data as $d) { $o = new Report_Filter(); $o->Report_Field_ID = $d['Report_Field_ID']; $o->Comparison = $d['Comparison']; $o->Value = $d['Value']; $o->And_Or = $d['And_Or']; $this->Report_Filters[] = $o; } } public function setReportOrderBy($data) { foreach($data as $d) { $o = new Report_Order_By(); $o->Report_Field_ID = $d['Report_Field_ID']; $o->Direction = $d['Direction']; $this->Report_Order_Bys[] = $o; } } public function setTextExport($data) { $o = new Text_Export_Formatting(); $o->Field_Delimiter = $data['Field_Delimiter']; $o->Text_Qualifier = $data['Text_Qualifier']; $o->Apply_Delimiter_To_Headers = $data['Apply_Delimiter_To_Headers']; $o->Apply_Qualifier_To_Headers = $data['Apply_Qualifier_To_Headers']; $o->Include_Headers = $data['Include_Headers']; $o->Fixed_Width = $data['Fixed_Width']; if($data['Fixed_Width']) { foreach ($data['Fixed_Widths'] as $w) { $fw = new Fixed_Width_Info(); $fw->Column_Width = $w['Column_Width']; $fw->Report_Field_ID = $w['Report_Field_ID']; $o->Fixed_Widths[] = $fw; } } } public function setExcelExport($data) { $o = new Excel_Export_Formatting(); $o->Type = $data['Type']; $o->Include_Headers = $data['Include_Headers']; $o->Include_Data_Tab = $data['Include_Data_Tab']; if($data['Header_Format']) { foreach ($data['Header_Format'] as $d) { $hf = new Header_Formatting(); $hf->Report_Field_ID = $d['Report_Field_ID']; $hf->Alignment = $d['Alignment']; $hf->Bold = $d['Bold']; $hf->Italic = $d['Italic']; $hf->Underline = $d['Underline']; $o->Column_Format[] = $hf; } } if($data['Column_Format']) { foreach ($data['Column_Format'] as $d) { $cf = new Column_Formatting(); $cf->Report_Field_ID = $d['Report_Field_ID']; $cf->Alignment = $d['Alignment']; $cf->Bold = $d['Bold']; $cf->Italic = $d['Italic']; $cf->Data_Type = $d['Data_Type']; $cf->Underline = $d['Underline']; $cf->Summary_Type = $d['Summary_Type']; $cf->Total = $d['Total']; $o->Column_Format[] = $cf; } } } public function setDeliveryMethod($data) { $o = new Delivery_Method(); $o->Type = $data['Type']; switch ($data['Type']) { case 'ftp' : $f = new FTP_Information(); $f->Address = $data['Address']; $f->Path = $data['Path']; $f->Port = $data['Port']; $f->Username = $data['Username']; $f->Password = $data['Password']; $f->Secure = $data['Secure']; $o->FTP_Info = $f; break; case 'email' : $e = new EMail_Information(); $e->Subject = $data['Subject']; $e->Recipient = $data['Recipient']; $e->CC_Recipient = $data['CC_Recipient']; $e->BCC_Recipient = $data['BCC_Recipient']; $e->Body = $data['Body']; $o->EMail_Info = $e; break; case 'shared': $s = new Share_Drive_Information(); $s->Username = $data['Username']; $s->Password = $data['Password']; $s->Address = $data['Address']; $o->Share_Drive_Info = $s; break; default: } } } // TEST $test = new ReportSettings(); $test->Report_Platform_ID = 11; $test->Report_Type_ID = 7; $test->Zip_File = 'myzipfile.zip'; $test->Encrypt_File = true; $test->AES_Encrypt = true; $test->Encrypt_Password = 'p455w0rd'; $test->Export_Filename = 'myexportfile.txt'; $test->Export_Type = 'Text'; $test->Report_Field_IDs = array(32,12,66,1,13); $test->setReportFilters( array( 'Report_Field_ID' => '32', 'Comparison' => '=', 'Value' => 'thisvalue', 'And_Or' => null ), array( 'Report_Field_ID' => '12', 'Comparison' => '>', 'Value' => '100', 'And_Or' => 'or' ) ); $test->setReportOrderBy( array( 'Report_Field_ID' => '32', 'Direction' => 'ASC' ) ); $test->setTextExport( array( 'Field_Delimiter' => '\,', 'Text_Qualifier' => '\"', 'Apply_Delimiter_To_Headers' => true, 'Apply_Qualifier_To_Headers' => true, 'Include_Headers' => true, 'Fixed_Width' => false ) ); $test->setDeliveryMethod( array( 'Type' => 'ftp', 'Address' => '12.33.44.44', 'Path' => '/home/htdocs/files', 'Port' => '21' 'Username' => 'myuser', 'Password' => 'mypassword', 'Secure' => false ) );

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.280.0100.03912.51
5.4.270.0080.04412.51
5.4.260.0090.04412.51
5.4.250.0080.04312.51
5.4.240.0070.04012.51
5.4.230.0050.04112.50
5.4.220.0070.03812.50
5.4.210.0080.04212.50
5.4.200.0120.04912.50
5.4.190.0100.04812.50
5.4.180.0100.04312.49
5.4.170.0050.03912.50
5.4.160.0080.04112.50
5.4.150.0050.04212.49
5.4.140.0050.04012.18
5.4.130.0070.04312.17
5.4.120.0090.03612.13
5.4.110.0130.05012.12
5.4.100.0080.04212.12
5.4.90.0060.04512.13
5.4.80.0070.04012.13
5.4.70.0050.03812.12
5.4.60.0050.03812.12
5.4.50.0060.04512.12
5.4.40.0050.03912.11
5.4.30.0050.03812.11
5.4.20.0060.03812.10
5.4.10.0050.03912.11
5.4.00.0060.04311.60
5.3.280.0070.04112.76
5.3.270.0050.04212.77
5.3.260.0070.04112.77
5.3.250.0090.03712.77
5.3.240.0070.04012.77
5.3.230.0090.03912.76
5.3.220.0070.03812.73
5.3.210.0060.04812.73
5.3.200.0100.04212.73
5.3.190.0120.03912.73
5.3.180.0090.04612.73
5.3.170.0090.04612.72
5.3.160.0120.04612.72
5.3.150.0110.04612.72
5.3.140.0080.04512.72
5.3.130.0090.03912.71
5.3.120.0080.04312.71
5.3.110.0070.04212.71
5.3.100.0080.03612.20
5.3.90.0060.03812.18
5.3.80.0080.03612.17
5.3.70.0060.04012.17
5.3.60.0070.03712.15
5.3.50.0070.03712.10
5.3.40.0110.03512.10
5.3.30.0090.03712.07
5.3.20.0070.03811.85
5.3.10.0100.03211.80
5.3.00.0080.03811.80

preferences:
138.59 ms | 1394 KiB | 7 Q