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( 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( 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 ) ); var_dump($test);

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.0110.00418.43
8.3.50.0090.00821.14
8.3.40.0120.00318.87
8.3.30.0120.00320.29
8.3.20.0050.00320.29
8.3.10.0080.00021.22
8.3.00.0040.00422.34
8.2.180.0200.00316.75
8.2.170.0120.00322.96
8.2.160.0090.00622.11
8.2.150.0050.00324.18
8.2.140.0040.00724.66
8.2.130.0050.00326.16
8.2.120.0080.00020.68
8.2.110.0000.00919.39
8.2.100.0070.00318.03
8.2.90.0030.00519.34
8.2.80.0000.00818.05
8.2.70.0030.00717.63
8.2.60.0000.00818.18
8.2.50.0090.00018.07
8.2.40.0030.00618.20
8.2.30.0000.00719.59
8.2.20.0040.00417.73
8.2.10.0040.00417.74
8.2.00.0040.00417.90
8.1.280.0040.01125.92
8.1.270.0040.00423.99
8.1.260.0000.00926.35
8.1.250.0080.00028.09
8.1.240.0030.00622.44
8.1.230.0110.00321.04
8.1.220.0030.00618.77
8.1.210.0040.00419.10
8.1.200.0000.00917.60
8.1.190.0000.00917.66
8.1.180.0030.00618.10
8.1.170.0050.00318.79
8.1.160.0030.00619.02
8.1.150.0030.00618.64
8.1.140.0030.00517.48
8.1.130.0030.00317.98
8.1.120.0000.00717.58
8.1.110.0090.00317.59
8.1.100.0000.00717.50
8.1.90.0040.00417.64
8.1.80.0000.00817.57
8.1.70.0070.00017.47
8.1.60.0030.00617.73
8.1.50.0000.00817.61
8.1.40.0040.00417.63
8.1.30.0030.00617.75
8.1.20.0090.00017.64
8.1.10.0050.00517.66
8.1.00.0030.00617.59
8.0.300.0000.00720.15
8.0.290.0040.00417.30
8.0.280.0040.00418.42
8.0.270.0030.00317.36
8.0.260.0040.00416.80
8.0.250.0060.00317.05
8.0.240.0000.00817.01
8.0.230.0020.00517.08
8.0.220.0040.00416.89
8.0.210.0000.00716.98
8.0.200.0040.00417.09
8.0.190.0050.00216.97
8.0.180.0030.00516.95
8.0.170.0040.00416.98
8.0.160.0030.00617.02
8.0.150.0030.00616.87
8.0.140.0060.00316.95
8.0.130.0000.00713.46
8.0.120.0080.00016.95
8.0.110.0000.00816.95
8.0.100.0000.00817.00
8.0.90.0040.00417.02
8.0.80.0160.00716.90
8.0.70.0080.00017.06
8.0.60.0030.00516.97
8.0.50.0000.00717.02
8.0.30.0130.00817.24
8.0.20.0100.01117.48
8.0.10.0050.00316.97
8.0.00.0090.01316.75
7.4.330.0000.00516.73
7.4.320.0030.00316.72
7.4.300.0030.00316.66
7.4.290.0030.00516.46
7.4.280.0080.00016.74
7.4.270.0000.00716.54
7.4.260.0030.00313.37
7.4.250.0000.00716.62
7.4.240.0040.00416.63
7.4.230.0000.00716.50
7.4.220.0130.01316.64
7.4.210.0050.01016.66
7.4.200.0040.00416.69
7.4.190.0000.00816.70
7.4.160.0100.01016.47
7.4.150.0130.00817.40
7.4.140.0160.00817.86
7.4.130.0100.00916.60
7.4.120.0120.00916.64
7.4.110.0030.01616.71
7.4.100.0090.00916.50
7.4.90.0100.01416.65
7.4.80.0030.01419.39
7.4.70.0100.01316.62
7.4.60.0120.01116.58
7.4.50.0080.00016.57
7.4.40.0100.00622.77
7.4.30.0070.01116.61
7.4.00.0070.01115.08
7.3.330.0050.00013.33
7.3.320.0060.00013.43
7.3.310.0000.00716.50
7.3.300.0050.00316.46
7.3.290.0080.01216.41
7.3.280.0060.01216.39
7.3.270.0140.00417.40
7.3.260.0150.00918.24
7.3.250.0140.00816.71
7.3.240.0080.01116.57
7.3.230.0110.01416.72
7.3.210.0100.01016.64
7.3.200.0140.01119.39
7.3.190.0150.01016.35
7.3.180.0070.01116.39
7.3.170.0090.01316.53
7.3.160.0070.01016.43
7.3.120.0040.01115.14
7.3.10.0100.00316.48
7.3.00.0060.00916.84
7.2.330.0100.01016.82
7.2.320.0150.00616.83
7.2.310.0100.01016.91
7.2.300.0070.01016.90
7.2.290.0060.01316.79
7.2.130.0060.00916.73
7.2.120.0060.00916.98
7.2.110.0110.00316.88
7.2.100.0140.00316.78
7.2.90.0120.00417.07
7.2.80.0030.01017.00
7.2.70.0030.01016.79
7.2.60.0070.01017.13
7.2.50.0060.00917.05
7.2.40.0030.00916.95
7.2.30.0060.00616.99
7.2.20.0170.00016.98
7.2.10.0100.00716.99
7.2.00.0070.00918.09
7.1.250.0030.01015.86
7.1.100.0030.00618.23
7.1.70.0000.00716.88
7.1.60.0120.01219.17
7.1.50.0300.01034.90
7.1.00.0000.04322.58
7.0.200.0050.00316.94
7.0.140.0070.07022.08
7.0.100.0070.04320.01
7.0.90.0070.04320.08
7.0.80.0000.04720.07
7.0.70.0100.04020.01
7.0.60.0170.03320.14
7.0.50.0100.03720.38
7.0.40.0100.08020.13
7.0.30.0100.04720.15
7.0.20.0070.09020.09
7.0.10.0100.06720.10
7.0.00.0170.07019.99
5.6.280.0070.07321.18
5.6.250.0070.03320.56
5.6.240.0000.04320.56
5.6.230.0030.04020.69
5.6.220.0070.04720.75
5.6.210.0030.05720.66
5.6.200.0070.05321.03
5.6.190.0070.03721.21
5.6.180.0000.07721.14
5.6.170.0200.07721.09
5.6.160.0070.08021.01
5.6.150.0070.07721.19
5.6.140.0030.08021.09
5.6.130.0030.07321.09
5.6.120.0070.08021.13
5.6.110.0070.05721.18
5.6.100.0070.07721.14
5.6.90.0100.08721.00
5.6.80.0030.08020.55
5.6.70.0130.07320.56
5.6.60.0100.07720.48
5.6.50.0100.08020.51
5.6.40.0100.07720.46
5.6.30.0170.07020.54
5.6.20.0070.08020.61
5.6.10.0070.08320.43
5.6.00.0000.08720.33
5.5.380.0170.03020.42
5.5.370.0070.04320.42
5.5.360.0070.04720.42
5.5.350.0000.04320.50
5.5.340.0070.06020.96
5.5.330.0030.08720.86
5.5.320.0070.04320.97
5.5.310.0130.04720.95
5.5.300.0100.04320.99
5.5.290.0030.06720.90
5.5.280.0100.03720.81
5.5.270.0070.05320.85
5.5.260.0070.08320.89
5.5.250.0100.08020.79
5.5.240.0170.07320.37
5.5.230.0200.07020.28
5.5.220.0200.06320.37
5.5.210.0170.07320.25
5.5.200.0070.06720.29
5.5.190.0130.07720.29
5.5.180.0130.07320.25
5.5.160.0070.06020.07
5.5.150.0130.07020.16
5.5.140.0130.04320.28
5.5.130.0100.05320.27
5.5.120.0070.08720.27
5.5.110.0070.07320.30
5.5.100.0170.07020.13
5.5.90.0030.08320.08
5.5.80.0170.06720.20
5.5.70.0030.08020.13
5.5.60.0030.05720.13
5.5.50.0070.08020.07
5.5.40.0070.06720.22
5.5.30.0130.07320.09
5.5.20.0030.08720.01
5.5.10.0000.08020.02
5.5.00.0100.07320.03
5.4.450.0000.06319.56
5.4.440.0100.06719.45
5.4.430.0170.07319.50
5.4.420.0200.07319.20
5.4.410.0070.05019.10
5.4.400.0100.07719.07
5.4.390.0070.07719.03
5.4.380.0030.07719.09
5.4.370.0130.07719.13
5.4.360.0100.05319.04
5.4.350.0130.07019.10
5.4.340.0070.07319.16
5.4.320.0070.07719.19
5.4.310.0130.07319.16
5.4.300.0070.07718.96
5.4.290.0130.06719.12
5.4.280.0000.08718.95
5.4.270.0100.04718.86
5.4.260.0030.08019.12
5.4.250.0170.03719.12
5.4.240.0070.04719.04
5.4.230.0030.08319.12
5.4.220.0100.06318.95
5.4.210.0030.08019.08
5.4.200.0100.07719.05
5.4.190.0030.05019.02
5.4.180.0070.04018.89
5.4.170.0100.07018.95
5.4.160.0130.03319.24
5.4.150.0030.04018.88
5.4.140.0000.05316.48
5.4.130.0100.07316.51
5.4.120.0000.07016.46
5.4.110.0130.05716.54
5.4.100.0100.07316.50
5.4.90.0100.07016.49
5.4.80.0100.04716.47
5.4.70.0070.06716.40
5.4.60.0130.07316.42
5.4.50.0030.07316.50
5.4.40.0070.07716.35
5.4.30.0100.06716.53
5.4.20.0130.06716.45
5.4.10.0030.04716.48
5.4.00.0270.05715.96
5.3.290.0100.04314.81
5.3.280.0100.07314.78
5.3.270.0000.04714.75
5.3.260.0070.05714.71
5.3.250.0070.04714.71
5.3.240.0070.08014.70
5.3.230.0030.05714.66
5.3.220.0070.07714.61
5.3.210.0130.06314.66
5.3.200.0170.06014.77
5.3.190.0100.07014.79
5.3.180.0070.07314.59
5.3.170.0000.08314.60
5.3.160.0000.08014.77
5.3.150.0130.07014.71
5.3.140.0070.07014.66
5.3.130.0000.08014.56
5.3.120.0130.07014.70
5.3.110.0130.06014.73
5.3.100.0030.07014.08
5.3.90.0070.07314.14
5.3.80.0000.05014.24
5.3.70.0030.07714.25
5.3.60.0030.06014.21
5.3.50.0070.04014.05
5.3.40.0070.06714.07
5.3.30.0030.06314.05
5.3.20.0000.06013.83
5.3.10.0070.07313.72
5.3.00.0070.04313.71
5.2.170.0130.04711.64
5.2.160.0030.04011.64
5.2.150.0070.06311.64
5.2.140.0030.05711.64
5.2.130.0070.06011.64
5.2.120.0200.03311.64
5.2.110.0000.06711.64
5.2.100.0030.06311.64
5.2.90.0070.06311.64
5.2.80.0100.05311.64
5.2.70.0070.05011.64
5.2.60.0070.05711.64
5.2.50.0030.06711.64
5.2.40.0030.06011.64
5.2.30.0100.05711.64
5.2.20.0070.06011.64
5.2.10.0070.06011.64
5.2.00.0070.06011.64
5.1.60.0070.05711.64
5.1.50.0030.03711.64
5.1.40.0070.04711.64
5.1.30.0000.06311.64
5.1.20.0070.04711.64
5.1.10.0030.05011.64
5.1.00.0030.06011.64
5.0.50.0000.03311.64
5.0.40.0000.03311.64
5.0.30.0000.05011.64
5.0.20.0130.03711.64
5.0.10.0070.03311.64
5.0.00.0070.05311.64
4.4.90.0030.03711.64
4.4.80.0030.03711.64
4.4.70.0000.03311.64
4.4.60.0000.02711.64
4.4.50.0030.03311.64
4.4.40.0030.04311.64
4.4.30.0000.03711.64
4.4.20.0070.02311.64
4.4.10.0100.02311.64
4.4.00.0030.04311.64
4.3.110.0030.04711.64
4.3.100.0070.03011.64
4.3.90.0000.04711.64
4.3.80.0030.02711.64
4.3.70.0000.03011.64
4.3.60.0030.03311.64
4.3.50.0000.03311.64
4.3.40.0000.05311.64
4.3.30.0070.03011.64
4.3.20.0000.03311.64
4.3.10.0000.03711.64
4.3.00.0030.02711.64

preferences:
44.42 ms | 401 KiB | 5 Q