3v4l.org

run code in 300+ PHP versions simultaneously
<?php $entity = new stdClass(); $entity->price['und'][] = array('amount' => 0, 'currency_code' => 'CAD', 'data' => FALSE); $entity->price2['und'][] = array('amount' => 0, 'currency_code' => 'CAD', 'data' => FALSE); function compare_filter($field, $array) { foreach ($array as $language => $items) { if (empty($items)) { unset($array[$language]); } else { foreach ($items as $delta => $item) { $array[$language][$delta] = array_filter(array_intersect_key($item, $field['columns'])); ksort($array[$language][$delta]); } } } return $array; } $field['columns'] = array('amount' => array(), 'currency_code' => array(), 'data' => array()); foreach (array('price', 'price2') as $field_name) { $items1 = compare_filter($field, (array) $entity->$field_name); } var_dump($entity);

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.0130.00616.63
8.3.50.0080.01122.10
8.3.40.0100.01018.67
8.3.30.0110.00419.21
8.3.20.0090.00020.34
8.3.10.0040.00421.68
8.3.00.0040.00419.37
8.2.180.0130.00918.29
8.2.170.0120.00322.96
8.2.160.0100.00320.57
8.2.150.0000.00824.18
8.2.140.0000.00824.66
8.2.130.0040.00426.16
8.2.120.0040.00419.36
8.2.110.0070.00320.99
8.2.100.0090.00317.46
8.2.90.0040.00419.25
8.2.80.0040.00417.97
8.2.70.0000.00817.63
8.2.60.0050.00317.79
8.2.50.0030.00618.07
8.2.40.0030.00620.01
8.2.30.0030.00618.13
8.2.20.0030.00617.63
8.2.10.0040.00418.20
8.2.00.0000.00817.62
8.1.280.0100.01025.92
8.1.270.0090.00018.81
8.1.260.0000.00826.35
8.1.250.0000.00728.09
8.1.240.0080.00021.90
8.1.230.0110.00017.79
8.1.220.0040.00417.80
8.1.210.0050.00518.77
8.1.200.0060.00317.48
8.1.190.0070.00317.23
8.1.180.0030.00618.10
8.1.170.0030.00519.11
8.1.160.0030.00621.89
8.1.150.0000.00818.80
8.1.140.0030.00517.33
8.1.130.0070.00017.84
8.1.120.0000.00817.32
8.1.110.0080.00017.52
8.1.100.0040.00417.41
8.1.90.0040.00417.41
8.1.80.0030.00517.43
8.1.70.0000.00717.43
8.1.60.0090.00017.54
8.1.50.0040.00417.45
8.1.40.0080.00017.51
8.1.30.0030.00517.64
8.1.20.0040.00417.68
8.1.10.0080.00017.61
8.1.00.0000.00817.35
8.0.300.0040.00418.77
8.0.290.0040.00416.61
8.0.280.0030.00318.39
8.0.270.0040.00417.16
8.0.260.0000.00617.26
8.0.250.0070.00016.98
8.0.240.0030.00316.84
8.0.230.0020.00516.88
8.0.220.0030.00316.79
8.0.210.0040.00416.91
8.0.200.0030.00316.95
8.0.190.0040.00416.91
8.0.180.0050.00216.81
8.0.170.0000.00716.81
8.0.160.0050.00216.97
8.0.150.0030.00316.80
8.0.140.0000.00716.88
8.0.130.0030.00313.39
8.0.120.0000.00816.83
8.0.110.0000.00716.96
8.0.100.0040.00416.84
8.0.90.0070.00016.84
8.0.80.0060.01216.95
8.0.70.0060.00316.88
8.0.60.0050.00216.91
8.0.50.0070.00016.95
8.0.30.0100.01417.13
8.0.20.0090.01417.40
8.0.10.0000.00717.05
8.0.00.0070.01416.80
7.4.330.0050.00015.14
7.4.320.0030.00316.43
7.4.300.0030.00316.54
7.4.290.0050.00216.59
7.4.280.0050.00316.60
7.4.270.0030.00316.59
7.4.260.0000.00716.64
7.4.250.0030.00516.54
7.4.240.0050.00216.50
7.4.230.0050.00316.54
7.4.220.0170.00016.51
7.4.210.0030.01216.57
7.4.200.0000.00716.63
7.4.160.0170.00016.38
7.4.150.0040.01317.40
7.4.140.0110.01117.86
7.4.130.0110.00716.62
7.4.120.0100.00716.46
7.4.110.0030.01716.53
7.4.100.0110.01316.37
7.4.90.0060.01216.46
7.4.80.0110.00719.39
7.4.70.0070.01016.66
7.4.60.0170.00016.43
7.4.50.0020.00216.33
7.4.40.0090.00916.46
7.4.30.0120.00616.61
7.4.00.0060.00914.73
7.3.330.0030.00313.22
7.3.320.0150.00013.34
7.3.310.0000.00716.26
7.3.300.0040.00416.37
7.3.290.0060.01016.33
7.3.280.0090.01016.36
7.3.270.0100.00617.40
7.3.260.0090.00916.55
7.3.250.0110.00716.39
7.3.240.0140.00716.65
7.3.230.0140.01116.51
7.3.210.0070.01116.52
7.3.200.0030.01319.39
7.3.190.0120.00416.64
7.3.180.0170.00016.64
7.3.170.0090.00916.37
7.3.160.0060.01116.61
7.3.10.0060.00316.63
7.3.00.0060.00616.41
7.2.330.0090.01216.75
7.2.320.0110.00716.88
7.2.310.0120.00416.54
7.2.300.0090.00916.80
7.2.290.0090.00916.88
7.2.130.0050.00516.93
7.2.120.0070.00316.85
7.2.110.0040.00716.54
7.2.100.0060.00616.83
7.2.90.0070.00716.55
7.2.80.0090.00617.18
7.2.70.0100.00716.60
7.2.60.0080.00717.00
7.2.50.0040.00516.63
7.2.40.0090.00616.27
7.2.30.0090.00616.77
7.2.20.0000.01316.80
7.2.10.0030.00716.95
7.2.00.0020.01118.11
7.1.250.0030.00715.68
7.1.200.0040.00815.87
7.1.100.0060.01118.28
7.1.70.0080.00317.06
7.1.60.0100.01419.50
7.1.50.0070.01416.76
7.1.00.0000.07722.29
7.0.200.0200.00716.34
7.0.140.0100.07022.08
7.0.60.0070.08020.04
7.0.50.0030.04017.92
7.0.40.0030.06020.14
7.0.30.0200.04020.07
7.0.20.0300.06720.16
7.0.10.0300.07720.05
7.0.00.0100.04020.12
5.6.280.0070.06720.86
5.6.210.0130.07320.71
5.6.200.0070.08018.28
5.6.190.0100.04720.62
5.6.180.0230.04020.66
5.6.170.0230.04020.47
5.6.160.0100.07720.54
5.6.150.0170.04018.28
5.6.140.0100.06018.17
5.6.130.0030.07718.18
5.6.120.0070.08321.00
5.6.110.0200.06020.99
5.6.100.0070.04021.02
5.6.90.0200.07320.99
5.6.80.0100.03320.52
5.6.70.0170.07320.50
5.5.350.0270.07720.32
5.5.340.0030.03718.02
5.5.330.0070.09020.27
5.5.320.0000.04720.19
5.5.310.0200.04720.30
5.5.300.0070.07017.99
5.5.290.0130.03718.02
5.5.280.0100.06320.66
5.5.270.0030.09320.73
5.5.260.0100.07020.96
5.5.250.0100.05320.71
5.5.240.0100.04320.23
5.4.450.0630.06719.22
5.4.440.0830.07019.45
5.4.430.0930.05319.20
5.4.420.1030.04719.61
5.4.410.0830.05719.50
5.4.400.0270.05718.51
5.4.390.0300.05318.61
5.4.380.0270.06018.63
5.4.370.0270.06018.70
5.4.360.0230.06018.45
5.4.350.0330.05018.61
5.4.340.0270.05318.52
5.4.320.0300.05718.58
5.4.310.0230.05718.41
5.4.300.0230.06018.58
5.4.290.0270.06318.73
5.4.280.0430.06718.71
5.4.270.0270.06018.82
5.4.260.0300.04718.69
5.4.250.0400.04718.80
5.4.240.0300.05318.50
5.4.230.0470.07018.57
5.4.220.0300.08018.69
5.4.210.0370.04718.49
5.4.200.0230.05316.67
5.4.190.0400.04018.57
5.4.180.0230.06018.60
5.4.170.0200.07018.78
5.4.160.0270.05018.48
5.4.150.0170.05718.70
5.4.140.0370.04016.19
5.4.130.0230.05016.30
5.4.120.0330.05716.25
5.4.110.0300.04716.23
5.4.100.0270.05316.23
5.4.90.0400.04016.34
5.4.80.0300.04716.22
5.4.70.0270.04716.25
5.4.60.0230.05016.41
5.4.50.0300.04016.27
5.4.40.0330.04016.26
5.4.30.0270.04716.38
5.4.20.0230.05016.29
5.4.10.0230.04716.20
5.4.00.0170.05015.69
5.3.290.0200.05714.73
5.3.280.0170.06014.62
5.3.270.0170.06314.67
5.3.260.0300.05014.64
5.3.250.0200.06014.66
5.3.240.0230.05014.61
5.3.230.0270.05014.58
5.3.220.0170.05714.57
5.3.210.0270.05314.61
5.3.200.0430.06314.63
5.3.190.0330.07314.67
5.3.180.0230.05314.63
5.3.170.0300.05714.67
5.3.160.0270.04714.62
5.3.150.0200.05714.73
5.3.140.0300.04714.75
5.3.130.0300.05314.65
5.3.120.0330.05314.69
5.3.110.0370.04714.55
5.3.100.0370.06314.14
5.3.90.0330.06714.02
5.3.80.0230.06314.25
5.3.70.0230.05014.02
5.3.60.0300.06313.99
5.3.50.0330.05313.96
5.3.40.0270.07013.95
5.3.30.0230.05013.97
5.3.20.0200.05313.91
5.3.10.0370.05713.65
5.3.00.0270.04713.68
5.2.170.0230.03711.18
5.2.160.0200.04011.27
5.2.150.0170.04311.28
5.2.140.0170.04311.27
5.2.130.0200.04011.24
5.2.120.0200.04011.10
5.2.110.0130.04711.14
5.2.100.0200.06011.15
5.2.90.0170.04011.24
5.2.80.0130.04711.22
5.2.70.0300.05011.15
5.2.60.0330.04711.05
5.2.50.0170.04311.08
5.2.40.0130.04011.05
5.2.30.0170.04011.03
5.2.20.0200.04311.04
5.2.10.0170.04010.99
5.2.00.0130.04010.85
5.1.60.0100.03710.00
5.1.50.0130.03710.02
5.1.40.0130.0409.97
5.1.30.0330.03710.36
5.1.20.0200.05010.49
5.1.10.0100.03710.10
5.1.00.0230.02710.08
5.0.50.0070.0308.74
5.0.40.0070.0338.46
5.0.30.0130.0408.43
5.0.20.0100.0278.24
5.0.10.0200.0178.18
5.0.00.0100.0508.20
4.4.90.0130.0275.91
4.4.80.0170.0206.00
4.4.70.0070.0235.90
4.4.60.0070.0235.93
4.4.50.0070.0235.95
4.4.40.0100.0336.02
4.4.30.0030.0306.00
4.4.20.0170.0176.06
4.4.10.0170.0175.99
4.4.00.0070.0405.93
4.3.110.0100.0235.96
4.3.100.0030.0275.85
4.3.90.0070.0235.84
4.3.80.0100.0375.82
4.3.70.0100.0275.78
4.3.60.0100.0275.81
4.3.50.0030.0275.85
4.3.40.0170.0335.90
4.3.30.0000.0274.58
4.3.20.0070.0234.68
4.3.10.0070.0234.59
4.3.00.0100.0236.77

preferences:
40.43 ms | 401 KiB | 5 Q