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; } } $this->Text_Export = $o; } 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; } } $this->Excel_Export = $o; } 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: } $this->Delivery_Methods = $o; } } // class /*****************************************************************************************************************************/ $array = array(); $report = new ReportSettings(); $report->Report_Platform_ID = '11'; $report->Report_Type_ID = '11'; $report->Report_Field_IDs = array(11,21,31,45,6); $report->Zip_File = 'true'; $report->Encrypt_File = 'true'; $report->AES_Encrypt = 'true'; $report->Encrypt_Password = "RANDOM PASSWORD"; $report->Export_Filename = "myexport_filename.txt"; $report->Export_Type = "Text"; $fixed_widths = array( array( 'Column_Width' => '50', 'Report_Field_ID' => '24' ), array( 'Column_Width' => '50', 'Report_Field_ID' => '31' ), array( 'Column_Width' => '50', 'Report_Field_ID' => '21' ), array( 'Column_Width' => '50', 'Report_Field_ID' => '56' ) ); $report->setTextExport(array( 'Field_Delimiter' => ',', 'Text_Qualifier' => '"', 'Apply_Delimiter_To_Headers' => 'true', 'Apply_Qualifier_To_Headers' => 'true', 'Include_Headers' => 'true', 'Fixed_Width' => 'true', 'Fixed_Widths' => $fixed_widths )); $report->setDeliveryMethod(array( 'Type' => "ftp", 'Address' => "169.111.222.1", 'Path' => "/home/htdocs/uploads", 'Port' => "22", 'Username' => "myftpuser", 'Password' => "pazzwordz", 'Secure' => "false" )); var_dump($report);

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)
8.3.60.0030.01718.55
8.3.50.0060.01318.19
8.3.40.0160.00318.93
8.3.30.0150.00419.23
8.3.20.0040.00420.10
8.3.10.0060.00322.10
8.3.00.0040.00422.34
8.2.180.0070.01417.00
8.2.170.0110.01122.96
8.2.160.0120.00320.97
8.2.150.0050.00324.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0090.00019.48
8.2.110.0060.00322.26
8.2.100.0100.00319.64
8.2.90.0040.00419.20
8.2.80.0050.00519.79
8.2.70.0080.00417.50
8.2.60.0000.00818.05
8.2.50.0000.00818.07
8.2.40.0000.00818.16
8.2.30.0040.00418.19
8.2.20.0040.00417.70
8.2.10.0080.00019.52
8.2.00.0040.00417.74
8.1.270.0030.00522.27
8.1.260.0120.00026.35
8.1.250.0050.00328.09
8.1.240.0030.00623.82
8.1.230.0000.01119.27
8.1.220.0000.00817.74
8.1.210.0030.00618.77
8.1.200.0090.00017.47
8.1.190.0060.00317.63
8.1.180.0060.00318.10
8.1.170.0000.00818.61
8.1.160.0000.00822.09
8.1.150.0030.00618.71
8.1.140.0040.00417.51
8.1.130.0040.00417.81
8.1.120.0030.00517.43
8.1.110.0030.00617.49
8.1.100.0040.00417.55
8.1.90.0080.00017.53
8.1.80.0040.00417.56
8.1.70.0070.00017.41
8.1.60.0000.01117.72
8.1.50.0030.00617.59
8.1.40.0050.00317.51
8.1.30.0000.00917.60
8.1.20.0030.00617.70
8.1.10.0080.00017.71
8.1.00.0080.00017.63
8.0.300.0050.00318.77
8.0.290.0050.00217.16
8.0.280.0030.00518.46
8.0.270.0040.00417.34
8.0.260.0030.00616.89
8.0.250.0070.00016.95
8.0.240.0000.00817.00
8.0.230.0050.00316.92
8.0.220.0000.00716.98
8.0.210.0080.00016.97
8.0.200.0030.00317.09
8.0.190.0000.00816.99
8.0.180.0040.00417.01
8.0.170.0000.00816.95
8.0.160.0040.00417.00
8.0.150.0000.00816.86
8.0.140.0000.00816.97
8.0.130.0060.00013.36
8.0.120.0040.00416.91
8.0.110.0000.00816.95
8.0.100.0000.00716.76
8.0.90.0000.00817.00
8.0.80.0060.01216.92
8.0.70.0060.00317.03
8.0.60.0040.00416.96
8.0.50.0040.00417.03
8.0.30.0190.00517.19
8.0.20.0170.00517.40
8.0.10.0040.00416.89
8.0.00.0080.01316.80
7.4.330.0050.00015.05
7.4.320.0070.00016.63
7.4.300.0030.00316.63
7.4.290.0000.00716.68
7.4.280.0070.00016.71
7.4.270.0040.00416.59
7.4.260.0000.00716.46
7.4.250.0040.00416.60
7.4.240.0050.00316.49
7.4.230.0050.00216.65
7.4.220.0150.00416.61
7.4.210.0080.00816.66
7.4.200.0000.00716.46
7.4.190.0030.00516.65
7.4.160.0120.01216.41
7.4.150.0140.00817.40
7.4.140.0170.02017.86
7.4.130.0100.01716.68
7.4.120.0090.01016.53
7.4.110.0120.00616.68
7.4.100.0160.00316.54
7.4.90.0140.00716.48
7.4.80.0150.00919.39
7.4.70.0110.00816.61
7.4.60.0160.00816.54
7.4.50.0030.00616.71
7.4.40.0070.01022.77
7.4.30.0070.01016.47
7.4.00.0090.00714.96
7.3.330.0000.00613.47
7.3.320.0030.00313.38
7.3.310.0000.00716.50
7.3.300.0040.00416.49
7.3.290.0060.01216.45
7.3.280.0050.01416.39
7.3.270.0150.00317.40
7.3.260.0160.00916.46
7.3.250.0120.00816.50
7.3.240.0130.00616.45
7.3.230.0060.01316.50
7.3.210.0100.01316.75
7.3.200.0100.01019.39
7.3.190.0150.01016.79
7.3.180.0090.00916.40
7.3.170.0040.01416.38
7.3.160.0120.00616.77
7.3.120.0070.01015.06
7.3.110.0100.01014.85
7.3.100.0140.00014.77
7.3.90.0030.00614.70
7.3.80.0000.01214.83
7.3.70.0030.01214.92
7.3.60.0070.00414.96
7.3.50.0100.00614.84
7.3.40.0130.00314.71
7.3.30.0000.01814.80
7.3.20.0100.00716.63
7.3.10.0090.00616.27
7.3.00.0080.00816.81
7.2.330.0090.01116.63
7.2.320.0100.01016.94
7.2.310.0030.01616.68
7.2.300.0070.01716.93
7.2.290.0110.00716.91
7.2.250.0030.01615.28
7.2.240.0100.01015.21
7.2.230.0100.00714.87
7.2.220.0100.00715.37
7.2.210.0030.00714.98
7.2.200.0030.01415.30
7.2.190.0080.00415.21
7.2.180.0030.00915.18
7.2.170.0070.00715.21
7.2.60.0030.01017.04
7.2.00.0000.01219.25
7.1.330.0100.00315.77
7.1.320.0090.00916.04
7.1.310.0030.00615.85
7.1.300.0060.00315.74
7.1.290.0090.00915.67
7.1.280.0060.01015.75
7.1.270.0030.01315.84
7.1.260.0040.01115.70
7.1.200.0040.00815.73
7.1.100.0310.01216.02
7.1.70.0060.00617.10
7.1.60.0160.01019.82
7.1.50.0000.01117.04
7.1.00.0030.08022.46
7.0.200.0060.00316.93
7.0.140.0000.07722.17
7.0.100.0070.07720.10
7.0.90.0000.04720.04
7.0.80.0200.08319.92
7.0.70.0170.07020.06
7.0.60.0130.09019.97
7.0.50.0500.08020.46
7.0.40.0070.04720.06
7.0.30.0030.06720.13
7.0.20.0100.07720.18
7.0.10.0030.09020.07
7.0.00.0170.06320.11
5.6.280.0100.08721.16
5.6.250.0170.07720.73
5.6.240.0100.08320.63
5.6.230.0100.04720.53
5.6.220.0100.07320.61
5.6.210.0070.08320.77
5.6.200.0130.06721.16
5.6.190.0030.06721.04
5.6.180.0130.07021.12
5.6.170.0100.04321.04
5.6.160.0130.07721.16
5.6.150.0070.08021.18
5.6.140.0030.05021.09
5.6.130.0130.07321.02
5.6.120.0070.05021.09
5.6.110.0130.08321.02
5.6.100.0030.08721.09
5.6.90.0030.04720.99
5.6.80.0000.04320.52
5.6.70.0000.06020.47
5.6.60.0030.04320.53
5.6.50.0070.03720.49
5.6.40.0130.04020.36
5.6.30.0070.03720.32
5.6.20.0100.03320.44
5.6.10.0030.04020.51
5.6.00.0000.03720.47
5.5.380.0070.07320.47
5.5.370.0070.08320.42
5.5.360.0070.04320.39
5.5.350.0070.08020.46
5.5.340.0100.05320.96
5.5.330.0100.04320.89
5.5.320.0170.06720.86
5.5.310.0100.07021.01
5.5.300.0070.08320.80
5.5.290.0170.06020.83
5.5.280.0100.04320.93
5.5.270.0130.08320.80
5.5.260.0100.08020.80
5.5.250.0100.04320.74
5.5.240.0030.04020.24
5.5.230.0070.05020.25
5.5.220.0070.03720.37
5.5.210.0070.03720.35
5.5.200.0000.05020.20
5.5.190.0030.04020.19
5.5.180.0100.03720.31
5.5.160.0000.03720.24
5.5.150.0070.03020.30
5.5.140.0000.03720.23
5.5.130.0100.03020.34
5.5.120.0030.05020.23
5.5.110.0030.04020.30
5.5.100.0070.04320.14
5.5.90.0070.03720.14
5.5.80.0030.04720.22
5.5.70.0070.03720.22
5.5.60.0000.04320.18
5.5.50.0100.03720.13
5.5.40.0030.04020.15
5.5.30.0000.04320.03
5.5.20.0030.04020.07
5.5.10.0100.03320.00
5.5.00.0030.04020.04
5.4.450.0030.05019.22
5.4.440.0000.07019.52
5.4.430.0100.08019.18
5.4.420.0130.07019.39
5.4.410.0030.04719.41
5.4.400.0070.07319.07
5.4.390.0070.03319.23
5.4.380.0030.03718.91
5.4.370.0070.03319.23
5.4.360.0030.04019.18
5.4.350.0070.03719.19
5.4.340.0030.03718.86
5.4.320.0030.03719.16
5.4.310.0030.03019.14
5.4.300.0130.04319.13
5.4.290.0070.03018.92
5.4.280.0000.04018.90
5.4.270.0170.02018.87
5.4.260.0030.03719.22
5.4.250.0000.05718.85
5.4.240.0030.04019.22
5.4.230.0000.04019.13
5.4.220.0070.03719.05
5.4.210.0100.03718.95
5.4.200.0070.03719.18
5.4.190.0070.05019.02
5.4.180.0030.04319.11
5.4.170.0070.03318.88
5.4.160.0000.04019.11
5.4.150.0070.04719.21
5.4.140.0000.03716.46
5.4.130.0030.03316.50
5.4.120.0030.02716.49
5.4.110.0070.03016.57
5.4.100.0000.04316.54
5.4.90.0030.03716.50
5.4.80.0030.03016.39
5.4.70.0000.03716.52
5.4.60.0000.04016.50
5.4.50.0100.02716.51
5.4.40.0030.03716.41
5.4.30.0030.03016.45
5.4.20.0070.04316.49
5.4.10.0130.07016.41
5.4.00.0100.05715.91
5.3.290.0030.03315.74
5.3.280.0030.03715.74
5.3.270.0030.04015.74
5.3.260.0070.03315.74
5.3.250.0000.03715.74
5.3.240.0030.03715.74
5.3.230.0070.03715.74
5.3.220.0100.02715.74
5.3.210.0070.02715.74
5.3.200.0070.03315.74
5.3.190.0030.03715.74
5.3.180.0070.02715.74
5.3.170.0000.04015.74
5.3.160.0070.03315.74
5.3.150.0070.03015.74
5.3.140.0000.03715.74
5.3.130.0100.03315.74
5.3.120.0000.03715.74
5.3.110.0030.08315.74
5.3.100.0030.08715.74
5.3.90.0070.07015.74
5.3.80.0000.04015.74
5.3.70.0030.03715.74
5.3.60.0130.07015.74
5.3.50.0000.08015.74
5.3.40.0070.05715.74
5.3.30.0100.07015.74
5.3.20.0100.07015.74
5.3.10.0100.05015.74
5.3.00.0070.07315.74
5.2.170.0070.06315.74
5.2.160.0130.05015.74
5.2.150.0070.06315.74
5.2.140.0070.06315.74
5.2.130.0070.06015.74
5.2.120.0000.06715.74
5.2.110.0030.06315.74
5.2.100.0070.06315.74
5.2.90.0100.05715.74
5.2.80.0070.05315.74
5.2.70.0030.07015.74
5.2.60.0100.06015.74
5.2.50.0030.06315.74
5.2.40.0070.04015.74
5.2.30.0100.04715.74
5.2.20.0000.06715.74
5.2.10.0070.06015.74
5.2.00.0070.05015.74
5.1.60.0030.04715.74
5.1.50.0030.05315.74
5.1.40.0030.04015.74
5.1.30.0130.02315.74
5.1.20.0070.04015.74
5.1.10.0100.03715.74
5.1.00.0000.05315.74
5.0.50.0070.03715.74
5.0.40.0030.02315.74
5.0.30.0030.07015.74
5.0.20.0100.03315.74
5.0.10.0030.04715.74
5.0.00.0030.03315.74
4.4.90.0030.03715.74
4.4.80.0000.04015.74
4.4.70.0030.01715.74
4.4.60.0000.03315.74
4.4.50.0000.02015.74
4.4.40.0000.03015.74
4.4.30.0000.02015.74
4.4.20.0000.04015.74
4.4.10.0030.03715.74
4.4.00.0030.02715.74
4.3.110.0000.01715.74
4.3.100.0000.03715.74
4.3.90.0000.02015.74
4.3.80.0030.03015.74
4.3.70.0030.02715.74
4.3.60.0070.03015.74
4.3.50.0100.02715.74
4.3.40.0070.05015.74
4.3.30.0000.03315.74
4.3.20.0000.02715.74
4.3.10.0030.03015.74
4.3.00.0000.03715.74

preferences:
56.25 ms | 400 KiB | 5 Q