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: } $this->Delivery_Methods = $o; } } // 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.70.0080.00816.88
8.3.60.0100.01018.30
8.3.50.0080.01021.33
8.3.40.0160.00318.92
8.3.30.0070.01120.23
8.3.20.0040.00420.13
8.3.10.0000.00821.08
8.3.00.0040.00422.34
8.2.180.0060.01616.63
8.2.170.0060.01022.96
8.2.160.0140.00022.20
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0040.01126.16
8.2.120.0030.00620.66
8.2.110.0050.00519.32
8.2.100.0070.00417.84
8.2.90.0060.00319.32
8.2.80.0030.00618.05
8.2.70.0000.00817.88
8.2.60.0000.00818.05
8.2.50.0000.00918.07
8.2.40.0040.00418.08
8.2.30.0030.00519.52
8.2.20.0080.00017.82
8.2.10.0050.00317.89
8.2.00.0040.00417.72
8.1.280.0140.00725.92
8.1.270.0060.00323.99
8.1.260.0030.00626.35
8.1.250.0030.00628.09
8.1.240.0070.00322.45
8.1.230.0090.00320.97
8.1.220.0050.00318.77
8.1.210.0050.00319.29
8.1.200.0050.00517.48
8.1.190.0000.00917.41
8.1.180.0060.00318.10
8.1.170.0090.00018.84
8.1.160.0000.00918.89
8.1.150.0000.00818.73
8.1.140.0050.00517.42
8.1.130.0060.00318.03
8.1.120.0000.00817.61
8.1.110.0040.00417.56
8.1.100.0040.00417.57
8.1.90.0030.00617.58
8.1.80.0000.00917.57
8.1.70.0000.00817.54
8.1.60.0030.00617.71
8.1.50.0050.00317.63
8.1.40.0080.00017.61
8.1.30.0040.00417.73
8.1.20.0030.00617.78
8.1.10.0060.00317.63
8.1.00.0030.00917.49
8.0.300.0040.00420.15
8.0.290.0070.00017.29
8.0.280.0070.00018.47
8.0.270.0050.00317.36
8.0.260.0040.00416.77
8.0.250.0000.00717.05
8.0.240.0060.00617.07
8.0.230.0000.00917.01
8.0.220.0070.00016.91
8.0.210.0030.00316.97
8.0.200.0070.00017.07
8.0.190.0000.00816.93
8.0.180.0050.00316.90
8.0.170.0040.00416.91
8.0.160.0050.00216.92
8.0.150.0040.00416.93
8.0.140.0060.00516.99
8.0.130.0070.00013.39
8.0.120.0030.00616.96
8.0.110.0080.00016.89
8.0.100.0050.00217.10
8.0.90.0000.00716.77
8.0.80.0070.01016.97
8.0.70.0070.00016.90
8.0.60.0000.00816.95
8.0.50.0040.00416.82
8.0.30.0130.01117.11
8.0.20.0120.00917.40
8.0.10.0040.00416.95
8.0.00.0090.01416.81
7.4.330.0060.00016.69
7.4.320.0040.00416.70
7.4.300.0070.00016.63
7.4.290.0070.00016.63
7.4.280.0000.00716.66
7.4.270.0000.00716.56
7.4.260.0030.00313.39
7.4.250.0030.00516.67
7.4.240.0020.00616.62
7.4.230.0030.00516.78
7.4.220.0000.01816.71
7.4.210.0060.01016.74
7.4.200.0040.00416.36
7.4.190.0030.00316.86
7.4.160.0070.01116.58
7.4.150.0240.00017.40
7.4.140.0130.00717.86
7.4.130.0170.00616.66
7.4.120.0100.01016.63
7.4.110.0120.01216.79
7.4.100.0160.00316.48
7.4.90.0110.01416.58
7.4.80.0040.01619.39
7.4.70.0130.00616.57
7.4.60.0120.00616.60
7.4.50.0030.00616.57
7.4.40.0060.01222.77
7.4.30.0130.00616.44
7.4.00.0110.00415.04
7.3.330.0030.00313.48
7.3.320.0000.00513.30
7.3.310.0070.00016.36
7.3.300.0060.00316.43
7.3.290.0040.01116.38
7.3.280.0090.00916.40
7.3.270.0080.01217.40
7.3.260.0170.00718.24
7.3.250.0130.00716.69
7.3.240.0120.00616.54
7.3.230.0100.01016.44
7.3.210.0090.01216.61
7.3.200.0190.00019.39
7.3.190.0060.01216.66
7.3.180.0070.01716.41
7.3.170.0140.01016.75
7.3.160.0110.00716.41
7.3.120.0070.01415.10
7.3.110.0030.01614.80
7.3.100.0170.00015.02
7.3.90.0040.01115.01
7.3.80.0000.01415.08
7.3.70.0060.00914.77
7.3.60.0040.00714.90
7.3.50.0100.00315.03
7.3.40.0100.00714.92
7.3.30.0060.00614.92
7.3.20.0030.01516.57
7.3.10.0090.00616.68
7.3.00.0070.01316.75
7.2.330.0100.01016.61
7.2.320.0100.01016.87
7.2.310.0160.01016.61
7.2.300.0070.01116.52
7.2.290.0030.01616.57
7.2.240.0100.01014.84
7.2.230.0030.01315.20
7.2.220.0000.01615.16
7.2.210.0030.01215.02
7.2.200.0030.01215.24
7.2.190.0060.00915.27
7.2.180.0100.00715.40
7.2.170.0000.01014.96
7.2.160.0070.00715.16
7.2.150.0060.00916.74
7.2.140.0040.01116.72
7.2.130.0080.00817.06
7.2.120.0070.01316.97
7.2.110.0060.01016.77
7.2.100.0080.00416.73
7.2.90.0000.01417.05
7.2.80.0040.01116.92
7.2.70.0070.00717.06
7.2.60.0030.01217.05
7.2.50.0030.01316.74
7.2.40.0070.00317.04
7.2.30.0090.00617.14
7.2.20.0140.00317.14
7.2.10.0060.00916.71
7.2.00.0030.01218.17
7.1.330.0060.01315.84
7.1.320.0070.00715.77
7.1.310.0160.00015.56
7.1.300.0030.00915.70
7.1.290.0110.00715.78
7.1.280.0000.01215.90
7.1.270.0070.00315.83
7.1.260.0090.00615.86
7.1.250.0060.00916.04
7.1.100.0060.00618.09
7.1.70.0070.00417.11
7.1.60.0100.01419.17
7.1.50.0150.00916.69
7.1.00.0070.05022.36
7.0.200.0000.00816.79
7.0.140.0000.07721.95
7.0.100.0070.06721.81
7.0.90.0030.07321.79
7.0.80.0070.08321.78
7.0.70.0170.06021.66
7.0.60.0070.07021.88
7.0.50.0070.06722.16
7.0.40.0070.08020.18
7.0.30.0070.05020.14
7.0.20.0000.07720.18
7.0.10.0070.08020.08
7.0.00.0070.07320.10
5.6.280.0070.07320.89
5.6.250.0030.06720.58
5.6.240.0030.07720.75
5.6.230.0100.06720.75
5.6.220.0000.08320.79
5.6.210.0070.08020.82
5.6.200.0030.08321.02
5.6.190.0070.07721.16
5.6.180.0030.07721.07
5.6.170.0070.08021.18
5.6.160.0030.08021.16
5.6.150.0030.08321.16
5.6.140.0000.09021.25
5.6.130.0030.08721.11
5.6.120.0000.08721.10
5.6.110.0030.05321.09
5.6.100.0130.07721.08
5.6.90.0030.08721.12
5.6.80.0100.07020.53
5.6.70.0070.06720.43
5.6.60.0000.06020.46
5.6.50.0000.07320.61
5.6.40.0070.07720.54
5.6.30.0130.06320.61
5.6.20.0070.05020.47
5.6.10.0070.07020.48
5.6.00.0030.08320.49
5.5.380.0070.08020.46
5.5.370.0100.07020.44
5.5.360.0100.07020.52
5.5.350.0070.08020.55
5.5.340.0100.08320.91
5.5.330.0000.09020.83
5.5.320.0100.07320.86
5.5.310.0030.07320.91
5.5.300.0070.08020.85
5.5.290.0100.08020.90
5.5.280.0000.05020.94
5.5.270.0100.07021.00
5.5.260.0030.08020.84
5.5.250.0170.06020.81
5.5.240.0100.07020.34
5.5.230.0030.07720.34
5.5.220.0070.07720.29
5.5.210.0000.05020.26
5.5.200.0000.08020.21
5.5.190.0000.08720.28
5.5.180.0030.08320.29
5.5.160.0030.07320.16
5.5.150.0000.08320.31
5.5.140.0100.08020.33
5.5.130.0070.07320.18
5.5.120.0030.08020.31
5.5.110.0030.05320.25
5.5.100.0100.07020.18
5.5.90.0100.07020.05
5.5.80.0100.06720.16
5.5.70.0100.07720.21
5.5.60.0030.07020.00
5.5.50.0030.07320.23
5.5.40.0100.04720.14
5.5.30.0000.07320.18
5.5.20.0100.07020.13
5.5.10.0070.07320.03
5.5.00.0200.05720.17
5.4.450.0100.07719.23
5.4.440.0030.07719.36
5.4.430.0130.07019.45
5.4.420.0100.06019.51
5.4.410.0070.06719.29
5.4.400.0100.06319.05
5.4.390.0030.06718.90
5.4.380.0070.06019.13
5.4.370.0030.07719.03
5.4.360.0000.08319.20
5.4.350.0100.06719.22
5.4.340.0070.07019.13
5.4.320.0070.07019.04
5.4.310.0100.07019.03
5.4.300.0100.06719.16
5.4.290.0030.08019.09
5.4.280.0070.05018.87
5.4.270.0000.08319.14
5.4.260.0030.05319.22
5.4.250.0000.08019.03
5.4.240.0070.07318.86
5.4.230.0100.07319.21
5.4.220.0030.08019.02
5.4.210.0030.07319.21
5.4.200.0070.07019.12
5.4.190.0030.07319.18
5.4.180.0070.07019.12
5.4.170.0070.06319.04
5.4.160.0030.05718.89
5.4.150.0070.06018.86
5.4.140.0030.07016.47
5.4.130.0100.05716.49
5.4.120.0030.07016.50
5.4.110.0030.07716.41
5.4.100.0030.07316.55
5.4.90.0070.07316.40
5.4.80.0000.04316.37
5.4.70.0070.06716.36
5.4.60.0000.07316.51
5.4.50.0100.04016.54
5.4.40.0070.06316.36
5.4.30.0070.06016.35
5.4.20.0070.07016.37
5.4.10.0070.04316.41
5.4.00.0030.07015.93
5.3.290.0030.07014.82
5.3.280.0030.07014.64
5.3.270.0100.06314.73
5.3.260.0070.07314.70
5.3.250.0030.04014.65
5.3.240.0000.06314.63
5.3.230.0030.07314.78
5.3.220.0100.03314.71
5.3.210.0030.07314.61
5.3.200.0000.07314.65
5.3.190.0030.07314.71
5.3.180.0030.07314.71
5.3.170.0000.05714.71
5.3.160.0130.06314.68
5.3.150.0100.06314.69
5.3.140.0100.07314.63
5.3.130.0100.06014.64
5.3.120.0030.07714.66
5.3.110.0100.07314.61
5.3.100.0000.05714.25
5.3.90.0030.06314.25
5.3.80.0000.06314.25
5.3.70.0000.08014.25
5.3.60.0070.04014.25
5.3.50.0000.07314.25
5.3.40.0000.07714.25
5.3.30.0100.06314.25
5.3.20.0070.06314.25
5.3.10.0070.06314.25
5.3.00.0130.06714.25
5.2.170.0030.05714.25
5.2.160.0000.03714.25
5.2.150.0000.06314.25
5.2.140.0000.06314.25
5.2.130.0030.05314.25
5.2.120.0030.03714.25
5.2.110.0100.05314.25
5.2.100.0030.05714.25
5.2.90.0030.03714.25
5.2.80.0070.05314.25
5.2.70.0000.06314.25
5.2.60.0070.05314.25
5.2.50.0000.06314.25
5.2.40.0030.05714.25
5.2.30.0100.05314.25
5.2.20.0030.05014.25
5.2.10.0100.05314.25
5.2.00.0030.03314.25
5.1.60.0000.05314.25
5.1.50.0030.05314.25
5.1.40.0030.05314.25
5.1.30.0030.05314.25
5.1.20.0000.06014.25
5.1.10.0030.03714.25
5.1.00.0030.04014.25
5.0.50.0030.04714.25
5.0.40.0070.03714.25
5.0.30.0030.06314.25
5.0.20.0070.04014.25
5.0.10.0030.03014.25
5.0.00.0070.05014.25
4.4.90.0030.02714.25
4.4.80.0000.03014.25
4.4.70.0000.03314.25
4.4.60.0030.02014.25
4.4.50.0030.03314.25
4.4.40.0000.05314.25
4.4.30.0030.03314.25
4.4.20.0000.04014.25
4.4.10.0030.02714.25
4.4.00.0000.05314.25
4.3.110.0000.03314.25
4.3.100.0000.03714.25
4.3.90.0070.03014.25
4.3.80.0000.05314.25
4.3.70.0030.02314.25
4.3.60.0030.03014.25
4.3.50.0030.03314.25
4.3.40.0030.05314.25
4.3.30.0000.03014.25
4.3.20.0030.03314.25
4.3.10.0030.03314.25
4.3.00.0030.03014.25

preferences:
48.47 ms | 401 KiB | 5 Q