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

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.0090.00618.45
8.3.50.0120.00921.21
8.3.40.0120.00619.11
8.3.30.0000.01520.29
8.3.20.0050.00320.34
8.3.10.0040.00421.22
8.3.00.0080.00022.45
8.2.180.0160.00616.75
8.2.170.0180.00022.96
8.2.160.0030.01022.30
8.2.150.0060.00324.18
8.2.140.0080.00024.66
8.2.130.0000.00826.16
8.2.120.0050.00320.66
8.2.110.0060.00319.43
8.2.100.0000.01218.03
8.2.90.0050.00519.32
8.2.80.0030.00519.45
8.2.70.0030.00617.63
8.2.60.0040.00418.18
8.2.50.0070.00318.07
8.2.40.0030.00518.02
8.2.30.0040.00419.58
8.2.20.0030.00517.79
8.2.10.0060.00317.91
8.2.00.0040.00417.89
8.1.280.0040.01125.92
8.1.270.0040.00423.99
8.1.260.0020.00526.35
8.1.250.0040.00428.09
8.1.240.0100.00022.59
8.1.230.0090.00321.00
8.1.220.0030.00518.77
8.1.210.0030.00519.05
8.1.200.0030.00617.35
8.1.190.0000.00817.65
8.1.180.0000.00818.10
8.1.170.0040.00418.71
8.1.160.0040.00418.99
8.1.150.0040.00418.65
8.1.140.0040.00417.55
8.1.130.0030.00317.92
8.1.120.0050.00217.44
8.1.110.0000.00817.59
8.1.100.0000.00717.56
8.1.90.0020.00517.48
8.1.80.0000.00817.53
8.1.70.0000.00717.52
8.1.60.0000.00917.57
8.1.50.0000.00817.51
8.1.40.0000.00817.50
8.1.30.0040.00417.76
8.1.20.0060.00317.64
8.1.10.0000.00817.54
8.1.00.0000.00817.55
8.0.300.0060.00320.02
8.0.290.0040.00417.17
8.0.280.0040.00418.58
8.0.270.0040.00417.37
8.0.260.0030.00316.93
8.0.250.0070.00016.99
8.0.240.0050.00316.98
8.0.230.0000.00717.04
8.0.220.0030.00317.02
8.0.210.0090.00017.01
8.0.200.0030.00317.07
8.0.190.0030.00617.01
8.0.180.0000.00817.02
8.0.170.0040.00416.89
8.0.160.0000.00816.94
8.0.150.0000.00716.93
8.0.140.0040.00817.00
8.0.130.0000.00613.49
8.0.120.0040.00416.92
8.0.110.0080.00017.02
8.0.100.0050.00316.93
8.0.90.0040.00416.95
8.0.80.0070.01017.00
8.0.70.0020.00516.87
8.0.60.0040.00417.06
8.0.50.0050.00217.03
8.0.30.0110.00816.91
8.0.20.0080.01217.40
8.0.10.0040.00416.94
8.0.00.0180.00316.83
7.4.330.0000.00516.85
7.4.320.0000.00616.70
7.4.300.0030.00316.58
7.4.290.0040.00416.69
7.4.280.0070.00016.52
7.4.270.0030.00316.70
7.4.260.0030.00313.38
7.4.250.0000.00816.64
7.4.240.0000.00716.65
7.4.230.0070.00016.54
7.4.220.0180.00016.67
7.4.210.0090.00716.65
7.4.200.0000.00816.51
7.4.190.0080.00016.66
7.4.160.0070.01016.67
7.4.150.0110.00717.40
7.4.140.0080.00817.86
7.4.130.0090.00716.48
7.4.120.0120.00716.63
7.4.110.0170.00016.57
7.4.100.0110.01116.69
7.4.90.0140.00316.59
7.4.80.0120.00619.39
7.4.70.0030.01316.44
7.4.60.0060.00916.57
7.4.50.0030.00616.57
7.4.40.0050.01022.77
7.4.30.0030.01316.59
7.4.00.0050.01215.05
7.3.330.0000.00513.47
7.3.320.0000.00613.30
7.3.310.0000.00716.36
7.3.300.0040.00416.37
7.3.290.0100.00616.48
7.3.280.0100.00816.37
7.3.270.0140.00417.40
7.3.260.0080.01218.24
7.3.250.0070.01116.59
7.3.240.0060.01616.75
7.3.230.0100.00716.78
7.3.210.0110.00516.68
7.3.200.0100.01219.39
7.3.190.0140.00416.68
7.3.180.0030.01316.42
7.3.170.0110.00816.62
7.3.160.0110.01116.61
7.3.120.0060.01115.02
7.3.110.0030.01314.92
7.3.100.0090.00714.97
7.3.90.0090.00715.03
7.3.80.0080.00714.97
7.3.70.0090.00414.97
7.3.60.0070.00714.73
7.3.50.0070.00614.97
7.3.40.0080.00614.96
7.3.30.0020.01114.93
7.3.20.0080.00616.81
7.3.10.0060.00816.74
7.3.00.0050.00916.62
7.2.330.0140.00416.93
7.2.320.0070.01016.79
7.2.310.0060.01316.80
7.2.300.0130.00316.89
7.2.290.0150.00316.68
7.2.250.0100.01314.88
7.2.240.0050.00915.14
7.2.230.0080.00915.17
7.2.220.0060.00815.23
7.2.210.0090.00615.02
7.2.200.0080.00815.21
7.2.190.0080.00715.18
7.2.180.0070.00815.18
7.2.170.0070.00915.09
7.2.160.0070.00915.22
7.2.150.0070.00716.64
7.2.140.0060.00616.94
7.2.130.0050.01217.05
7.2.120.0050.00916.90
7.2.110.0080.00616.87
7.2.100.0020.01216.99
7.2.90.0080.00716.98
7.2.80.0080.00717.07
7.2.70.0070.00716.93
7.2.60.0080.00716.91
7.2.50.0020.01017.11
7.2.40.0070.00816.92
7.2.30.0000.01416.95
7.2.20.0060.00816.84
7.2.10.0060.00817.03
7.2.00.0040.01017.55
7.1.330.0070.00715.88
7.1.320.0090.00615.82
7.1.310.0040.01115.73
7.1.300.0080.00515.70
7.1.290.0060.00815.72
7.1.280.0040.00715.63
7.1.270.0070.00815.86
7.1.260.0040.00915.70
7.1.250.0050.00915.86
7.1.100.0030.01018.09
7.1.70.0000.00817.20
7.1.60.0090.01619.17
7.1.50.0030.01016.96
7.1.00.0030.05722.33
7.0.200.0040.00416.92
7.0.140.0130.06022.00
7.0.100.0000.04720.06
7.0.90.0030.05319.98
7.0.80.0100.03320.02
7.0.70.0030.04320.00
7.0.60.0070.03020.06
7.0.50.0000.04720.47
7.0.40.0070.03720.00
7.0.30.0030.04320.15
7.0.20.0030.04720.19
7.0.10.0170.03020.16
7.0.00.0000.05320.07
5.6.280.0000.07721.08
5.6.250.0070.04720.68
5.6.240.0070.04320.59
5.6.230.0070.04020.66
5.6.220.0130.03320.69
5.6.210.0030.04020.68
5.6.200.0030.04321.16
5.6.190.0070.03721.04
5.6.180.0030.03721.18
5.6.170.0070.06321.16
5.6.160.0130.03020.99
5.6.150.0100.06321.13
5.6.140.0030.04321.18
5.6.130.0070.08721.16
5.6.120.0100.05321.08
5.6.110.0100.07021.13
5.6.100.0070.08021.08
5.6.90.0100.07721.16
5.6.80.0100.05720.41
5.6.70.0130.07020.49
5.6.60.0030.07320.48
5.6.50.0070.07720.48
5.6.40.0030.05020.46
5.6.30.0170.03720.52
5.6.20.0170.07320.48
5.6.10.0000.05320.38
5.6.00.0070.08020.45
5.5.380.0030.04020.49
5.5.370.0100.03320.62
5.5.360.0000.04320.48
5.5.350.0030.04020.40
5.5.340.0000.04720.80
5.5.330.0030.04021.00
5.5.320.0070.04020.96
5.5.310.0070.04020.97
5.5.300.0070.03720.91
5.5.290.0100.05720.96
5.5.280.0030.08320.96
5.5.270.0100.05320.86
5.5.260.0000.08720.84
5.5.250.0070.08320.62
5.5.240.0030.08720.28
5.5.230.0070.08020.24
5.5.220.0030.06020.34
5.5.210.0030.06720.21
5.5.200.0030.07720.32
5.5.190.0100.08020.22
5.5.180.0130.04020.34
5.5.160.0100.04320.35
5.5.150.0170.06720.21
5.5.140.0000.05320.34
5.5.130.0030.07720.34
5.5.120.0070.08320.25
5.5.110.0070.04720.22
5.5.100.0070.06320.13
5.5.90.0100.06020.15
5.5.80.0000.07320.14
5.5.70.0100.05320.18
5.5.60.0070.07320.13
5.5.50.0230.06020.11
5.5.40.0030.07020.13
5.5.30.0030.05020.18
5.5.20.0130.07320.07
5.5.10.0130.07320.05
5.5.00.0070.07020.08
5.4.450.0070.05019.52
5.4.440.0070.05019.44
5.4.430.0030.04019.36
5.4.420.0030.04719.37
5.4.410.0000.07019.09
5.4.400.0170.07018.87
5.4.390.0100.07718.89
5.4.380.0030.05319.04
5.4.370.0100.07719.09
5.4.360.0030.06719.09
5.4.350.0030.07719.22
5.4.340.0030.08719.03
5.4.320.0000.08019.23
5.4.310.0070.04718.96
5.4.300.0100.07719.04
5.4.290.0100.04719.06
5.4.280.0100.07319.18
5.4.270.0000.06719.25
5.4.260.0100.06719.02
5.4.250.0030.04719.18
5.4.240.0070.05319.12
5.4.230.0070.04318.89
5.4.220.0100.07019.11
5.4.210.0070.04718.85
5.4.200.0070.08319.23
5.4.190.0070.06019.04
5.4.180.0070.04319.23
5.4.170.0100.07319.21
5.4.160.0030.07718.84
5.4.150.0170.06719.21
5.4.140.0130.06316.42
5.4.130.0070.04016.39
5.4.120.0000.05716.41
5.4.110.0100.07016.41
5.4.100.0170.05716.50
5.4.90.0130.07016.52
5.4.80.0100.06316.43
5.4.70.0100.06316.51
5.4.60.0230.02316.49
5.4.50.0030.06716.42
5.4.40.0030.07716.52
5.4.30.0070.07016.45
5.4.20.0100.06016.41
5.4.10.0000.08316.55
5.4.00.0130.07315.78
5.3.290.0070.07714.80
5.3.280.0030.05714.79
5.3.270.0070.08014.68
5.3.260.0100.08014.75
5.3.250.0070.08014.76
5.3.240.0030.05714.63
5.3.230.0000.04314.78
5.3.220.0070.03714.59
5.3.210.0000.05014.75
5.3.200.0170.04014.59
5.3.190.0000.05314.68
5.3.180.0170.06314.68
5.3.170.0100.05014.68
5.3.160.0100.06714.66
5.3.150.0130.03714.77
5.3.140.0030.08014.75
5.3.130.0070.07314.76
5.3.120.0170.06714.64
5.3.110.0170.04014.67
5.3.100.0030.05714.11
5.3.90.0130.06014.15
5.3.80.0100.06014.03
5.3.70.0070.06314.12
5.3.60.0170.06314.07
5.3.50.0030.07714.18
5.3.40.0100.06314.15
5.3.30.0000.04314.12
5.3.20.0100.05013.94
5.3.10.0070.06313.63
5.3.00.0000.05013.73
5.2.170.0030.06313.17
5.2.160.0030.05713.17
5.2.150.0000.03313.17
5.2.140.0030.03013.17
5.2.130.0070.03713.17
5.2.120.0070.04313.17
5.2.110.0030.03013.17
5.2.100.0070.06013.17
5.2.90.0100.05013.17
5.2.80.0070.06013.17
5.2.70.0070.03313.17
5.2.60.0000.06713.17
5.2.50.0030.03713.17
5.2.40.0070.04713.17
5.2.30.0070.03313.17
5.2.20.0030.06313.17
5.2.10.0070.05713.17
5.2.00.0030.03313.17
5.1.60.0000.05313.17
5.1.50.0030.05013.17
5.1.40.0130.04313.17
5.1.30.0030.04013.17
5.1.20.0030.03313.17
5.1.10.0130.04713.17
5.1.00.0070.03713.17
5.0.50.0000.04313.17
5.0.40.0030.02713.17
5.0.30.0070.05713.17
5.0.20.0030.03013.17
5.0.10.0030.04313.17
5.0.00.0030.06313.17
4.4.90.0100.01713.17
4.4.80.0000.03013.17
4.4.70.0000.02313.17
4.4.60.0000.02313.17
4.4.50.0030.02313.17
4.4.40.0030.04713.17
4.4.30.0000.03313.17
4.4.20.0030.03313.17
4.4.10.0000.04013.17
4.4.00.0000.03013.17
4.3.110.0000.02013.17
4.3.100.0000.03313.17
4.3.90.0000.03713.17
4.3.80.0030.05013.17
4.3.70.0030.03313.17
4.3.60.0000.03713.17
4.3.50.0030.01713.17
4.3.40.0100.04013.17
4.3.30.0070.02313.17
4.3.20.0000.03013.17
4.3.10.0070.02713.17
4.3.00.0000.03713.17

preferences:
46.73 ms | 400 KiB | 5 Q