3v4l.org

run code in 300+ PHP versions simultaneously
<?php $doc = new DOMDocument; $doc->loadHTML(" <html> <body> <p><span>This is mytext :)</span></p> <p><span>This is also MyText :)</span></p> <p><span>MyText at the start :)</span></p> <p><span>Not my text :(</span></p> "); $xpath = new DOMXPath($doc); // Allow calling the stripos() function in XPath $xpath->registerNamespace("php", "http://php.net/xpath"); $xpath->registerPHPFunctions("stripos"); // Example: find <span> elements containing "MyText" (case-insensitive) $nodeList = $xpath->query("//span[php:functionString('stripos', ., 'MyText')]"); foreach ($nodeList as $node) { echo $doc->saveXML($node) . "\n"; }

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.30.0110.00719.76
8.5.20.0030.00520.61
8.5.10.0050.00317.14
8.5.00.0110.01220.41
8.4.180.0140.00822.30
8.4.170.0130.00920.92
8.4.160.0130.00924.35
8.4.150.0070.00417.04
8.4.140.0100.01218.04
8.4.130.0090.00819.02
8.4.120.0140.00820.85
8.4.110.0130.00722.88
8.4.100.0110.01018.31
8.4.90.0140.00719.02
8.4.80.0150.00618.09
8.4.70.0130.00818.34
8.4.60.0110.00620.61
8.4.50.0160.00519.81
8.4.40.0030.00617.78
8.4.30.0110.00719.10
8.4.20.0140.00420.00
8.4.10.0030.00620.95
8.3.300.0120.00921.17
8.3.290.0090.01221.27
8.3.280.0180.00618.81
8.3.270.0090.01117.04
8.3.260.0060.00317.10
8.3.250.0100.01019.37
8.3.240.0140.00616.85
8.3.230.0090.01017.03
8.3.220.0140.00517.42
8.3.210.0080.00716.93
8.3.200.0050.00416.82
8.3.190.0150.00419.28
8.3.180.0120.00818.69
8.3.170.0070.01119.30
8.3.160.0110.00719.34
8.3.150.0040.01119.41
8.3.140.0030.00618.63
8.3.130.0090.00018.67
8.3.120.0090.00319.23
8.3.110.0060.00320.94
8.3.100.0080.00024.06
8.3.90.0050.00326.77
8.3.80.0060.00319.36
8.3.70.0090.00616.88
8.3.60.0090.00616.88
8.3.50.0160.00523.81
8.3.40.0160.00019.50
8.3.30.0070.00718.80
8.3.20.0070.00024.18
8.3.10.0050.00324.66
8.3.00.0060.00326.16
8.2.300.0120.00822.38
8.2.290.0110.00821.21
8.2.280.0100.00820.65
8.2.270.0070.00317.48
8.2.260.0130.00619.29
8.2.250.0060.00317.15
8.2.240.0000.00817.78
8.2.230.0050.00522.58
8.2.220.0070.00337.54
8.2.210.0070.00726.77
8.2.200.0030.00718.88
8.2.190.0150.00418.66
8.2.180.0180.00425.92
8.2.170.0070.01022.96
8.2.160.0070.00722.96
8.2.150.0080.00025.66
8.2.140.0030.00624.66
8.2.130.0040.00426.16
8.2.120.0080.00026.35
8.2.110.0080.00319.68
8.2.100.0110.00018.22
8.2.90.0080.00018.22
8.2.80.0000.01119.50
8.2.70.0030.00617.88
8.2.60.0000.00817.75
8.2.50.0030.00518.05
8.2.40.0050.00320.26
8.2.30.0040.00418.45
8.2.20.0070.00018.55
8.2.10.0000.00819.69
8.2.00.0040.00419.77
8.1.340.0110.01021.83
8.1.330.0120.00422.22
8.1.320.0140.00616.52
8.1.310.0030.00618.76
8.1.300.0060.00316.62
8.1.290.0060.00330.84
8.1.280.0100.01025.92
8.1.270.0040.00423.99
8.1.260.0080.00028.09
8.1.250.0080.00028.09
8.1.240.0030.00622.46
8.1.230.0030.01023.19
8.1.220.0040.00418.04
8.1.210.0050.00319.26
8.1.200.0030.00618.02
8.1.190.0080.00017.63
8.1.180.0040.00418.10
8.1.170.0080.00019.25
8.1.160.0060.00319.20
8.1.150.0070.00019.34
8.1.140.0040.00419.29
8.1.130.0040.00420.50
8.1.120.0000.00717.89
8.1.110.0090.00017.74
8.1.100.0040.00417.89
8.1.90.0030.00517.87
8.1.80.0040.00417.78
8.1.70.0000.00717.76
8.1.60.0040.00417.97
8.1.50.0030.00517.94
8.1.40.0000.00817.96
8.1.30.0040.00418.11
8.1.20.0050.00318.05
8.1.10.0090.00018.01
8.1.00.0050.00317.87
8.0.300.0040.00420.68
8.0.290.0040.00417.13
8.0.280.0040.00418.77
8.0.270.0030.00618.30
8.0.260.0070.00020.53
8.0.250.0030.00317.29
8.0.240.0040.00417.28
8.0.230.0000.00917.23
8.0.220.0020.00517.27
8.0.210.0040.00317.29
8.0.200.0000.00617.20
8.0.190.0070.00017.31
8.0.180.0080.00017.38
8.0.170.0030.00617.30
8.0.160.0040.00417.22
8.0.150.0030.00317.29
8.0.140.0000.00817.30
8.0.130.0000.00513.82
8.0.120.0080.00017.30
8.0.110.0050.00217.18
8.0.100.0000.00717.21
8.0.90.0040.00417.08
8.0.80.0030.01117.21
8.0.70.0040.00417.26
8.0.60.0050.00317.24
8.0.50.0030.00617.16
8.0.30.0090.00917.27
8.0.20.0070.01317.47
8.0.10.0040.00417.36
8.0.00.0170.00917.07
7.4.330.0000.00515.55
7.4.320.0030.00317.00
7.4.300.0040.00416.87
7.4.290.0000.00816.90
7.4.280.0100.00016.95
7.4.270.0040.00416.90
7.4.260.0030.00613.70
7.4.250.0050.00316.90
7.4.240.0020.00516.96
7.4.230.0070.00016.95
7.4.220.0030.00316.80
7.4.210.0090.00616.98
7.4.200.0000.00716.95
7.4.130.0070.01416.91
7.4.120.0140.01317.05
7.4.110.0100.01317.00
7.4.100.0100.00717.01
7.4.90.0030.01416.75
7.4.80.0030.01719.39
7.4.70.0110.00716.81
7.4.60.0090.01216.85
7.4.50.0170.00716.82
7.4.40.0110.01116.70
7.4.30.0000.01916.90
7.4.20.0160.00416.66
7.4.10.0120.00616.59
7.4.00.0150.01116.95
7.3.330.0070.00016.73
7.3.320.0000.00513.42
7.3.310.0070.00016.59
7.3.300.0030.00316.54
7.3.290.0070.00916.67
7.3.280.0080.01316.61
7.3.260.0060.01216.93
7.3.240.0060.01116.75
7.3.230.0090.00916.60
7.3.210.0070.01417.04
7.3.200.0130.00316.91
7.3.190.0120.00616.88
7.3.180.0120.01216.85
7.3.170.0150.00616.72
7.3.160.0120.00616.68
7.3.150.0120.00916.77
7.3.140.0070.01116.59
7.3.130.0030.01616.81
7.3.120.0130.00616.66
7.3.110.0110.00716.73
7.3.100.0120.00916.89
7.3.90.0040.01316.50
7.3.80.0030.01616.45
7.3.70.0110.01116.74
7.3.60.0060.01216.71
7.3.50.0070.01316.68
7.3.40.0070.01016.67
7.3.30.0040.01416.72
7.3.20.0070.01316.64
7.3.10.0140.00716.72
7.3.00.0110.00716.63
7.2.330.0140.00716.89
7.2.320.0030.01517.17
7.2.310.0140.00616.96
7.2.300.0100.01416.92
7.2.290.0060.01817.04
7.2.280.0000.02316.95
7.2.270.0120.00616.89
7.2.260.0050.01616.91
7.2.250.0060.01317.05
7.2.240.0080.01116.92
7.2.230.0100.01317.06
7.2.220.0090.01017.08
7.2.210.0120.00616.87
7.2.200.0060.01216.89
7.2.190.0120.00916.93
7.2.180.0130.00516.96
7.2.170.0000.01916.78
7.2.160.0120.00616.96
7.2.150.0100.01016.96
7.2.140.0050.01417.04
7.2.130.0090.01017.05
7.2.120.0100.01017.06
7.2.110.0050.01416.89
7.2.100.0110.00716.98
7.2.90.0100.00716.87
7.2.80.0130.00916.92
7.2.70.0160.00517.03
7.2.60.0030.02116.75
7.2.50.0140.00317.01
7.2.40.0120.00916.99
7.2.30.0100.01016.91
7.2.20.0090.00917.00
7.2.10.0240.00617.04
7.2.00.0050.01416.94

preferences:
102.48 ms | 1504 KiB | 5 Q