3v4l.org

run code in 300+ PHP versions simultaneously
<?php // Surprise surprise! When the 2nd array param of array_diff() contains an elemant with value false, // the result will no longer contain null values. function myIsset($value) { return isset($value); } $arrayWithTrueValue = array( 'null1' => null, 'null2' => null, 'bool' => true, ); $filteredArray = array_filter($arrayWithTrueValue, 'myIsset'); echo "arrayWithTrueValue has three elements..\n"; var_dump($arrayWithTrueValue, $filteredArray, array_diff($arrayWithTrueValue, $filteredArray)); $arrayWithFalseValue = $arrayWithTrueValue; $arrayWithFalseValue['bool'] = false; $filteredArrayWithOnlyFalse = array_filter($arrayWithFalseValue, 'myIsset'); var_dump($arrayWithFalseValue, $filteredArrayWithOnlyFalse, array_diff($arrayWithFalseValue, $filteredArrayWithOnlyFalse));

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.0140.00416.50
8.3.50.0110.00921.97
8.3.40.0120.00318.77
8.3.30.0100.00319.07
8.3.20.0080.00020.29
8.3.10.0040.00423.59
8.3.00.0090.00019.32
8.2.180.0120.00318.43
8.2.170.0110.00422.96
8.2.160.0140.00020.24
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0070.00726.16
8.2.120.0100.00022.08
8.2.110.0030.00722.21
8.2.100.0000.01118.03
8.2.90.0040.00419.30
8.2.80.0050.00318.05
8.2.70.0030.00617.38
8.2.60.0050.00318.05
8.2.50.0040.00418.07
8.2.40.0040.00418.34
8.2.30.0070.00018.04
8.2.20.0070.00017.77
8.2.10.0050.00217.95
8.2.00.0040.00817.73
8.1.280.0040.01125.92
8.1.270.0080.00023.91
8.1.260.0080.00026.35
8.1.250.0040.00428.09
8.1.240.0060.00323.96
8.1.230.0060.00619.16
8.1.220.0030.00617.74
8.1.210.0040.00418.77
8.1.200.0060.00317.23
8.1.190.0000.00717.53
8.1.180.0040.00418.10
8.1.170.0000.00818.55
8.1.160.0050.00221.92
8.1.150.0000.00818.51
8.1.140.0000.00717.36
8.1.130.0030.00317.76
8.1.120.0040.00417.47
8.1.110.0000.00717.38
8.1.100.0040.00417.37
8.1.90.0040.00417.40
8.1.80.0000.00717.40
8.1.70.0030.00517.30
8.1.60.0060.00317.52
8.1.50.0050.00317.45
8.1.40.0080.00017.43
8.1.30.0000.00817.55
8.1.20.0040.00417.59
8.1.10.0000.00817.58
8.1.00.0030.00617.50
8.0.300.0070.00018.77
8.0.290.0040.00417.18
8.0.280.0000.00718.52
8.0.270.0030.00317.32
8.0.260.0000.00617.18
8.0.250.0000.00816.83
8.0.240.0000.00716.79
8.0.230.0000.00716.81
8.0.220.0030.00316.86
8.0.210.0070.00016.89
8.0.200.0030.00316.82
8.0.190.0000.00816.93
8.0.180.0040.00416.79
8.0.170.0030.00516.89
8.0.160.0000.00716.81
8.0.150.0000.00716.84
8.0.140.0000.00716.75
8.0.130.0050.00013.32
8.0.120.0040.00416.83
8.0.110.0000.00716.76
8.0.100.0030.00616.96
8.0.90.0040.00416.66
8.0.80.0130.00916.82
8.0.70.0040.00416.91
8.0.60.0020.00516.88
8.0.50.0000.00716.87
8.0.30.0140.00817.14
8.0.20.0150.00717.40
8.0.10.0040.00416.85
8.0.00.0080.01216.69
7.4.330.0060.00015.09
7.4.320.0000.00616.55
7.4.300.0060.00016.52
7.4.290.0070.00016.46
7.4.280.0030.00516.55
7.4.270.0030.00316.53
7.4.260.0000.00616.34
7.4.250.0040.00416.56
7.4.240.0050.00216.48
7.4.230.0070.00016.26
7.4.220.0030.02016.48
7.4.210.0080.00616.47
7.4.200.0000.00716.46
7.4.190.0000.00716.55
7.4.160.0150.00716.39
7.4.150.0060.01217.40
7.4.140.0150.00517.86
7.4.130.0110.00616.37
7.4.120.0100.00816.47
7.4.110.0060.01116.44
7.4.100.0070.01916.51
7.4.90.0120.00916.52
7.4.80.0090.00919.39
7.4.70.0100.00716.52
7.4.60.0060.00916.43
7.4.50.0040.00416.37
7.4.40.0060.00622.77
7.4.30.0090.00916.65
7.4.00.0040.01214.86
7.3.330.0030.00313.03
7.3.320.0000.00513.07
7.3.310.0000.00716.11
7.3.300.0070.00016.25
7.3.290.0090.00616.22
7.3.280.0070.01016.24
7.3.270.0080.00817.40
7.3.260.0110.00716.28
7.3.250.0100.01016.49
7.3.240.0030.01416.67
7.3.230.0140.00316.39
7.3.210.0060.01116.62
7.3.200.0120.01019.39
7.3.190.0180.00316.46
7.3.180.0130.00316.26
7.3.170.0110.01116.30
7.3.160.0130.00616.68
7.3.120.0060.00915.03
7.3.10.0080.00816.50
7.3.00.0070.00716.77
7.2.330.0110.00716.77
7.2.320.0070.01116.37
7.2.310.0060.01216.74
7.2.300.0170.00316.75
7.2.290.0120.00616.59
7.2.130.0060.01016.85
7.2.120.0120.00316.68
7.2.110.0130.00616.65
7.2.100.0030.00816.77
7.2.90.1060.01016.69
7.2.80.0060.00616.72
7.2.70.0040.00816.79
7.2.60.0090.00616.88
7.2.50.0070.00716.95
7.2.40.0090.00516.98
7.2.30.0090.00517.03
7.2.20.0070.00816.68
7.2.10.0100.00716.92
7.2.00.0100.00517.57
7.1.250.0060.00315.43
7.1.240.0000.01115.79
7.1.230.0080.00415.70
7.1.220.0080.00315.75
7.1.210.0030.00515.88
7.1.200.0060.00615.59
7.1.190.0100.00515.40
7.1.180.0030.01115.69
7.1.170.0140.00015.75
7.1.160.0040.00915.87
7.1.150.0060.00815.88
7.1.140.0100.00515.82
7.1.130.0110.00015.82
7.1.120.0170.00015.50
7.1.110.0080.00815.90
7.1.100.0080.00716.74
7.1.90.0150.00015.79
7.1.80.0040.01115.56
7.1.70.0070.00716.51
7.1.60.0120.00517.51
7.1.50.0040.00916.16
7.1.40.0120.00015.62
7.1.30.0140.00315.55
7.1.20.0000.01515.55
7.1.10.0040.01215.60
7.1.00.0040.04418.94
7.0.320.0030.00615.18
7.0.310.0050.00515.34
7.0.300.0100.00515.36
7.0.290.0070.00715.58
7.0.280.0050.01115.32
7.0.270.0180.00015.28
7.0.260.0080.00615.44
7.0.250.0100.00315.55
7.0.240.0120.00415.61
7.0.230.0110.00415.30
7.0.220.0160.00015.07
7.0.210.0090.00515.60
7.0.200.0080.00316.03
7.0.190.0100.00715.50
7.0.180.0090.00615.29
7.0.170.0130.00315.21
7.0.160.0080.00815.32
7.0.150.0130.00415.46
7.0.140.0110.03618.69
7.0.130.0130.00315.08
7.0.120.0110.04018.80
7.0.110.0090.04618.78
7.0.100.0070.02518.72
7.0.90.0090.04118.67
7.0.80.0140.02818.69
7.0.70.0090.02818.57
7.0.60.0060.02718.79
7.0.50.0050.04018.86
7.0.40.0060.02816.80
7.0.30.0060.03616.56
7.0.20.0050.02316.61
7.0.10.0090.03616.74
7.0.00.0050.04916.63
5.6.380.0100.00014.54
5.6.370.0030.00714.52
5.6.360.0100.00014.26
5.6.350.0140.00414.30
5.6.340.0090.00614.06
5.6.330.0140.00014.34
5.6.320.0080.00414.34
5.6.310.0140.00014.28
5.6.300.0070.01014.41
5.6.290.0090.00514.34
5.6.280.0100.03517.60
5.6.270.0130.03817.66
5.6.260.0070.04017.73
5.6.250.0110.03617.75
5.6.240.0080.04417.72
5.6.230.0030.04517.70
5.6.220.0070.04517.61
5.6.210.0050.03117.72
5.6.200.0030.04217.45
5.6.190.0070.02317.54
5.6.180.0050.03217.76
5.6.170.0060.04117.65
5.6.160.0040.04317.68
5.6.150.0080.02817.60
5.6.140.0070.04817.64
5.6.130.0120.03917.75
5.6.120.0110.01917.64
5.6.110.0070.02717.78
5.6.100.0100.03917.63
5.6.90.0070.02917.62
5.6.80.0100.04217.29
5.6.70.0080.03417.31
5.6.60.0080.02217.42
5.6.50.0080.02117.19
5.6.40.0100.03917.28
5.6.30.0060.04417.38
5.6.20.0040.02817.37
5.6.10.0020.02617.18
5.6.00.0060.02217.20
5.5.380.0050.04414.39
5.5.370.0090.02314.38
5.5.360.0080.03514.47
5.5.350.0050.04214.45
5.5.340.0050.04314.53
5.5.330.0070.02614.52
5.5.320.0030.03814.85
5.5.310.0040.02314.64
5.5.300.0070.03514.60
5.5.290.0060.02514.63
5.5.280.0120.02514.78
5.5.270.0060.02214.60
5.5.260.0070.03114.57
5.5.250.0050.02814.67
5.5.240.0080.02414.41
5.5.230.0020.02814.38
5.5.220.0050.02514.36
5.5.210.0030.04414.39
5.5.200.0090.03214.29
5.5.190.0020.02414.36
5.5.180.0080.02014.26
5.5.170.0090.00914.44
5.5.160.0070.01814.34
5.5.150.0060.04014.34
5.5.140.0060.02414.31
5.5.130.0070.04314.28
5.5.120.0030.02914.28
5.5.110.0070.04214.28
5.5.100.0080.02214.24
5.5.90.0090.03514.08
5.5.80.0060.03414.31
5.5.70.0090.04014.27
5.5.60.0060.04014.27
5.5.50.0090.03514.29
5.5.40.0080.01714.33
5.5.30.0070.02914.32
5.5.20.0110.03314.27
5.5.10.0050.02214.26
5.5.00.0050.02714.26
5.4.450.0020.02515.47
5.4.440.0100.03315.25
5.4.430.0050.02815.32
5.4.420.0080.01615.28
5.4.410.0050.03815.23
5.4.400.0090.03315.19
5.4.390.0060.02115.13
5.4.380.0050.02815.01
5.4.370.0040.02215.15
5.4.360.0050.03715.08
5.4.350.0060.02915.01
5.4.340.0040.02215.14
5.4.330.0070.00711.07
5.4.320.0100.03315.08
5.4.310.0100.02015.14
5.4.300.0050.02315.01
5.4.290.0110.03515.02
5.4.280.0050.04715.07
5.4.270.0030.03515.08
5.4.260.0040.02915.06
5.4.250.0070.03615.26
5.4.240.0050.02815.00
5.4.230.0120.03514.99
5.4.220.0050.03215.11
5.4.210.0060.03915.17
5.4.200.0060.02515.13
5.4.190.0070.03115.16
5.4.180.0060.04115.16
5.4.170.0080.03015.33
5.4.160.0090.02914.98
5.4.150.0030.02515.12
5.4.140.0030.02513.89
5.4.130.0050.04113.84
5.4.120.0080.03713.79
5.4.110.0040.04413.81
5.4.100.0060.04113.76
5.4.90.0070.04013.83
5.4.80.0090.04013.73
5.4.70.0060.03613.89
5.4.60.0090.03013.79
5.4.50.0100.03213.82
5.4.40.0110.02513.81
5.4.30.0050.04013.79
5.4.20.0050.02913.77
5.4.10.0070.02313.81
5.4.00.0080.03513.47
5.3.290.0050.04412.93
5.3.280.0040.03912.85
5.3.270.0110.03712.84
5.3.260.0060.03912.90
5.3.250.0090.03312.84
5.3.240.0040.03212.89
5.3.230.0110.03812.84
5.3.220.0070.03012.83
5.3.210.0140.03812.86
5.3.200.0050.02612.75
5.3.190.0080.03812.82
5.3.180.0080.03512.86
5.3.170.0100.03012.80
5.3.160.0070.02412.82
5.3.150.0120.02012.81
5.3.140.0100.03712.88
5.3.130.0100.03812.80
5.3.120.0090.03712.82
5.3.110.0110.03212.88
5.3.100.0100.03612.56
5.3.90.0090.03412.47
5.3.80.0070.03712.55
5.3.70.0070.03812.61
5.3.60.0090.02012.53
5.3.50.0080.03412.57
5.3.40.0070.02312.44
5.3.30.0060.04112.50
5.3.20.0030.04512.49
5.3.10.0080.03312.37
5.3.00.0100.03012.34
5.2.170.0030.03911.10
5.2.160.0030.03011.15
5.2.150.0070.02011.10
5.2.140.0080.02511.12
5.2.130.0030.03511.06
5.2.120.0020.02211.13
5.2.110.0050.02811.09
5.2.100.0070.01711.09
5.2.90.0020.02811.10
5.2.80.0050.03011.12
5.2.70.0070.02411.15
5.2.60.0060.03211.05
5.2.50.0070.01811.05
5.2.40.0000.02510.96
5.2.30.0050.03311.02
5.2.20.0080.03211.08
5.2.10.0020.03210.96
5.2.00.0050.01510.93
5.1.60.0000.03410.63
5.1.50.0050.02910.63
5.1.40.0040.01510.63
5.1.30.0040.01310.72
5.1.20.0030.03010.83
5.1.10.0050.02710.63
5.1.00.0020.02710.66
5.0.50.0020.02410.63
5.0.40.0050.01210.63
5.0.30.0030.01510.63
5.0.20.0050.01210.63
5.0.10.0020.01110.63
5.0.00.0030.02710.63
4.4.90.0060.01210.63
4.4.80.0020.02210.63
4.4.70.0030.00810.63
4.4.60.0040.01710.63
4.4.50.0040.01610.63
4.4.40.0020.02010.63
4.4.30.0060.01510.63
4.4.20.0040.00710.63
4.4.10.0050.01710.63
4.4.00.0020.01310.63
4.3.110.0030.00710.63
4.3.100.0010.01810.63
4.3.90.0030.01310.63
4.3.80.0020.03110.63
4.3.70.0030.01610.63
4.3.60.0020.01910.63
4.3.50.0050.00810.63
4.3.40.0050.02510.63
4.3.30.0010.02010.63
4.3.20.0040.01910.63
4.3.10.0000.02210.63
4.3.00.0020.01910.63

preferences:
38.53 ms | 401 KiB | 5 Q