3v4l.org

run code in 300+ PHP versions simultaneously
<?php /* if (isset(static::$attrAccessible)) { if (is_array(static::$attrAccessible) && count(static::$attrAccessible) > 0) { $checkArray = array_fill_keys(static::$attrAccessible, 0); $attributes = array_intersect_key($attributes, $checkArray); } } elseif (isset(static::$attrProtected)) { if (is_array(static::$attrProtected) && count(static::$attrProtected) > 0) { $checkArray = array_fill_keys(static::$attrProtected, 0); $attributes = array_diff_key($attributes, $checkArray); } } */ $attrAccessible = array('name', 'age', 'location'); $attributes = array('name', 'age', 'location'); $checkArray = array_fill_keys($attrAccessible, 0); $purgedArray = array_diff_key($attributes, $checkArray); print_r($attributes); print_r($purgedArray);

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.40.0110.00418.46
8.3.30.0100.00719.00
8.3.20.0000.00720.34
8.3.10.0030.00523.48
8.3.00.0080.00020.95
8.2.170.0090.00522.96
8.2.160.0100.00320.52
8.2.150.0040.00424.18
8.2.140.0030.00524.66
8.2.130.0060.01326.16
8.2.120.0050.00319.25
8.2.110.0000.00922.29
8.2.100.0110.00017.72
8.2.90.0040.00419.16
8.2.80.0040.00417.97
8.2.70.0040.00417.50
8.2.60.0060.00317.93
8.2.50.0030.00618.07
8.2.40.0040.00419.89
8.2.30.0040.00418.12
8.2.20.0040.00417.63
8.2.10.0030.00517.93
8.2.00.0080.00017.58
8.1.270.0000.00823.68
8.1.260.0040.00426.35
8.1.250.0070.00028.09
8.1.240.0030.00723.79
8.1.230.0080.00418.89
8.1.220.0050.00317.78
8.1.210.0000.00818.77
8.1.200.0090.00017.22
8.1.190.0000.00817.23
8.1.180.0000.00818.10
8.1.170.0000.00918.51
8.1.160.0000.00821.86
8.1.150.0060.00318.45
8.1.140.0050.00317.45
8.1.130.0030.00319.61
8.1.120.0000.00717.43
8.1.110.0000.00817.29
8.1.100.0040.00417.46
8.1.90.0030.00517.32
8.1.80.0070.00017.36
8.1.70.0070.00017.29
8.1.60.0000.01017.55
8.1.50.0040.00417.43
8.1.40.0030.00717.36
8.1.30.0000.00817.59
8.1.20.0080.00017.50
8.1.10.0090.00017.31
8.1.00.0030.00517.32
8.0.300.0000.00918.77
8.0.290.0000.00816.63
8.0.280.0030.00518.26
8.0.270.0000.00817.20
8.0.260.0070.00017.10
8.0.250.0000.00816.90
8.0.240.0080.00016.95
8.0.230.0030.00316.85
8.0.220.0000.00716.67
8.0.210.0070.00016.83
8.0.200.0080.00016.89
8.0.190.0040.00416.89
8.0.180.0000.00816.88
8.0.170.0000.00816.89
8.0.160.0050.00216.73
8.0.150.0000.00716.82
8.0.140.0050.00316.78
8.0.130.0000.00613.14
8.0.120.0040.00416.70
8.0.110.0090.00016.72
8.0.100.0040.00416.68
8.0.90.0000.00716.80
8.0.80.0070.01416.80
8.0.70.0040.00416.83
8.0.60.0000.00716.72
8.0.50.0070.00016.61
8.0.30.0150.00617.00
8.0.20.0100.01017.40
8.0.10.0030.00516.89
8.0.00.0050.01316.81
7.4.330.0000.00515.00
7.4.320.0030.00316.45
7.4.300.0030.00316.53
7.4.290.0030.00316.44
7.4.280.0040.00416.55
7.4.270.0000.00716.57
7.4.260.0000.00716.41
7.4.250.0000.00816.53
7.4.240.0050.00216.40
7.4.230.0000.00816.64
7.4.220.0040.01516.49
7.4.210.0130.00316.45
7.4.200.0030.00316.36
7.4.160.0110.00416.39
7.4.150.0070.01417.40
7.4.140.0100.00717.86
7.4.130.0080.01016.49
7.4.120.0110.00516.35
7.4.110.0070.01016.55
7.4.100.0120.00416.51
7.4.90.0130.00316.45
7.4.80.0210.00019.39
7.4.70.0090.01016.38
7.4.60.0000.01616.37
7.4.50.0030.00616.54
7.4.40.0120.00516.56
7.4.30.0100.00616.36
7.4.00.0070.01014.64
7.3.330.0000.00512.98
7.3.320.0030.00313.02
7.3.310.0030.00315.91
7.3.300.0000.00716.17
7.3.290.0040.01116.17
7.3.280.0110.00816.12
7.3.270.0110.00817.40
7.3.260.0140.00316.29
7.3.250.0100.01216.29
7.3.240.0080.01416.00
7.3.230.0030.01316.39
7.3.210.0160.00316.05
7.3.200.0060.01219.39
7.3.190.0100.00716.20
7.3.180.0090.00616.55
7.3.170.0130.00316.27
7.3.160.0030.01316.33
7.3.120.0070.01014.65
7.3.110.0140.00314.56
7.3.100.0070.00714.52
7.3.90.0090.00314.29
7.3.80.0000.01214.96
7.3.70.0000.01414.58
7.3.60.0000.01014.44
7.3.50.0090.00014.69
7.3.40.0030.01314.43
7.3.30.0040.00714.34
7.3.20.0040.00416.55
7.3.10.0060.00816.52
7.3.00.0080.00616.39
7.2.330.0170.00316.59
7.2.320.0140.00316.56
7.2.310.0100.00716.37
7.2.300.0100.00716.48
7.2.290.0060.01116.24
7.2.250.0030.01615.07
7.2.240.0130.00714.60
7.2.230.0030.01315.13
7.2.220.0050.00515.00
7.2.210.0090.00014.80
7.2.200.0150.00014.81
7.2.190.0060.00914.91
7.2.180.0040.01114.78
7.2.170.0000.01614.86
7.2.130.0060.00916.34
7.2.120.0110.00416.49
7.2.110.0070.01016.64
7.2.100.0090.00616.88
7.2.90.0070.00716.55
7.2.80.0090.00616.28
7.2.70.0120.00816.40
7.2.60.0140.00716.55
7.2.50.0070.00716.23
7.2.40.0040.00716.44
7.2.30.0070.00716.57
7.2.20.0060.00616.48
7.2.10.0000.01116.87
7.2.00.0070.00617.96
7.1.330.0040.01215.75
7.1.320.0070.00715.54
7.1.310.0030.01315.63
7.1.300.0060.00315.66
7.1.290.0090.00315.52
7.1.280.0040.01515.48
7.1.270.0000.01515.47
7.1.260.0070.00715.75
7.1.250.0060.00615.36
7.1.100.0110.00418.30
7.1.70.0030.00517.00
7.1.60.0100.01619.70
7.1.50.0030.01716.65
7.1.00.0030.07722.46
7.0.200.0000.00816.77
7.0.140.0100.06021.99
7.0.100.0130.07020.00
7.0.90.0070.05719.93
7.0.80.0030.07319.94
7.0.70.0270.03319.92
7.0.60.0070.08719.91
7.0.50.0030.06020.25
7.0.40.0070.03320.03
7.0.30.0070.06020.16
7.0.20.0100.04020.14
7.0.10.0030.04320.05
7.0.00.0070.04019.95
5.6.280.0130.06021.12
5.6.250.0070.05320.56
5.6.240.0000.04720.54
5.6.230.0070.07020.59
5.6.220.0130.06020.55
5.6.210.0070.08320.55
5.6.200.0200.06321.09
5.6.190.0070.03021.10
5.6.180.0100.04321.05
5.6.170.0070.05021.01
5.6.160.0030.04321.04
5.6.150.0000.05021.09
5.6.140.0030.05720.94
5.6.130.0030.06020.96
5.6.120.0070.03320.93
5.6.110.0070.05320.92
5.6.100.0030.04721.08
5.6.90.0130.02720.93
5.6.80.0070.07720.40
5.6.70.0030.07720.44
5.6.60.0070.05720.41
5.6.50.0030.06020.45
5.6.40.0100.06320.40
5.6.30.0030.03720.40
5.6.20.0130.05720.38
5.6.10.0070.05320.39
5.6.00.0030.05320.47
5.5.380.0070.04320.34
5.5.370.0070.03720.39
5.5.360.0130.08020.49
5.5.350.0130.07720.36
5.5.340.0130.03020.79
5.5.330.0030.09020.90
5.5.320.0230.05320.79
5.5.310.0000.04720.72
5.5.300.0070.06320.86
5.5.290.0100.08020.86
5.5.280.0170.08320.63
5.5.270.0000.07720.81
5.5.260.0070.06720.84
5.5.250.0070.04020.72
5.5.240.0070.03020.21
5.5.230.0070.03320.28
5.5.220.0070.06720.23
5.5.210.0000.04320.10
5.5.200.0100.08319.96
5.5.190.0070.06720.26
5.5.180.0030.06319.98
5.5.160.0070.05720.22
5.5.150.0130.06720.21
5.5.140.0030.06319.96
5.5.130.0100.07320.20
5.5.120.0070.07020.27
5.5.110.0070.05320.16
5.5.100.0070.06720.15
5.5.90.0000.05020.03
5.5.80.0030.08720.05
5.5.70.0000.03720.08
5.5.60.0000.03319.99
5.5.50.0030.03320.14
5.5.40.0000.04319.92
5.5.30.0070.04020.04
5.5.20.0070.04320.13
5.5.10.0030.04320.09
5.5.00.0030.04719.96
5.4.450.0000.06019.37
5.4.440.0030.08019.55
5.4.430.0100.06019.55
5.4.420.0030.03719.46
5.4.410.0030.03319.09
5.4.400.0000.06019.21
5.4.390.0030.05019.05
5.4.380.0000.08719.03
5.4.370.0100.06319.02
5.4.360.0100.07319.21
5.4.350.0100.05319.18
5.4.340.0000.08019.18
5.4.320.0200.05319.09
5.4.310.0030.07319.06
5.4.300.0100.06718.90
5.4.290.0030.05319.09
5.4.280.0100.07719.18
5.4.270.0070.05019.08
5.4.260.0100.07319.20
5.4.250.0030.07318.94
5.4.240.0000.04319.15
5.4.230.0100.07019.04
5.4.220.0030.04019.11
5.4.210.0130.05318.85
5.4.200.0030.04018.89
5.4.190.0070.04019.04
5.4.180.0070.03719.15
5.4.170.0070.03719.11
5.4.160.0100.04019.10
5.4.150.0070.04318.85
5.4.140.0100.03316.19
5.4.130.0030.04016.49
5.4.120.0000.05016.36
5.4.110.0000.04016.27
5.4.100.0030.06316.32
5.4.90.0100.04316.45
5.4.80.0070.03716.48
5.4.70.0030.04016.36
5.4.60.0070.02716.48
5.4.50.0000.06316.30
5.4.40.0070.03716.35
5.4.30.0030.03716.29
5.4.20.0070.06716.39
5.4.10.0130.06016.36
5.4.00.0070.07315.90
5.3.290.0100.07314.68
5.3.280.0100.06314.64
5.3.270.0000.05014.66
5.3.260.0000.04314.59
5.3.250.0070.08014.66
5.3.240.0070.04314.63
5.3.230.0030.04014.73
5.3.220.0030.03714.62
5.3.210.0130.03014.48
5.3.200.0000.04014.53
5.3.190.0070.03714.59
5.3.180.0030.03714.61
5.3.170.0030.04014.48
5.3.160.0070.03714.65
5.3.150.0200.03714.54
5.3.140.0030.03714.53
5.3.130.0070.07014.46
5.3.120.0070.06314.65
5.3.110.0130.06314.60
5.3.100.0070.03713.98
5.3.90.0070.04014.14
5.3.80.0070.05314.00
5.3.70.0000.04014.06
5.3.60.0130.06314.09
5.3.50.0030.07713.94
5.3.40.0070.05013.91
5.3.30.0170.04013.88
5.3.20.0170.02713.82
5.3.10.0000.03713.58
5.3.00.0130.06713.61
5.2.170.0000.04712.14
5.2.160.0070.06312.14
5.2.150.0070.03712.14
5.2.140.0030.03012.14
5.2.130.0000.03012.14
5.2.120.0030.03712.14
5.2.110.0030.03712.14
5.2.100.0030.04012.14
5.2.90.0030.02312.14
5.2.80.0000.02712.14
5.2.70.0000.03012.14
5.2.60.0030.02712.14
5.2.50.0030.02712.14
5.2.40.0030.02712.14
5.2.30.0100.02312.14
5.2.20.0030.03712.14
5.2.10.0070.02012.14
5.2.00.0000.03012.14
5.1.60.0000.02712.14
5.1.50.0000.02312.14
5.1.40.0000.02012.14
5.1.30.0000.03012.14
5.1.20.0070.02012.14
5.1.10.0100.01712.14
5.1.00.0030.02012.14
5.0.50.0030.01712.14
5.0.40.0030.01712.14
5.0.30.0030.03012.14
5.0.20.0000.02012.14
5.0.10.0030.04312.14
5.0.00.0000.02712.14
4.4.90.0030.01312.14
4.4.80.0000.01312.14
4.4.70.0000.01712.14
4.4.60.0000.02012.14
4.4.50.0000.01312.14
4.4.40.0000.02312.14
4.4.30.0000.01712.14
4.4.20.0000.01312.14
4.4.10.0030.01712.14
4.4.00.0030.02312.14
4.3.110.0000.01312.14
4.3.100.0000.01712.14
4.3.90.0030.03012.14
4.3.80.0000.02712.14
4.3.70.0070.01312.14
4.3.60.0000.01312.14
4.3.50.0000.03712.14
4.3.40.0000.02312.14
4.3.30.0000.02012.14
4.3.20.0000.02312.14
4.3.10.0000.01712.14
4.3.00.0000.01712.14

preferences:
49.91 ms | 400 KiB | 5 Q