3v4l.org

run code in 300+ PHP versions simultaneously
<?php $value = "100% Wool"; $separators = [ "/", ",", "&", " AND " ]; $value = str_replace($separators, "|", $value); $candidates = explode("|", $value); $percentage = (count($candidates) == 1) ? "100%" : null; if($candidate = trim($candidate)){ if(strpos("%", $candidate) !== false) { list($percentage, $material) = explode("%", $candidate); $percentage .= "%"; } else { $material = $candidate; } $entities = $this->mapping['material']; if($id = $this->exact($material, $entities)) { $material = [ 'material_id' => $id, 'percentage' => $percentage ]; $product['materials'][] = $material; } else { } } print_r($product['materials']);

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.0150.00616.75
8.3.50.0120.00721.04
8.3.40.0000.01418.88
8.3.30.0120.00618.54
8.3.20.0040.00420.27
8.3.10.0060.00323.62
8.3.00.0060.00323.57
8.2.180.0100.01018.54
8.2.170.0140.00722.96
8.2.160.0100.00720.38
8.2.150.0070.00025.66
8.2.140.0090.00624.66
8.2.130.0040.00426.16
8.2.120.0040.00419.96
8.2.110.0090.00020.53
8.2.100.0090.00317.59
8.2.90.0000.00919.26
8.2.80.0000.00817.97
8.2.70.0030.00617.50
8.2.60.0050.00318.04
8.2.50.0040.00818.07
8.2.40.0040.00422.17
8.2.30.0070.00019.51
8.2.20.0040.00417.75
8.2.10.0070.00018.11
8.2.00.0000.00718.11
8.1.280.0040.01825.92
8.1.270.0030.00623.86
8.1.260.0000.00826.35
8.1.250.0040.00428.09
8.1.240.0030.00622.25
8.1.230.0080.00317.45
8.1.220.0070.00017.77
8.1.210.0040.00418.77
8.1.200.0100.00017.35
8.1.190.0000.01117.10
8.1.180.0050.00318.10
8.1.170.0030.00618.64
8.1.160.0050.00320.77
8.1.150.0000.00818.96
8.1.140.0040.00419.49
8.1.130.0000.00717.67
8.1.120.0050.00317.39
8.1.110.0000.00717.40
8.1.100.0000.00717.45
8.1.90.0070.00017.39
8.1.80.0060.00317.50
8.1.70.0000.00817.42
8.1.60.0000.00817.48
8.1.50.0040.00417.55
8.1.40.0040.00417.50
8.1.30.0030.00517.70
8.1.20.0030.00617.55
8.1.10.0000.00717.44
8.1.00.0090.00417.46
8.0.300.0030.00518.77
8.0.290.0000.00816.63
8.0.280.0000.00718.32
8.0.270.0000.00717.21
8.0.260.0000.00617.11
8.0.250.0000.00716.98
8.0.240.0050.00317.01
8.0.230.0000.00716.96
8.0.220.0070.00016.94
8.0.210.0050.00316.76
8.0.200.0000.00816.83
8.0.190.0040.00416.95
8.0.180.0070.00016.94
8.0.170.0030.00516.95
8.0.160.0040.00416.96
8.0.150.0000.00716.89
8.0.140.0040.00416.73
8.0.130.0000.00613.45
8.0.120.0060.00316.96
8.0.110.0070.00017.01
8.0.100.0050.00217.00
8.0.90.0050.00216.85
8.0.80.0060.00916.95
8.0.70.0080.00017.02
8.0.60.0040.00416.96
8.0.50.0020.00516.99
8.0.30.0160.00216.99
8.0.20.0130.00817.40
8.0.10.0030.00516.91
8.0.00.0100.01016.78
7.4.330.0050.00016.77
7.4.320.0030.00316.65
7.4.300.0040.00716.63
7.4.290.0030.00316.42
7.4.280.0040.00416.50
7.4.270.0030.00316.46
7.4.260.0030.00716.60
7.4.250.0000.00716.49
7.4.240.0000.00716.55
7.4.230.0040.00416.35
7.4.220.0120.00616.69
7.4.210.0040.01216.53
7.4.200.0030.00316.71
7.4.160.0030.01316.76
7.4.150.0090.00917.40
7.4.140.0100.01217.86
7.4.130.0110.00916.47
7.4.120.0130.00816.58
7.4.110.0160.00916.45
7.4.100.0120.00916.48
7.4.90.0100.01016.34
7.4.80.0070.01019.39
7.4.70.0100.01316.57
7.4.60.0070.01316.45
7.4.50.0040.01416.42
7.4.40.0090.01416.70
7.4.30.0120.01016.54
7.4.00.0030.01314.99
7.3.330.0030.00313.24
7.3.320.0060.00013.19
7.3.310.0000.00716.26
7.3.300.0030.00316.38
7.3.290.0030.00316.18
7.3.280.0100.00616.32
7.3.270.0030.01517.40
7.3.260.0110.00516.48
7.3.250.0140.00716.48
7.3.240.0120.00716.39
7.3.230.0190.00016.39
7.3.210.0100.01316.46
7.3.200.0160.00619.39
7.3.190.0030.01316.36
7.3.180.0120.00616.42
7.3.170.0090.00916.43
7.3.160.0080.00816.35
7.2.330.0120.00616.68
7.2.320.0030.01316.45
7.2.310.0000.02316.64
7.2.300.0070.01416.57
7.2.290.0100.01016.50
7.2.80.0090.00916.67
7.2.60.0040.01116.82
7.2.00.0040.01119.43
7.1.200.0000.01315.56
7.1.100.0090.00318.06
7.1.70.0030.01317.04
7.1.60.0120.01219.30
7.1.50.0170.02034.68
7.1.00.0070.07322.48
7.0.200.0040.00416.77
7.0.60.0070.08021.82
7.0.50.0100.04717.80
7.0.40.0100.05320.12
7.0.30.0170.04020.09
7.0.20.0300.08719.99
7.0.10.0130.06720.16
7.0.00.0100.08720.33
5.6.280.0030.03021.13
5.6.210.0070.08720.62
5.6.200.0070.08718.15
5.6.190.0030.09320.77
5.6.180.0500.07020.33
5.6.170.0330.07320.61
5.6.160.0070.05020.52
5.6.150.0170.06018.08
5.6.140.0070.04018.09
5.6.130.0100.08018.13
5.6.120.0000.04321.15
5.6.110.0070.09021.14
5.6.100.0030.09320.98
5.6.90.0030.06721.02
5.6.80.0100.06020.41
5.5.350.3830.03320.50
5.5.340.0100.07017.95
5.5.330.0130.08320.40
5.5.320.0300.04720.17
5.5.310.0270.06020.30
5.5.300.0000.05017.96
5.5.290.0100.03317.93
5.5.280.0000.06020.80
5.5.270.0070.07320.80
5.5.260.0030.07720.82
5.5.250.0200.07020.50
5.5.240.0200.07320.13

preferences:
52.8 ms | 401 KiB | 5 Q