3v4l.org

run code in 300+ PHP versions simultaneously
<?php /** * This is the model class for table "fileinn". * * The followings are the available columns in table 'fileinn': * @property integer $id * @property string $fileinn * * The followings are the available model relations: * @property Org[] $orgs */ class FileInn extends NTYActiveRecord { /** * Returns the static model of the specified AR class. * @param string $className active record class name. * @return FileInn the static model class */ public static function model($className = __CLASS__) { return parent::model($className); } /** * @return string the associated database table name */ public function tableName() { return 'file_inn'; } /** * @return array validation rules for model attributes. */ public function rules() { // NOTE: you should only define rules for those attributes that // will receive user inputs. return array( array('fileinn', 'required'), array('fileinn', 'file', 'allowEmpty' => false, 'safe' => true, 'types' => Yii::App()->params->TypesUpload, 'maxSize' => Yii::App()->params->SizeUpload), //array('fileinn', 'file', 'mimeTypes' => Yii::App()->params->mimeTypesUpload, 'maxSize' => 1048576), // The following rule is used by search(). // Please remove those attributes that should not be searched. array('id, fileinn', 'safe', 'on' => 'search'), ); } /** * @return array relational rules. */ public function relations() { // NOTE: you may need to adjust the relation name and the related // class name for the relations automatically generated below. return array( 'orgs' => array(self::HAS_MANY, 'Org', 'id_file_inn'), ); } /** * @return array customized attribute labels (name=>label) */ public function attributeLabels() { return array( 'id' => 'ID', 'fileinn' => 'Скан-копия ИНН', ); } /** * Retrieves a list of models based on the current search/filter conditions. * @return CActiveDataProvider the data provider that can return the models based on the search/filter conditions. */ public function search() { // Warning: Please modify the following code to remove attributes that // should not be searched. $criteria = new CDbCriteria; $criteria->compare('id', $this->id); $criteria->compare('fileinn', $this->fileinn, true); return new CActiveDataProvider($this, array( 'criteria' => $criteria, )); } public function beforeSave() { if ($file = CUploadedFile::getInstance($this, 'fileinn')) { //$this->file_name = $file->name; //$this->file_type = $file->type; //$this->file_size = $file->size; $this->fileinn = file_get_contents($file->tempName); } return parent::beforeSave(); } }

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.0170.00316.62
8.3.50.0120.00721.98
8.3.40.0040.01118.83
8.3.30.0170.00319.09
8.3.20.0040.00420.34
8.3.10.0000.00823.65
8.3.00.0040.01120.71
8.2.180.0130.00316.50
8.2.170.0090.00622.96
8.2.160.0100.00320.52
8.2.150.0000.00824.18
8.2.140.0050.00324.66
8.2.130.0070.01126.16
8.2.120.0080.00022.04
8.2.110.0060.00322.20
8.2.100.0110.00017.72
8.2.90.0040.00419.23
8.2.80.0080.00017.97
8.2.70.0040.00417.63
8.2.60.0040.00417.93
8.2.50.0040.00418.07
8.2.40.0040.00418.28
8.2.30.0000.00718.08
8.2.20.0040.00417.77
8.2.10.0000.00817.68
8.2.00.0040.00417.69
8.1.280.0120.00325.92
8.1.270.0040.00421.99
8.1.260.0020.00526.35
8.1.250.0080.00028.09
8.1.240.0000.01023.79
8.1.230.0070.00319.16
8.1.220.0000.00817.74
8.1.210.0040.00418.77
8.1.200.0070.00317.23
8.1.190.0040.00417.30
8.1.180.0030.00618.10
8.1.170.0090.00018.59
8.1.160.0000.00722.00
8.1.150.0050.00318.55
8.1.140.0080.00017.41
8.1.130.0030.00317.80
8.1.120.0000.00817.49
8.1.110.0050.00317.38
8.1.100.0000.00717.43
8.1.90.0000.00817.41
8.1.80.0000.00817.45
8.1.70.0000.00717.26
8.1.60.0040.00417.46
8.1.50.0060.00317.54
8.1.40.0050.00317.48
8.1.30.0000.00817.44
8.1.20.0040.00417.44
8.1.10.0050.00317.52
8.1.00.0070.00417.41
8.0.300.0040.00418.77
8.0.290.0040.00417.28
8.0.280.0030.00318.46
8.0.270.0040.00417.29
8.0.260.0000.00616.96
8.0.250.0070.00017.02
8.0.240.0040.00417.04
8.0.230.0030.00316.92
8.0.220.0040.00416.85
8.0.210.0000.00716.91
8.0.200.0030.00317.05
8.0.190.0040.00417.05
8.0.180.0000.00716.89
8.0.170.0060.00316.90
8.0.160.0000.00817.00
8.0.150.0040.00416.98
8.0.140.0040.00416.93
8.0.130.0040.00413.37
8.0.120.0080.00017.04
8.0.110.0000.00817.02
8.0.100.0000.00816.98
8.0.90.0040.00417.04
8.0.80.0100.00517.01
8.0.70.0070.00017.02
8.0.60.0040.00416.98
8.0.50.0040.00416.81
8.0.30.0080.01117.17
8.0.20.0070.01217.40
8.0.10.0030.00517.05
8.0.00.0080.01117.01
7.4.330.0050.00015.14
7.4.320.0000.00616.54
7.4.300.0060.00016.48
7.4.290.0000.00716.40
7.4.280.0050.00316.57
7.4.270.0070.00016.36
7.4.260.0000.00716.47
7.4.250.0070.00016.54
7.4.240.0070.00016.52
7.4.230.0030.00316.57
7.4.220.0070.01116.61
7.4.210.0060.01216.52
7.4.200.0070.00016.41
7.4.190.0050.00316.71
7.4.160.0030.01416.58
7.4.150.0150.00317.40
7.4.140.0140.00617.86
7.4.130.0110.00716.61
7.4.120.0100.00716.48
7.4.110.0130.00616.54
7.4.100.0200.00016.65
7.4.90.0040.01516.61
7.4.80.0200.01219.39
7.4.70.0070.01016.45
7.4.60.0130.00316.53
7.4.50.0040.00416.39
7.4.40.0090.00622.77
7.4.30.0140.00316.66
7.4.00.0030.01214.70
7.3.330.0000.00513.20
7.3.320.0050.00013.33
7.3.310.0040.00416.36
7.3.300.0030.00316.27
7.3.290.0090.00616.33
7.3.280.0090.01116.34
7.3.270.0080.01217.40
7.3.260.0090.00916.36
7.3.250.0120.00516.43
7.3.240.0130.00316.54
7.3.230.0070.01016.46
7.3.210.0030.02016.39
7.3.200.0040.01816.41
7.3.190.0100.01316.47
7.3.180.0070.00716.46
7.3.170.0120.00316.29
7.3.160.0080.00816.42
7.3.120.0050.01214.85
7.3.110.0030.01514.73
7.3.100.0060.01014.73
7.3.90.0120.00414.82
7.3.80.0100.00314.73
7.3.70.0050.00514.66
7.3.60.0060.00614.71
7.3.50.0040.00414.89
7.3.40.0090.00314.75
7.3.30.0070.00714.89
7.3.20.0070.00316.71
7.3.10.0080.00416.32
7.3.00.0030.00616.65
7.2.330.0160.00716.56
7.2.320.0100.00716.70
7.2.310.0130.00916.34
7.2.300.0090.01316.64
7.2.290.0030.01216.18
7.2.250.0150.00315.14
7.2.240.0070.01415.19
7.2.230.0070.01015.11
7.2.220.0070.00714.66
7.2.210.0070.00714.99
7.2.200.0000.01215.07
7.2.190.0060.00615.05
7.2.180.0000.01314.82
7.2.170.0030.00614.94
7.2.60.0100.00716.61
7.2.50.0090.00316.88
7.1.330.0040.01115.66
7.1.320.0000.01115.61
7.1.310.0040.00715.71
7.1.300.0100.00615.59
7.1.290.0000.01115.65
7.1.280.0040.01115.68
7.1.270.0090.00015.76
7.1.260.0060.00615.78
7.1.200.0030.01215.72
7.1.70.0080.00016.89
7.1.60.0060.01219.29
7.1.50.0090.01216.82
7.1.00.0100.07022.45
7.0.200.0040.00816.46
7.0.140.0000.07722.18
7.0.60.0130.06020.06
7.0.50.0070.08017.83
7.0.40.0030.04720.13
7.0.30.0170.06320.23
7.0.20.0330.08020.21
7.0.10.0070.04020.24
7.0.00.0030.05720.32
5.6.280.0100.06721.11
5.6.210.0070.07020.55
5.6.200.0100.04718.25
5.6.190.0030.09020.63
5.6.180.0300.04020.55
5.6.170.0170.04320.51
5.6.160.0000.04720.44
5.6.150.0070.05018.20
5.6.140.0000.08318.27
5.6.130.0000.04318.18
5.6.120.0070.06321.00
5.6.110.0100.05721.11
5.6.100.0000.07021.11
5.6.90.0100.03720.98
5.6.80.0170.07320.42
5.6.70.4500.04020.36
5.5.350.0170.08020.46
5.5.340.0030.05017.98
5.5.330.0030.04320.27
5.5.320.0300.04020.51
5.5.310.0200.05020.27
5.5.300.0100.08317.98
5.5.290.0030.08317.99
5.5.280.0070.03720.77
5.5.270.0170.07320.86
5.5.260.0130.08320.91
5.5.250.0130.07320.70
5.5.240.0230.07320.19
5.4.450.0270.07719.55
5.4.440.0300.03719.20
5.4.430.0330.06319.31
5.4.420.0300.08719.40
5.4.410.0270.07719.14
5.4.400.0270.06719.16
5.4.390.0230.07319.06
5.4.380.0230.04719.20
5.4.370.0270.06018.95
5.4.360.0170.04719.22
5.4.350.0370.05019.16
5.4.340.0200.07719.13
5.4.320.0330.04319.06
5.4.310.0230.04319.15
5.4.300.0200.07719.20
5.4.290.0270.05319.09
5.4.280.0330.06718.99
5.4.270.0170.08318.98
5.4.260.0270.06319.22
5.4.250.0270.07318.98
5.4.240.0270.07019.16
5.4.230.0230.04319.15
5.4.220.0330.06719.18
5.4.210.0230.05719.13
5.4.200.0270.07019.13
5.4.190.0330.06319.05
5.4.180.0230.06719.15
5.4.170.0270.03719.14
5.4.160.0200.04319.20
5.4.150.0270.07018.96
5.4.140.0270.05316.46
5.4.130.0230.05316.31
5.4.120.0230.07316.36
5.4.110.0200.04716.37
5.4.100.0230.07016.41
5.4.90.0230.05016.50
5.4.80.0230.06316.49
5.4.70.0230.07316.44
5.4.60.0200.06016.30
5.4.50.0270.07016.52
5.4.40.0300.06716.51
5.4.30.0200.03316.25
5.4.20.0300.06016.52
5.4.10.0270.06716.54
5.4.00.0230.07016.12
5.3.290.0230.03714.94
5.3.280.0270.05014.94
5.3.270.0300.07014.94
5.3.260.0230.04014.94
5.3.250.0200.06714.94
5.3.240.0170.04714.94
5.3.230.0230.05014.94
5.3.220.0270.06014.94
5.3.210.0230.06014.94
5.3.200.0230.04014.94
5.3.190.0200.08014.94
5.3.180.0230.07014.94
5.3.170.0230.06014.94
5.3.160.0300.04314.94
5.3.150.0270.04714.94
5.3.140.0270.03714.94
5.3.130.0130.06714.94
5.3.120.0300.06714.94
5.3.110.0230.03714.94
5.3.100.0230.04714.94
5.3.90.0230.04314.94
5.3.80.0270.06714.94
5.3.70.0230.06714.94
5.3.60.0170.05314.94
5.3.50.0200.05014.94
5.3.40.0270.04014.94
5.3.30.0200.04014.94
5.3.20.0200.03314.94
5.3.10.0230.06714.94
5.3.00.0200.04714.94
5.2.170.0170.03014.94
5.2.160.0230.04314.94
5.2.150.0170.03314.94
5.2.140.0170.05014.94
5.2.130.0130.02714.94
5.2.120.0200.02014.94
5.2.110.0200.05014.94
5.2.100.0170.03014.94
5.2.90.0230.05014.94
5.2.80.0200.04014.94
5.2.70.0170.05314.94
5.2.60.0200.05014.94
5.2.50.0200.05714.94
5.2.40.0270.04714.94
5.2.30.0170.04714.94
5.2.20.0200.04314.94
5.2.10.0200.03014.94
5.2.00.0100.06314.94
5.1.60.0200.04714.94
5.1.50.0230.04014.94
5.1.40.0170.05014.94
5.1.30.0170.03714.94
5.1.20.0170.03314.94
5.1.10.0170.05314.94
5.1.00.0170.02314.94
5.0.50.0030.02314.94
5.0.40.0030.02314.94
5.0.30.0030.03714.94
5.0.20.0030.02014.94
5.0.10.0070.01714.94
5.0.00.0100.02714.94
4.4.90.0130.02314.94
4.4.80.0070.02714.94
4.4.70.0100.03314.94
4.4.60.0130.03014.94
4.4.50.0100.02314.94
4.4.40.0030.04314.94
4.4.30.0170.02714.94
4.4.20.0100.03314.94
4.4.10.0030.02314.94
4.4.00.0100.02014.94
4.3.110.0030.01714.94
4.3.100.0030.01714.94
4.3.90.0070.01314.94
4.3.80.0030.02314.94
4.3.70.0030.01314.94
4.3.60.0030.01314.94
4.3.50.0030.01314.94
4.3.40.0030.02714.94
4.3.30.0000.01714.94
4.3.20.0030.01314.94
4.3.10.0030.01314.94
4.3.00.0030.01714.94

preferences:
42.62 ms | 401 KiB | 5 Q