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"; $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.0070.01518.55
8.3.50.0050.01221.89
8.3.40.0070.00718.82
8.3.30.0070.00719.17
8.3.20.0040.00420.34
8.3.10.0050.00322.01
8.3.00.0050.00322.32
8.2.180.0140.00716.63
8.2.170.0060.00922.96
8.2.160.0070.00720.96
8.2.150.0040.00424.18
8.2.140.0060.00324.66
8.2.130.0020.00526.16
8.2.120.0050.00319.36
8.2.110.0060.00322.13
8.2.100.0090.00319.63
8.2.90.0000.00819.34
8.2.80.0030.00619.79
8.2.70.0070.00317.75
8.2.60.0040.00417.93
8.2.50.0000.00818.07
8.2.40.0060.00318.28
8.2.30.0080.00018.33
8.2.20.0000.00817.85
8.2.10.0000.00819.41
8.2.00.0040.00417.83
8.1.280.0180.00425.92
8.1.270.0050.00322.27
8.1.260.0090.00026.35
8.1.250.0050.00328.09
8.1.240.0030.00624.02
8.1.230.0040.00819.23
8.1.220.0000.00817.90
8.1.210.0080.00018.77
8.1.200.0000.00917.38
8.1.190.0040.00417.66
8.1.180.0000.00818.10
8.1.170.0030.00618.71
8.1.160.0000.00822.16
8.1.150.0060.00318.74
8.1.140.0080.00017.50
8.1.130.0000.00717.91
8.1.120.0000.00717.50
8.1.110.0040.00417.46
8.1.100.0000.00817.45
8.1.90.0030.00517.49
8.1.80.0000.00717.54
8.1.70.0000.00717.54
8.1.60.0040.00417.59
8.1.50.0060.00317.49
8.1.40.0040.00417.60
8.1.30.0000.00917.73
8.1.20.0030.00517.75
8.1.10.0050.00317.68
8.1.00.0040.00417.62
8.0.300.0040.00418.77
8.0.290.0040.00417.16
8.0.280.0040.00418.54
8.0.270.0070.00017.30
8.0.260.0000.00716.97
8.0.250.0030.00317.05
8.0.240.0000.00816.93
8.0.230.0040.00417.14
8.0.220.0030.00317.02
8.0.210.0050.00216.98
8.0.200.0070.00016.94
8.0.190.0040.00416.92
8.0.180.0030.00516.91
8.0.170.0050.00317.02
8.0.160.0050.00217.00
8.0.150.0050.00316.82
8.0.140.0040.00416.97
8.0.130.0000.00613.51
8.0.120.0040.00416.93
8.0.110.0060.00317.03
8.0.100.0040.00417.05
8.0.90.0030.00517.06
8.0.80.0120.00716.95
8.0.70.0050.00216.95
8.0.60.0000.00717.00
8.0.50.0040.00417.01
8.0.30.0160.00717.11
8.0.20.0110.00917.49
8.0.10.0000.00817.08
8.0.00.0070.01216.95
7.4.330.0050.00015.02
7.4.320.0030.00316.70
7.4.300.0000.00716.46
7.4.290.0000.00716.62
7.4.280.0040.00416.57
7.4.270.0080.00016.56
7.4.260.0000.01016.57
7.4.250.0040.00416.48
7.4.240.0040.00416.57
7.4.230.0030.00316.54
7.4.220.0070.01416.56
7.4.210.0060.00916.57
7.4.200.0040.00416.79
7.4.190.0040.00416.74
7.4.160.0100.00716.42
7.4.150.0100.01017.40
7.4.140.0120.00817.86
7.4.130.0120.00616.64
7.4.120.0090.01216.64
7.4.110.0290.03216.75
7.4.100.0120.01416.67
7.4.90.0130.01016.59
7.4.80.0170.00619.39
7.4.70.0110.00616.54
7.4.60.0150.00316.50
7.4.50.0050.00316.41
7.4.40.0030.01622.77
7.4.30.0100.00716.68
7.4.00.0110.00714.63
7.3.330.0030.00313.49
7.3.320.0000.00513.31
7.3.310.0050.00316.45
7.3.300.0070.00016.46
7.3.290.0060.01216.46
7.3.280.0080.01116.47
7.3.270.0120.01117.40
7.3.260.0130.00816.54
7.3.250.0110.00616.73
7.3.240.0100.01016.54
7.3.230.0100.00716.45
7.3.210.0150.00316.41
7.3.200.0060.01519.39
7.3.190.0200.00316.71
7.3.180.0130.00316.43
7.3.170.0040.01416.50
7.3.160.0080.01616.45
7.3.120.0100.00615.11
7.3.00.0030.00916.60
7.2.330.0120.00817.00
7.2.320.0100.01416.77
7.2.310.0100.00716.89
7.2.300.0120.00616.91
7.2.290.0090.00916.96
7.2.130.0030.01416.69
7.2.120.0080.00416.88
7.2.110.0140.00317.06
7.2.100.0070.00717.09
7.2.90.0060.00916.82
7.2.80.0040.00817.02
7.2.70.0030.01017.09
7.2.60.0100.00316.98
7.2.50.0080.00417.16
7.2.40.0090.00616.81
7.2.30.0130.00316.99
7.2.20.0030.00817.02
7.2.10.0000.00916.85
7.2.00.0040.01218.17
7.1.250.0000.01215.73
7.1.240.0000.01115.71
7.1.230.0080.00315.77
7.1.220.0000.01315.63
7.1.210.0130.00015.83
7.1.200.0080.00515.87
7.1.190.0060.00615.76
7.1.180.0060.00615.79
7.1.170.0060.00615.69
7.1.160.0040.00815.96
7.1.150.0060.00315.61
7.1.140.0030.01315.65
7.1.130.0070.00716.00
7.1.120.0140.00015.80
7.1.110.0070.01015.57
7.1.100.0040.00717.00
7.1.90.0050.00515.78
7.1.80.0050.00515.93
7.1.70.0010.00816.38
7.1.60.0070.00917.80
7.1.50.0060.00816.40
7.1.40.0000.01315.61
7.1.30.0080.00015.86
7.1.20.0060.00915.81
7.1.10.0030.01015.93
7.1.00.0020.04419.16
7.0.330.0070.01015.55
7.0.320.0100.00715.46
7.0.310.0070.00315.38
7.0.300.0030.00715.59
7.0.290.0040.00715.38
7.0.280.0040.00415.23
7.0.270.0040.00415.24
7.0.260.0060.00615.57
7.0.250.0110.00415.61
7.0.240.0000.01515.53
7.0.230.0060.00615.15
7.0.220.0070.00715.38
7.0.210.0090.00315.47
7.0.200.0030.00715.95
7.0.190.0000.01015.29
7.0.180.0030.01015.44
7.0.170.0090.00015.26
7.0.160.0100.00615.27
7.0.150.0060.00615.30
7.0.140.0030.04018.75
7.0.130.0000.01215.31
7.0.120.0070.00715.62
7.0.110.0090.00315.52
7.0.100.0150.00315.53
7.0.90.0100.00715.22
7.0.80.0060.00315.69
7.0.70.0090.00315.41
7.0.60.0080.04017.76
7.0.50.0070.03516.77
7.0.40.0040.02716.67
7.0.30.0180.02716.73
7.0.20.0150.04116.75
7.0.10.0200.04216.81
7.0.00.0070.04816.74
5.6.380.0040.00714.64
5.6.370.0030.00614.50
5.6.360.0030.00914.62
5.6.350.0100.00314.66
5.6.340.0000.01714.67
5.6.330.0030.00614.33
5.6.320.0030.00914.38
5.6.310.0030.00614.71
5.6.300.0060.00314.72
5.6.290.0040.00414.76
5.6.280.0050.03917.69
5.6.270.0050.00514.82
5.6.260.0070.00614.41
5.6.250.0000.01014.59
5.6.240.0000.00914.62
5.6.230.0030.00914.77
5.6.220.0130.00314.46
5.6.210.0020.05017.40
5.6.200.0100.03716.46
5.6.190.0050.02417.68
5.6.180.1580.02517.39
5.6.170.0150.02817.40
5.6.160.0100.04017.34
5.6.150.0100.03816.59
5.6.140.0050.03716.34
5.6.130.0090.04016.38
5.6.120.0020.02817.77
5.6.110.0120.03717.71
5.6.100.0030.03017.82
5.6.90.0110.04017.70
5.6.80.0080.04017.40
5.6.70.0100.02717.32
5.6.60.0060.00914.34
5.6.50.0080.00814.52
5.6.40.0070.00414.39
5.6.30.0040.00414.66
5.6.20.0000.01014.25
5.6.10.0000.01414.20
5.6.00.0100.00314.54
5.5.380.0040.00411.52
5.5.370.0060.00311.43
5.5.360.0040.00711.25
5.5.350.0060.04116.04
5.5.340.0030.02614.67
5.5.330.0060.03015.69
5.5.320.0180.03515.68
5.5.310.0160.04115.98
5.5.300.0050.03014.59
5.5.290.0070.02814.76
5.5.280.0100.02516.15
5.5.270.0080.03316.20
5.5.260.0050.02516.05
5.5.250.0050.03916.09
5.5.240.0080.03015.82
5.5.230.0030.00311.08
5.5.220.0000.00811.14
5.5.210.0050.00210.83
5.5.200.0000.00811.34
5.5.190.0050.00511.40
5.5.180.0000.00811.38
5.5.170.0030.00610.99
5.5.160.0030.00911.08
5.5.150.0000.00811.12
5.5.140.0030.00810.92
5.5.130.0000.00711.10
5.5.120.0060.00211.11
5.5.110.0000.00711.46
5.5.100.0030.00510.98
5.5.90.0080.00411.11
5.5.80.0070.00311.46
5.5.70.0080.00011.27
5.5.60.0090.00011.26
5.5.50.0060.00311.24
5.5.40.0070.00011.26
5.5.30.0000.00611.42
5.5.20.0030.00311.31
5.5.10.0050.00511.33
5.5.00.0060.00311.21
5.4.450.0670.02915.39
5.4.440.0300.02315.52
5.4.430.0450.00415.27
5.4.420.0620.00315.39
5.4.410.0040.03015.10
5.4.400.0050.02915.09
5.4.390.0060.03314.84
5.4.380.0100.03415.04
5.4.370.0130.02815.03
5.4.360.0170.03014.79
5.4.350.0130.02714.84
5.4.340.0150.02314.95
5.4.330.0000.00910.76
5.4.320.0050.02111.75
5.4.310.0080.01911.99
5.4.300.0020.02211.77
5.4.290.0020.02711.80
5.4.280.0060.02211.82
5.4.270.0040.02311.87
5.4.260.0040.02311.78
5.4.250.0060.02111.75
5.4.240.0030.02511.76
5.4.230.0060.02011.89
5.4.220.0050.02211.93
5.4.210.0050.02311.81
5.4.200.0070.02311.66
5.4.190.0030.02511.96
5.4.180.0040.02311.82
5.4.170.0060.02211.77
5.4.160.0040.02411.73
5.4.150.0040.02011.85
5.4.140.0020.02511.66
5.4.130.0070.01811.60
5.4.120.0020.02311.61
5.4.110.0030.02211.66
5.4.100.0050.02211.72
5.4.90.0060.02611.78
5.4.80.0020.02711.49
5.4.70.0060.02011.75
5.4.60.0030.02211.57
5.4.50.0040.02111.50
5.4.40.0050.02111.60
5.4.30.0040.02611.65
5.4.20.0040.02311.67
5.4.10.0060.02211.51
5.4.00.0040.02611.23
5.3.290.0040.02611.81
5.3.280.0040.02911.66
5.3.270.0040.02211.78
5.3.260.0040.02211.78
5.3.250.0050.02011.65
5.3.240.0070.02311.68
5.3.230.0060.02011.80
5.3.220.0060.02511.70
5.3.210.0040.02311.69
5.3.200.0060.02411.71
5.3.190.0020.02411.69
5.3.180.0040.02211.79
5.3.170.0060.02211.66
5.3.160.0010.02511.62
5.3.150.0040.02111.62
5.3.140.0060.02111.74
5.3.130.0040.02111.70
5.3.120.0040.03211.76
5.3.110.0070.02111.74
5.3.100.0060.02511.38
5.3.90.0030.02711.35
5.3.80.0040.02611.41
5.3.70.0020.02211.38
5.3.60.0030.02311.40
5.3.50.0040.02211.39
5.3.40.0060.02311.44
5.3.30.0080.02411.40
5.3.20.0080.02211.19
5.3.10.0050.02210.98
5.3.00.0060.02311.12
5.2.170.0050.0179.53
5.2.160.0040.0179.35
5.2.150.0040.0199.44
5.2.140.0030.0189.52
5.2.130.0040.0179.44
5.2.120.0050.0159.33
5.2.110.0050.0169.38
5.2.100.0030.0179.43
5.2.90.0030.0199.42
5.2.80.0070.0169.38
5.2.70.0020.0209.30
5.2.60.0050.0179.31
5.2.50.0060.0159.36
5.2.40.0040.0169.44
5.2.30.0030.0189.26
5.2.20.0050.0179.29
5.2.10.0020.0219.26
5.2.00.0030.0229.11
5.1.60.0050.0168.76
5.1.50.0040.0178.76
5.1.40.0060.0138.75
5.1.30.0050.0168.92
5.1.20.0020.0158.94
5.1.10.0050.0138.80
5.1.00.0040.0178.80
5.0.50.0040.0118.05
5.0.40.0050.0107.98
5.0.30.0030.0177.88
5.0.20.0020.0147.87
5.0.10.0040.0127.86
5.0.00.0010.0187.86
4.4.90.0030.0107.06
4.4.80.0020.0107.05
4.4.70.0030.0097.05
4.4.60.0030.0077.05
4.4.50.0040.0087.06
4.4.40.0000.0167.03
4.4.30.0030.0097.05
4.4.20.0020.0097.10
4.4.10.0020.0107.10
4.4.00.0020.0177.05
4.3.110.0010.0117.01
4.3.100.0020.0107.01
4.3.90.0030.0086.99
4.3.80.0020.0206.97
4.3.70.0040.0086.99
4.3.60.0020.0086.99
4.3.50.0010.0126.99
4.3.40.0060.0126.94
4.3.30.0020.0116.32
4.3.20.0010.0116.31
4.3.10.0010.0106.29
4.3.00.0050.00511.32

preferences:
42.26 ms | 401 KiB | 5 Q