3v4l.org

run code in 300+ PHP versions simultaneously
<?php $res = ''; $attributes = explode("||", 'черный==0||зеленый==0||салатовый==0||полированный==0||оранжевый==0||красный==0||белый==0'); foreach ($attributes as $value_attribute) { if (!empty($value_attribute)) { /* $fields = array( 'parameter_id' => $liid, 'attribute' => $value_attribute ); */ //$modx->db->insert($fields, $mod_table[2]); //$res .= $value_attribute.'<br>'; $attributes_delimiter .= $value_attribute; } else { } } $vad = explode("==", $attributes_delimiter); foreach ( as $value_attribute_delimiter) { $res .= $value_attribute_delimiter; } echo $res;

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)
5.4.360.2170.04019.09
5.4.350.2070.04018.98
5.4.340.2270.04719.15
5.4.320.2130.03719.00
5.4.310.2300.04019.15
5.4.300.2370.04319.06
5.4.290.2330.04718.99
5.4.280.2230.04719.13
5.4.270.2300.04319.23
5.4.260.2170.03319.15
5.4.250.2330.04019.14
5.4.240.2000.04018.87
5.4.230.2070.03718.94
5.4.220.1930.03319.30
5.4.210.1970.03318.84
5.4.200.2130.04019.22
5.4.190.2400.04318.88
5.4.180.2130.03719.30
5.4.170.2330.04019.23
5.4.160.2330.04018.93
5.4.150.2100.03719.04
5.4.140.2270.04316.38
5.4.130.2300.03316.37
5.4.120.2230.03716.37
5.4.110.1900.03716.21
5.4.100.2500.04316.46
5.4.90.2530.04316.35
5.4.80.2100.04016.28
5.4.70.2070.04016.17
5.4.60.2400.03716.22
5.4.50.2170.03316.22
5.4.40.2070.03716.41
5.4.30.2200.03716.50
5.4.20.2500.04316.21
5.4.10.2270.04016.43
5.4.00.2070.02715.78
5.3.290.2470.03714.52
5.3.280.2100.04014.43
5.3.270.2270.04314.59
5.3.260.2300.04014.45
5.3.250.2000.04014.48
5.3.240.2130.04014.45
5.3.230.2300.03714.54
5.3.220.2030.03714.41
5.3.210.2100.03314.55
5.3.200.2330.03014.41
5.3.190.2300.04014.44
5.3.180.2370.04314.47
5.3.170.2270.04714.41
5.3.160.2430.03314.65
5.3.150.1930.04014.68
5.3.140.2170.04314.41
5.3.130.2230.04014.41
5.3.120.2000.04014.50
5.3.110.2300.04314.42
5.3.100.1800.03013.90
5.3.90.2230.04013.88
5.3.80.2270.04014.01
5.3.70.2300.04013.88
5.3.60.2200.04314.12
5.3.50.2070.03314.00
5.3.40.2000.04013.90
5.3.30.2230.04013.71
5.3.20.2400.04013.79
5.3.10.2330.04013.60
5.3.00.2000.03713.58
5.2.170.1900.03711.05
5.2.160.1770.03011.01
5.2.150.1930.03311.16
5.2.140.2030.03010.97
5.2.130.2030.02311.20
5.2.120.2000.03311.14
5.2.110.1730.02710.99
5.2.100.2000.03010.90
5.2.90.1700.03311.05
5.2.80.1970.03011.16
5.2.70.1770.03011.14
5.2.60.1600.04010.91
5.2.50.2030.03010.91
5.2.40.1430.02710.90
5.2.30.1630.03710.83
5.2.20.1570.02710.86
5.2.10.1330.03310.81
5.2.00.1430.03010.66
5.1.60.1670.0309.97
5.1.50.1400.0279.92
5.1.40.1700.02310.07
5.1.30.1600.02710.36
5.1.20.1430.02310.43
5.1.10.1470.02310.05
5.1.00.1470.0309.95
5.0.50.0700.0208.41
5.0.40.0730.0178.53
5.0.30.0730.0338.10
5.0.20.0700.0208.28
5.0.10.0800.0278.06
5.0.00.0730.0278.38
4.4.90.0770.0177.75
4.4.80.0730.0107.75
4.4.70.0700.0207.75
4.4.60.0730.0207.75
4.4.50.0830.0237.75
4.4.40.0670.0277.75
4.4.30.0670.0177.75
4.4.20.0770.0107.75
4.4.10.0700.0177.75
4.4.00.0730.0237.75
4.3.110.0600.0107.75
4.3.100.0770.0107.75
4.3.90.0770.0137.75
4.3.80.0800.0207.75
4.3.70.0830.0137.75
4.3.60.0770.0177.75
4.3.50.0930.0177.75
4.3.40.0730.0277.75
4.3.30.0330.0177.75
4.3.20.0400.0177.75
4.3.10.0370.0137.75
4.3.00.0370.0137.75

preferences:
142.69 ms | 1394 KiB | 7 Q