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: } } } // class /*****************************************************************************************************************************/ $array = array(); $report = new ReportSettings(); $report->Report_Platform_ID = '11'; $report->Report_Type_ID = '11'; $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"; $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 = 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( '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.0090.00618.54
8.3.50.0220.00521.99
8.3.40.0120.00318.73
8.3.30.0150.00019.09
8.3.20.0080.00020.42
8.3.10.0040.00421.97
8.3.00.0040.00422.43
8.2.180.0070.00716.50
8.2.170.0150.00422.96
8.2.160.0070.00721.06
8.2.150.0000.00824.18
8.2.140.0000.00824.66
8.2.130.0000.00726.16
8.2.120.0050.00319.48
8.2.110.0030.00720.65
8.2.100.0090.00317.82
8.2.90.0000.00819.32
8.2.80.0050.00318.04
8.2.70.0060.00617.75
8.2.60.0080.00018.16
8.2.50.0030.00618.07
8.2.40.0080.00018.47
8.2.30.0040.00418.23
8.2.20.0000.00817.86
8.2.10.0000.00819.65
8.2.00.0000.00817.89
8.1.280.0110.01125.92
8.1.270.0080.00022.12
8.1.260.0050.00326.35
8.1.250.0080.00028.09
8.1.240.0060.00323.80
8.1.230.0040.00824.01
8.1.220.0050.00317.91
8.1.210.0040.00418.77
8.1.200.0070.00317.47
8.1.190.0080.00017.79
8.1.180.0030.00618.10
8.1.170.0000.01018.47
8.1.160.0050.00222.11
8.1.150.0110.00018.74
8.1.140.0000.00917.55
8.1.130.0050.00218.01
8.1.120.0050.00217.57
8.1.110.0000.00917.58
8.1.100.0040.00417.46
8.1.90.0050.00317.50
8.1.80.0040.00417.54
8.1.70.0000.00817.45
8.1.60.0030.00617.57
8.1.50.0040.00417.62
8.1.40.0040.00417.51
8.1.30.0050.00317.57
8.1.20.0050.00317.73
8.1.10.0030.00517.74
8.1.00.0040.00417.56
8.0.300.0040.00418.77
8.0.290.0050.00217.28
8.0.280.0030.00318.47
8.0.270.0050.00317.28
8.0.260.0030.00316.98
8.0.250.0000.00717.08
8.0.240.0040.00417.14
8.0.230.0000.00817.03
8.0.220.0000.00717.02
8.0.210.0040.00417.04
8.0.200.0050.00217.09
8.0.190.0050.00217.08
8.0.180.0000.00717.13
8.0.170.0030.00516.96
8.0.160.0030.00617.03
8.0.150.0040.00417.03
8.0.140.0040.00416.91
8.0.130.0060.00013.48
8.0.120.0000.00816.95
8.0.110.0040.00417.06
8.0.100.0000.00717.11
8.0.90.0020.00516.99
8.0.80.0030.01316.98
8.0.70.0040.00417.03
8.0.60.0050.00316.94
8.0.50.0040.00417.03
8.0.30.0130.00917.39
8.0.20.0140.01017.40
8.0.10.0000.00817.05
8.0.00.0120.00916.86
7.4.330.0000.00515.00
7.4.320.0000.00716.48
7.4.300.0030.00316.69
7.4.290.0030.00316.73
7.4.280.0030.00316.69
7.4.270.0030.00316.62
7.4.260.0060.00316.70
7.4.250.0030.00516.56
7.4.240.0030.00516.61
7.4.230.0000.00816.51
7.4.220.0060.01616.68
7.4.210.0090.00616.70
7.4.200.0000.00716.50
7.4.190.0070.00016.71
7.4.160.0100.00816.64
7.4.150.0080.01117.40
7.4.140.0100.00917.86
7.4.130.0160.00516.57
7.4.120.0100.01116.62
7.4.110.0040.01516.49
7.4.100.0100.01016.60
7.4.90.0140.00516.48
7.4.80.0100.01319.39
7.4.70.0080.01416.57
7.4.60.0100.00716.50
7.4.50.0050.00016.28
7.4.40.0100.00522.77
7.4.30.0040.01416.65
7.4.10.0100.01015.03
7.4.00.0060.01015.14
7.3.330.0000.00613.49
7.3.320.0000.00513.46
7.3.310.0050.00516.49
7.3.300.0000.00816.39
7.3.290.0090.00616.55
7.3.280.0080.01016.52
7.3.270.0150.00517.40
7.3.260.0130.01916.47
7.3.250.0120.00616.47
7.3.240.0110.00716.52
7.3.230.0060.02016.48
7.3.210.0090.00916.48
7.3.200.0090.00919.39
7.3.190.0120.00716.54
7.3.180.0110.00516.73
7.3.170.0170.00616.43
7.3.160.0070.01016.57
7.3.130.0070.01414.95
7.3.120.0070.01014.94
7.3.110.0070.01115.11
7.3.100.0060.01015.06
7.3.90.0070.01015.11
7.3.80.0060.01014.97
7.3.70.0080.00814.93
7.3.60.0080.00514.89
7.3.50.0050.00814.94
7.3.40.0060.00714.99
7.3.30.0050.00714.93
7.3.20.0040.00816.75
7.3.10.0030.01016.67
7.3.00.0050.00816.77
7.2.330.0120.00616.70
7.2.320.0160.00816.44
7.2.310.0150.00316.68
7.2.300.0140.00916.93
7.2.290.0040.01416.58
7.2.260.0090.01215.11
7.2.250.0090.01015.16
7.2.240.0050.01315.29
7.2.230.0080.00715.16
7.2.220.0070.00915.01
7.2.210.0010.01315.20
7.2.200.0070.00815.06
7.2.190.0090.00615.08
7.2.180.0050.01115.08
7.2.170.0050.00915.10
7.2.160.0060.00614.82
7.2.150.0000.01216.79
7.2.140.0050.01117.00
7.2.130.0070.00816.79
7.2.120.0070.00716.85
7.2.110.0060.00617.00
7.2.100.0090.00516.87
7.2.90.0050.00717.06
7.2.80.0070.00717.06
7.2.70.0090.00716.96
7.2.60.0040.01016.93
7.2.50.0040.01016.96
7.2.40.0060.00817.04
7.2.30.0070.00916.89
7.2.20.0040.01016.80
7.2.10.0060.00616.86
7.2.00.0060.01017.46
7.1.330.0040.01215.63
7.1.320.0070.00815.73
7.1.310.0070.00815.69
7.1.300.0060.00515.86
7.1.290.0080.00715.80
7.1.280.0040.00815.87
7.1.270.0060.00715.74
7.1.260.0080.00715.62
7.1.250.0070.00715.71
7.1.240.0030.01215.77
7.1.230.0030.00915.75
7.1.220.0050.00615.75
7.1.210.0020.00915.90
7.1.200.0090.00615.70
7.1.190.0090.00615.67
7.1.180.0030.00715.65
7.1.170.0030.01115.78
7.1.160.0040.01115.79
7.1.150.0050.00715.73
7.1.140.0020.01015.79
7.1.130.0050.00715.91
7.1.120.0050.01215.71
7.1.110.0080.00615.84
7.1.100.0040.00916.61
7.1.90.0080.00415.95
7.1.80.0030.00815.82
7.1.70.0060.00516.18
7.1.60.0060.00917.14
7.1.50.0050.01115.89
7.1.40.0060.00715.63
7.1.30.0050.00815.82
7.1.20.0080.00815.67
7.1.10.0030.00915.65
7.1.00.0050.03217.98
7.0.330.0030.01215.18
7.0.320.0110.00315.39
7.0.310.0070.00915.46
7.0.300.0060.00815.42
7.0.290.0050.01015.26
7.0.280.0070.00315.37
7.0.270.0060.00315.29
7.0.260.0020.01015.49
7.0.250.0070.00515.50
7.0.240.0070.00315.35
7.0.230.0090.00415.51
7.0.220.0060.00715.48
7.0.210.0090.00515.20
7.0.200.0010.00915.84
7.0.190.0040.01015.21
7.0.180.0040.01315.37
7.0.170.0070.00615.31
7.0.160.0030.01015.45
7.0.150.0070.00715.36
7.0.140.0060.02917.61
7.0.130.0100.00515.28
7.0.120.0040.01115.35
7.0.110.0040.00815.26
7.0.100.0060.01015.38
7.0.90.0020.01115.44
7.0.80.0070.00615.42
7.0.70.0040.00415.19
7.0.60.0090.02616.92
7.0.50.0030.03516.17
7.0.40.0080.01615.71
7.0.30.0100.03615.65
7.0.20.0090.02015.71
7.0.10.0130.02815.72
7.0.00.0050.03315.74
5.6.400.0050.00814.62
5.6.390.0090.00614.41
5.6.380.0050.00914.66
5.6.370.0090.00714.47
5.6.360.0050.00914.40
5.6.350.0030.01114.40
5.6.340.0050.00914.68
5.6.330.0040.00714.52
5.6.320.0090.00214.50
5.6.310.0070.00714.55
5.6.300.0020.01114.52
5.6.290.0040.00814.50
5.6.280.0020.03316.67
5.6.270.0040.00914.58
5.6.260.0080.00514.31
5.6.250.0050.00714.64
5.6.240.0080.00814.37
5.6.230.0040.00914.46
5.6.220.0090.00314.35
5.6.210.0060.03216.58
5.6.200.0110.02815.74
5.6.190.0050.03016.71
5.6.180.1340.01916.49
5.6.170.0170.02816.42
5.6.160.0120.02816.40
5.6.150.0040.03515.69
5.6.140.0060.03215.64
5.6.130.0060.03615.61
5.6.120.0070.02316.73
5.6.110.0070.03116.74
5.6.100.0050.03416.62
5.6.90.0050.03216.71
5.6.80.0060.01816.32
5.6.70.0170.02716.42
5.6.60.0060.00614.51
5.6.50.0080.00614.46
5.6.40.0030.00914.26
5.6.30.0070.00614.44
5.6.20.0060.00814.33
5.6.10.0050.00714.31
5.6.00.0020.01114.13
5.5.380.0100.00514.29
5.5.370.0030.01014.48
5.5.360.0060.01114.16
5.5.350.0070.01716.50
5.5.340.0050.02315.66
5.5.330.0080.03216.32
5.5.320.0180.03016.34
5.5.310.0090.02416.44
5.5.300.0070.02815.46
5.5.290.0080.01315.74
5.5.280.0040.02116.67
5.5.270.0070.02216.40
5.5.260.0080.03216.50
5.5.250.0080.03016.51
5.5.240.0070.01916.32
5.5.230.0020.01014.35
5.5.220.0030.01014.02
5.5.210.0050.00614.36
5.5.200.0070.00814.49
5.5.190.0070.00714.23
5.5.180.0070.00614.19
5.5.170.0060.00814.25
5.5.160.0110.00514.26
5.5.150.0050.01114.41
5.5.140.0020.01014.18
5.5.130.0040.01214.16
5.5.120.0080.00514.21
5.5.110.0060.00714.31
5.5.100.0120.00514.32
5.5.90.0060.00614.40
5.5.80.0060.00614.36
5.5.70.0060.01014.12
5.5.60.0050.01214.04
5.5.50.0090.00414.14
5.5.40.0090.00414.40
5.5.30.0090.00714.37
5.5.20.0100.00314.38
5.5.10.0060.00914.18
5.5.00.0070.00414.16
5.4.450.0220.01914.49
5.4.440.0220.01614.57
5.4.430.0470.00214.54
5.4.420.0220.00514.59
5.4.410.0080.02314.42
5.4.400.0030.02514.17
5.4.390.0060.02114.21
5.4.380.0120.02414.28
5.4.370.0110.02014.29
5.4.360.0110.01914.29
5.4.350.0090.02314.21
5.4.340.0130.01914.27
5.4.330.0030.00711.96
5.4.320.0030.01912.21
5.4.310.0080.01612.17
5.4.300.0040.01712.10
5.4.290.0040.01712.18
5.4.280.0050.01412.19
5.4.270.0050.01712.21
5.4.260.0060.01812.15
5.4.250.0060.01712.13
5.4.240.0050.01712.09
5.4.230.0030.02212.09
5.4.220.0050.01812.15
5.4.210.0070.01412.16
5.4.200.0040.01712.13
5.4.190.0040.01612.15
5.4.180.0070.01512.03
5.4.170.0030.01712.13
5.4.160.0040.01712.08
5.4.150.0050.01612.12
5.4.140.0030.01912.05
5.4.130.0050.01812.04
5.4.120.0030.01812.06
5.4.110.0030.01912.06
5.4.100.0030.02112.02
5.4.90.0060.02111.96
5.4.80.0030.01912.02
5.4.70.0040.01712.01
5.4.60.0060.01411.93
5.4.50.0050.01811.91
5.4.40.0070.01412.01
5.4.30.0080.01612.05
5.4.20.0030.02011.98
5.4.10.0060.01212.02
5.4.00.0050.01711.83
5.3.290.0020.02012.15
5.3.280.0060.01412.00
5.3.270.0030.01912.12
5.3.260.0070.01612.12
5.3.250.0040.01912.06
5.3.240.0050.01612.07
5.3.230.0080.01412.08
5.3.220.0040.01711.96
5.3.210.0060.01712.04
5.3.200.0050.01512.05
5.3.190.0050.01712.07
5.3.180.0050.01912.12
5.3.170.0050.01812.01
5.3.160.0080.01312.13
5.3.150.0040.01812.13
5.3.140.0040.01812.11
5.3.130.0030.01812.07
5.3.120.0010.01912.08
5.3.110.0070.01512.10
5.3.100.0050.01611.92
5.3.90.0040.02011.85
5.3.80.0050.01611.85
5.3.70.0040.02211.84
5.3.60.0050.01811.87
5.3.50.0040.02011.80
5.3.40.0080.01711.82
5.3.30.0040.01811.85
5.3.20.0060.02011.68
5.3.10.0060.01811.68
5.3.00.0070.02011.62
5.2.170.0070.0399.28
5.2.160.0060.0349.28
5.2.150.0100.0269.28
5.2.140.0020.0369.27
5.2.130.0050.0309.23
5.2.120.0070.0269.23
5.2.110.0070.0269.24
5.2.100.0110.0369.25
5.2.90.0030.0319.24
5.2.80.0070.0399.24
5.2.70.0040.0319.23
5.2.60.0020.0339.19
5.2.50.0020.0339.16
5.2.40.0040.0299.14
5.2.30.0060.0289.12
5.2.20.0030.0309.10
5.2.10.0070.0269.01
5.2.00.0070.0278.87
5.1.60.0060.0278.17
5.1.50.0040.0378.16
5.1.40.0050.0308.15
5.1.30.0030.0298.50
5.1.20.0070.0248.52
5.1.10.0040.0268.25
5.1.00.0080.0338.25
5.0.50.0050.0276.74
5.0.40.0070.0246.60
5.0.30.0040.0396.42
5.0.20.0050.0206.39
5.0.10.0060.0196.36
5.0.00.0080.0366.36
4.4.90.0050.0184.78
4.4.80.0000.0194.75
4.4.70.0020.0174.76
4.4.60.0030.0164.75
4.4.50.0040.0154.77
4.4.40.0030.0264.71
4.4.30.0020.0174.76
4.4.20.0050.0154.84
4.4.10.0040.0144.85
4.4.00.0030.0244.76
4.3.110.0000.0184.67
4.3.100.0040.0144.66
4.3.90.0030.0144.63
4.3.80.0020.0254.58
4.3.70.0030.0144.63
4.3.60.0020.0154.63
4.3.50.0040.0194.63
4.3.40.0030.0234.54
4.3.30.0020.0163.29
4.3.20.0030.0153.27
4.3.10.0030.0173.23
4.3.00.0100.01013.28

preferences:
49.11 ms | 401 KiB | 5 Q