3v4l.org

run code in 300+ PHP versions simultaneously
<?php $desc = '<p> <span style="font-size:12pt;"><strong>Nappe bouton power Samsung Galaxy S6 Edge G925F</strong></span> <br> <span style="font-size:12pt;"><u><i>Nappe Bouton poweR, compatible Samsung Galaxy S6 Edge G925F.</i></u></span> </p>'; canLinkThisWordIn('bouton Power', $desc); function canLinkThisWordIn($word, $html){ $forbidenTagsArray = array('strong', 'a', 'b', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6'); $dom = new DOMDocument(); $dom->loadHTML($html); $xpath = new DOMXpath($dom); $wordTags = $xpath->query("//*[text()[contains(translate(., '".strtoupper($word)."', '".strtolower($word)."'), '".strtolower($word)."')]]"); foreach($wordTags as $wordTag){ if(checkTagAndParent($wordTag, $forbidenTagsArray)){ echo "\n".$wordTag->nodeName." == ".$wordTag->nodeValue; } } return false; } function checkTagAndParent($tag, $forbiden){ if(!in_array($tag->tagName, $forbiden)){ if($tag->parentNode){ $parentTags = array_filter(explode("/", preg_replace("/\[[^]]+\]/", "", $tag->getNodePath()))); foreach($parentTags as $parentTag){ if(in_array($parentTag, $forbiden)){ return false; } } } return true; } return false; }

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.0000.01518.80
8.3.50.0120.00918.57
8.3.40.0160.00619.34
8.3.30.0140.00419.38
8.3.20.0090.00022.40
8.3.10.0130.00019.07
8.3.00.0040.00422.60
8.2.180.0120.00918.79
8.2.170.0070.01122.96
8.2.160.0100.00722.34
8.2.150.0000.00824.18
8.2.140.0080.00024.66
8.2.130.0040.00420.02
8.2.120.0000.00826.35
8.2.110.0050.00520.89
8.2.100.0070.01018.01
8.2.90.0030.00518.25
8.2.80.0030.00518.18
8.2.70.0040.00418.18
8.2.60.0000.00818.47
8.2.50.0000.00918.10
8.2.40.0000.00920.84
8.2.30.0040.00419.52
8.2.20.0000.00818.52
8.2.10.0000.00718.59
8.2.00.0000.00818.25
8.1.280.0060.01225.92
8.1.270.0050.00324.25
8.1.260.0040.00426.35
8.1.250.0060.00328.09
8.1.240.0030.00624.22
8.1.230.0110.00419.59
8.1.220.0030.00518.16
8.1.210.0060.00318.77
8.1.200.0000.00917.73
8.1.190.0050.00317.85
8.1.180.0060.00318.16
8.1.170.0040.00419.04
8.1.160.0070.00019.26
8.1.150.0030.00522.60
8.1.140.0050.00319.90
8.1.130.0000.00719.38
8.1.120.0040.00417.89
8.1.110.0020.00517.91
8.1.100.0000.00717.89
8.1.90.0040.00417.89
8.1.80.0030.00517.93
8.1.70.0000.00718.04
8.1.60.0030.00518.02
8.1.50.0040.00418.11
8.1.40.0040.00418.05
8.1.30.0040.00418.21
8.1.20.0030.00618.08
8.1.10.0040.00418.09
8.1.00.0040.00418.11
8.0.300.0030.00520.09
8.0.290.0040.00417.13
8.0.280.0070.00018.76
8.0.270.0080.00017.72
8.0.260.0030.00317.61
8.0.250.0070.00017.44
8.0.240.0080.00017.41
8.0.230.0030.00317.46
8.0.220.0070.00017.41
8.0.210.0040.00417.27
8.0.200.0000.00817.38
8.0.190.0050.00317.46
8.0.180.0070.00017.30
8.0.170.0020.00517.48
8.0.160.0030.00517.49
8.0.150.0000.00817.39
8.0.140.0080.00017.23
8.0.130.0060.00013.97
8.0.120.0080.00017.24
8.0.110.0070.00017.28
8.0.100.0040.00417.36
8.0.90.0040.00417.31
8.0.80.0160.00717.43
8.0.70.0000.00817.24
8.0.60.0000.00817.39
8.0.50.0040.00417.47
8.0.30.0100.00917.54
8.0.20.0070.01217.48
8.0.10.0000.00817.50
8.0.00.0090.01217.41
7.4.330.0000.00515.65
7.4.320.0040.00417.07
7.4.300.0070.00017.13
7.4.290.0030.00317.27
7.4.280.0000.00917.05
7.4.270.0000.00717.11
7.4.260.0070.00317.16
7.4.250.0000.00717.18
7.4.240.0000.00717.02
7.4.230.0040.00416.98
7.4.220.0030.02316.96
7.4.210.0000.01617.08
7.4.200.0040.00417.18
7.4.160.0080.00816.97
7.4.150.0080.00817.40
7.4.140.0100.00717.86
7.4.130.0150.00517.04
7.4.120.0090.01117.02
7.4.110.0070.01016.97
7.4.100.0130.00916.97
7.4.90.0120.01216.94
7.4.80.0000.01719.39
7.4.70.0130.00316.92
7.4.60.0080.00816.97
7.4.50.0060.00917.14
7.4.40.0050.01317.17
7.4.30.0100.00717.06
7.4.10.0070.01415.11
7.4.00.0030.01315.16
7.3.330.0050.00013.72
7.3.320.0030.00313.70
7.3.310.0050.00216.82
7.3.300.0030.00316.62
7.3.290.0080.00916.78
7.3.280.0080.01016.80
7.3.270.0160.00817.40
7.3.260.0160.00616.97
7.3.250.0120.00817.00
7.3.240.0110.00816.96
7.3.230.0070.01016.93
7.3.210.0120.00616.99
7.3.200.0070.01017.13
7.3.190.0090.01217.18
7.3.180.0070.01016.91
7.3.170.0080.00916.83
7.3.160.0180.00417.04
7.3.130.0000.01615.34
7.3.120.0130.00715.10
7.3.110.0040.01515.09
7.3.100.0040.01115.22
7.3.90.0060.01014.89
7.3.80.0040.00715.18
7.3.70.0070.00715.20
7.3.60.0070.00715.21
7.3.50.0030.00814.99
7.3.40.0070.00715.18
7.3.30.0030.00915.15
7.3.20.0090.00017.04
7.3.10.0060.00617.20
7.3.00.0030.01017.20
7.2.330.0110.00717.00
7.2.320.0120.00617.06
7.2.310.0100.00717.02
7.2.300.0140.00917.18
7.2.290.0070.01017.25
7.2.260.0130.01015.71
7.2.250.0090.00915.71
7.2.240.0090.00615.48
7.2.230.0060.00915.21
7.2.220.0000.01115.54
7.2.210.0070.01015.44
7.2.200.0060.00915.34
7.2.190.0060.00615.59
7.2.180.0030.01315.39
7.2.170.0040.01115.48
7.2.160.0080.00415.24
7.2.150.0000.01317.00
7.2.140.0060.00917.34
7.2.130.0060.00617.11
7.2.120.0070.01017.14
7.2.110.0100.00717.20
7.2.100.0030.01017.34
7.2.90.0060.01017.26
7.2.80.0060.01217.26
7.2.70.0030.01417.29
7.2.60.0100.00717.22
7.2.50.0000.01517.30
7.2.40.0030.01217.25
7.2.30.0070.01117.15
7.2.20.0000.01417.35
7.2.10.0060.00617.27
7.2.00.0070.01117.46
7.1.330.0040.01216.38
7.1.320.0040.01116.42
7.1.310.0070.00716.32
7.1.300.0030.00616.01
7.1.290.0030.01415.81
7.1.280.0060.00316.23
7.1.270.0000.01116.08
7.1.260.0030.01015.98
7.1.250.0000.01516.30
7.1.240.0060.00616.05
7.1.230.0090.00315.98
7.1.220.0100.00716.15
7.1.210.0000.01616.27
7.1.200.0000.01416.11
7.1.190.0090.00315.83
7.1.180.0030.01016.20
7.1.170.0090.00016.27
7.1.160.0030.01415.89
7.1.150.0030.00916.11
7.1.140.0030.00716.23
7.1.130.0090.00616.13
7.1.120.0070.00416.19
7.1.110.0080.00416.03
7.1.100.0030.01015.95
7.1.90.0040.00816.29
7.1.80.0030.00916.24
7.1.70.0090.00316.83
7.1.60.0090.00515.95
7.1.50.0060.00316.40
7.1.40.0060.00916.09
7.1.30.0060.00316.12
7.1.20.0110.00416.33
7.1.10.0080.04619.16
7.1.00.0080.03219.29
7.0.330.0040.00815.88
7.0.320.0110.00715.89
7.0.310.0000.00915.85
7.0.300.0030.00715.72
7.0.290.0110.00315.90
7.0.280.0000.01315.77
7.0.270.0030.00915.78
7.0.260.0000.01015.75
7.0.250.0120.00015.79
7.0.240.0040.00715.86
7.0.230.0090.00315.98
7.0.220.0040.00715.60
7.0.210.0090.00315.99
7.0.200.0030.01116.29
7.0.190.0000.01515.80
7.0.180.0110.00315.79
7.0.170.0130.00315.85
7.0.160.0040.00415.72
7.0.150.0130.03718.87
7.0.140.0060.03318.88
7.0.130.0060.03618.93
7.0.120.0030.03718.92
7.0.110.0090.04118.90
7.0.100.0070.03218.92
7.0.90.0060.03019.01
7.0.80.0070.03018.96
7.0.70.0030.03318.90
7.0.60.0030.03318.81
7.0.50.0080.03019.02
7.0.40.0080.03017.87
7.0.30.0070.03517.94
7.0.20.0070.03217.88
7.0.10.0080.02717.88
7.0.00.0020.03617.98
5.6.400.0080.00614.52
5.6.390.0000.01214.52
5.6.380.0040.01114.48
5.6.370.0070.00714.34
5.6.360.0000.01514.23
5.6.350.0040.01414.98
5.6.340.0000.01414.48
5.6.330.0040.00714.65
5.6.320.0110.00414.55
5.6.310.0080.00414.63
5.6.300.0030.00614.59
5.6.290.0040.00814.40
5.6.280.0040.00714.79
5.6.270.0070.01014.54
5.6.260.0130.00314.75
5.6.250.0040.01114.60
5.6.240.0000.00814.68
5.6.230.0030.01014.45
5.6.220.0100.00314.36
5.6.210.0040.01114.64
5.6.200.0000.01414.89
5.6.190.0130.00314.71
5.6.180.0070.00714.54
5.6.170.0060.00614.86
5.6.160.0050.00814.64
5.6.150.0100.00314.59
5.6.140.0030.01014.33
5.6.130.0070.00414.66
5.6.120.0000.00814.34
5.6.110.0070.00714.75
5.6.100.0030.01414.43
5.6.90.0040.00814.55
5.6.80.0000.01114.32
5.6.70.0000.01114.34
5.6.60.0090.00314.51
5.6.50.0000.01514.41
5.6.40.0090.00914.46
5.6.30.0000.01614.37
5.6.20.0060.00914.59
5.6.10.0060.01114.34
5.6.00.0060.00614.70

preferences:
61.9 ms | 400 KiB | 5 Q