3v4l.org

run code in 300+ PHP versions simultaneously
<?php $csv_specie = array("Mouse","Human"); $CDNA = 'Human interleukin 2 (IL2)a;Ampicillin resistance gene (amp)a;Mouse amp gene;Some other stuff unknown to man kind;some other human stuff'; $cdna = explode(";", $CDNA); Foreach($csv_specie as $specie){ $matches[$specie] = preg_grep("/\b" . $specie . "\b/i", $cdna); Echo $specie . " - " . implode("\n" . $specie . " - " , $matches[$specie]) . "\n"; // Remove matched items from $cdna $cdna = array_diff($cdna, $matches[$specie]); } // What is left in $cdna is not matched $matches["N/A"] = $cdna; Echo "\nN/A - " . implode("\nN/A - ", $matches["N/A"]); Echo "\n\n"; Var_dump($matches);

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.5.10.0090.00916.86
8.5.00.0150.00920.29
8.4.160.0120.01023.98
8.4.150.0020.00114.05
8.4.140.0110.01318.09
8.4.130.0110.00917.82
8.4.120.0130.00721.88
8.4.110.0100.01118.88
8.4.100.0110.01017.96
8.4.90.0110.01017.90
8.4.80.0060.00417.93
8.4.70.0060.00518.11
8.4.60.0140.00818.85
8.4.50.0130.00917.83
8.4.40.0150.00617.96
8.4.30.0100.01019.57
8.4.20.0160.00322.44
8.4.10.0120.00818.03
8.3.280.0110.01018.66
8.3.270.0110.00916.63
8.3.260.0100.01016.67
8.3.250.0120.00919.02
8.3.240.0110.00816.67
8.3.230.0070.00116.75
8.3.220.0110.00817.16
8.3.210.0080.00716.97
8.3.200.0060.00316.79
8.3.190.0120.00818.78
8.3.180.0120.00716.68
8.3.170.0160.00316.79
8.3.160.0060.01216.61
8.3.150.0160.00318.82
8.3.140.0120.00616.68
8.3.130.0080.00018.53
8.3.120.0030.00620.68
8.3.110.0080.00016.92
8.3.100.0000.01018.49
8.3.90.0150.00326.77
8.3.80.0000.01016.75
8.3.70.0120.00316.63
8.3.60.0060.01318.43
8.3.50.0120.00317.54
8.3.40.0150.00019.10
8.3.30.0090.00619.04
8.3.20.0040.00419.27
8.3.10.0040.00419.29
8.3.00.0040.00423.52
8.2.290.0110.00820.29
8.2.280.0120.00618.70
8.2.270.0160.00316.79
8.2.260.0050.00320.55
8.2.250.0030.00516.82
8.2.240.0110.00716.55
8.2.230.0030.00620.94
8.2.220.0030.00624.06
8.2.210.0030.00526.77
8.2.200.0060.00318.29
8.2.190.0030.01616.63
8.2.180.0120.00918.54
8.2.170.0040.01122.96
8.2.160.0120.00620.53
8.2.150.0030.00524.18
8.2.140.0040.00424.66
8.2.130.0040.00719.89
8.2.120.0040.00426.35
8.2.110.0050.00520.58
8.2.100.0060.00817.98
8.2.90.0090.00018.00
8.2.80.0030.00517.97
8.2.70.0100.00018.05
8.2.60.0080.00018.05
8.2.50.0040.00418.10
8.2.40.0030.00619.36
8.2.30.0040.00419.46
8.2.20.0030.00618.15
8.2.10.0000.00818.07
8.2.00.0030.00319.51
8.1.330.0130.00618.54
8.1.320.0130.00616.43
8.1.310.0120.00616.68
8.1.300.0040.00418.30
8.1.290.0060.00330.84
8.1.280.0130.00325.92
8.1.270.0040.00423.99
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0040.00422.65
8.1.230.0040.00720.84
8.1.220.0050.00317.74
8.1.210.0000.00818.77
8.1.200.0040.00417.48
8.1.190.0060.00317.35
8.1.180.0000.00918.10
8.1.170.0040.00418.81
8.1.160.0040.00418.93
8.1.150.0020.00518.88
8.1.140.0070.00017.73
8.1.130.0070.00019.04
8.1.120.0040.00417.60
8.1.110.0000.00717.64
8.1.100.0040.00417.63
8.1.90.0040.00417.58
8.1.80.0040.00417.62
8.1.70.0000.00717.66
8.1.60.0040.00417.73
8.1.50.0040.00817.54
8.1.40.0060.00317.73
8.1.30.0090.00317.76
8.1.20.0060.00317.83
8.1.10.0000.00817.63
8.1.00.0040.00417.66
8.0.300.0000.00820.16
8.0.290.0000.00716.88
8.0.280.0040.00418.39
8.0.270.0050.00217.04
8.0.260.0070.00019.06
8.0.250.0030.00317.02
8.0.240.0000.00817.02
8.0.230.0030.00617.18
8.0.220.0080.00016.95
8.0.210.0030.00317.05
8.0.200.0030.00317.14
8.0.190.0050.00317.11
8.0.180.0000.00816.96
8.0.170.0030.00517.07
8.0.160.0000.00917.00
8.0.150.0070.00317.04
8.0.140.0000.00817.04
8.0.130.0000.00513.47
8.0.120.0000.00716.94
8.0.110.0080.00017.08
8.0.100.0040.00416.94
8.0.90.0080.00017.08
8.0.80.0080.00817.01
8.0.70.0040.00416.99
8.0.60.0040.00417.03
8.0.50.0000.00717.11
8.0.30.0090.01117.12
8.0.20.0070.01417.40
8.0.10.0000.00717.04
8.0.00.0080.00916.69
7.4.330.0000.00815.55
7.4.320.0000.00616.82
7.4.300.0030.00316.57
7.4.290.0030.00616.74
7.4.280.0000.00816.71
7.4.270.0030.00316.73
7.4.260.0070.00016.70
7.4.250.0030.00316.68
7.4.240.0000.00716.83
7.4.230.0040.00416.57
7.4.220.0000.00816.63
7.4.210.0090.00816.81
7.4.200.0000.00716.77
7.4.160.0080.00916.73
7.4.140.0140.00817.86
7.4.130.0030.01316.75
7.4.120.0120.00916.70
7.4.110.0060.01216.71
7.4.100.0060.01516.78
7.4.90.0090.00916.61
7.4.80.0110.00819.39
7.4.70.0110.00616.67
7.4.60.0140.00316.70
7.4.50.0080.00816.52
7.4.40.0160.00616.76
7.4.00.0100.00715.04
7.3.330.0000.00513.39
7.3.320.0000.00613.38
7.3.310.0050.00216.54
7.3.300.0080.00016.57
7.3.290.0030.00316.38
7.3.280.0120.00516.48
7.3.260.0170.01616.52
7.3.240.0090.01016.51
7.3.230.0070.01016.73
7.3.210.0120.00916.81
7.3.200.0040.01216.69
7.3.190.0100.00616.41
7.3.180.0030.01416.67
7.3.170.0120.00616.62
7.3.160.0080.00816.79
7.3.10.0040.00816.93
7.3.00.0060.00616.60
7.2.330.0040.01516.84
7.2.320.0100.01016.84
7.2.310.0110.00816.86
7.2.300.0060.01516.64
7.2.290.0130.00616.79
7.2.130.0070.00716.90
7.2.120.0090.00617.18
7.2.110.0040.00717.16
7.2.100.0060.00617.09
7.2.90.0000.01316.80
7.2.80.0050.00916.82
7.2.70.0000.01816.98
7.2.60.1770.00416.23
7.2.50.2170.00616.10
7.2.40.1640.00816.35
7.2.30.1760.00816.52
7.2.20.2040.00716.38
7.2.10.1960.00916.47
7.2.00.1820.01116.44
7.1.250.0000.00915.87
7.1.200.0130.00016.20
7.1.170.3260.00814.06
7.1.160.3510.00817.39
7.1.150.3310.01217.09
7.1.140.3550.01417.38
7.1.130.3440.00917.05
7.1.120.3680.01217.30
7.1.110.3880.01116.73
7.1.100.4200.00616.55
7.1.90.4790.00916.44
7.1.80.4710.01016.46
7.1.70.4350.00915.59
7.1.60.4780.01633.03
7.1.50.5180.01533.00
7.1.40.6040.01432.37
7.1.30.4900.01432.32
7.1.20.5790.01332.80
7.1.10.5220.01114.93
7.1.00.4330.00815.18

preferences:
35.37 ms | 403 KiB | 5 Q