3v4l.org

run code in 500+ PHP versions simultaneously
<?php $html = "<span data-img-type='cvr' data-img-att-alt='Cover of Greek Mythology' data-img-size-xs='image.jpg'></span> <h3> Cover of Greek Mythology </h3>"; $scriptDocument = new DOMDocument(); libxml_use_internal_errors(TRUE); if (!empty($html)){ $scriptDocument->loadHTML($html); libxml_clear_errors(); $scriptDOMXPath = new DOMXPath($scriptDocument); //get all the h3's with an class $scriptRow = $scriptDOMXPath->query('//h3'); //check if ($scriptRow->length > 0){ foreach($scriptRow as $row){ echo $row->nodeValue . "<br/>"; } } }

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.0130.01219.91
8.5.20.0120.00719.95
8.5.10.0130.00517.08
8.5.00.0160.00620.37
8.4.180.0150.00819.93
8.4.170.0170.00624.25
8.4.160.0100.01223.39
8.4.150.0060.00617.05
8.4.140.0130.00717.95
8.4.130.0130.00718.07
8.4.120.0110.00920.96
8.4.110.0120.00819.33
8.4.100.0140.00717.93
8.4.90.0120.00918.37
8.4.80.0070.00918.09
8.4.70.0110.00918.14
8.4.60.0100.00619.20
8.4.50.0120.00720.95
8.4.40.0100.01017.98
8.4.30.0100.00617.95
8.4.20.0160.00320.82
8.4.10.0070.01318.01
8.3.300.0120.00821.14
8.3.290.0110.01020.88
8.3.280.0100.01120.68
8.3.270.0130.00616.90
8.3.260.0120.00716.91
8.3.250.0100.00819.36
8.3.240.0060.01016.97
8.3.230.0160.00416.94
8.3.220.0070.01119.16
8.3.210.0140.00517.00
8.3.200.0040.00516.96
8.3.190.0070.00417.32
8.3.180.0030.00519.35
8.3.170.0080.00816.84
8.3.160.0110.00717.32
8.3.150.0150.00319.23
8.3.140.0110.00421.18
8.3.130.0160.00318.60
8.3.120.0000.00821.10
8.3.110.0000.00920.94
8.3.100.0060.00324.06
8.3.90.0080.00026.77
8.3.80.0070.00318.55
8.3.70.0120.00316.89
8.3.60.0160.00318.56
8.3.50.0120.00618.26
8.3.40.0090.00919.08
8.3.30.0070.01018.97
8.3.20.0060.00318.75
8.3.10.0050.00324.08
8.3.00.0040.00422.27
8.2.300.0130.00820.65
8.2.290.0120.00720.90
8.2.280.0080.00618.80
8.2.270.0100.01017.26
8.2.260.0030.00617.09
8.2.250.0000.00818.89
8.2.240.0090.00017.41
8.2.230.0040.00422.58
8.2.220.0070.00337.54
8.2.210.0030.00626.77
8.2.200.0000.00918.88
8.2.190.0070.00717.06
8.2.180.0170.00318.85
8.2.170.0060.00919.37
8.2.160.0100.00320.60
8.2.150.0030.00524.18
8.2.140.0060.00324.66
8.2.130.0080.00022.71
8.2.120.0000.00826.35
8.2.110.0000.01820.07
8.2.100.0070.00418.09
8.2.90.0000.00818.00
8.2.80.0060.00319.16
8.2.70.0080.00017.88
8.2.60.0030.00518.00
8.2.50.0040.00417.88
8.2.40.0030.00719.73
8.2.30.0050.00321.11
8.2.20.0040.00418.34
8.2.10.0040.00418.52
8.2.00.0000.00818.52
8.1.340.0100.01017.71
8.1.330.0070.01217.14
8.1.320.0060.00616.77
8.1.310.0070.01017.04
8.1.300.0120.00618.21
8.1.290.0040.00430.84
8.1.280.0100.01025.92
8.1.270.0080.00020.59
8.1.260.0040.00426.35
8.1.250.0000.00928.09
8.1.240.0060.00322.43
8.1.230.0090.00323.00
8.1.220.0000.00817.86
8.1.210.0050.00318.77
8.1.200.0040.00417.60
8.1.190.0080.00017.60
8.1.180.0040.00418.10
8.1.170.0030.00617.72
8.1.160.0000.00719.26
8.1.150.0040.00419.32
8.1.140.0070.00019.23
8.1.130.0000.00722.41
8.1.120.0000.00717.77
8.1.110.0040.00417.80
8.1.100.0030.00517.72
8.1.90.0030.00517.86
8.1.80.0000.00917.74
8.1.70.0060.00317.75
8.1.60.0040.00418.02
8.1.50.0060.00617.80
8.1.40.0040.00417.81
8.1.30.0040.00418.02
8.1.20.0040.00417.95
8.1.10.0000.00818.00
8.1.00.0040.00417.91
8.0.300.0040.00418.77
8.0.290.0050.00517.13
8.0.280.0000.00818.77
8.0.270.0030.00317.57
8.0.260.0030.00318.78
8.0.250.0060.00317.29
8.0.240.0030.00717.35
8.0.230.0080.00017.25
8.0.220.0000.00817.17
8.0.210.0000.00717.30
8.0.200.0030.00317.23
8.0.190.0000.00717.31
8.0.180.0000.00717.20
8.0.170.0040.00417.29
8.0.160.0000.00817.12
8.0.150.0040.00417.24
8.0.140.0070.00017.16
8.0.130.0050.00013.71
8.0.120.0040.00417.09
8.0.110.0020.00517.15
8.0.100.0000.00817.29
8.0.90.0000.00717.26
8.0.80.0090.00617.28
8.0.70.0040.00417.22
8.0.60.0040.00417.23
8.0.50.0000.00717.04
8.0.30.0120.00717.50
8.0.20.0120.01217.40
8.0.10.0040.00417.42
8.0.00.0110.00817.44
7.4.330.0000.00515.55
7.4.320.0030.00316.73
7.4.300.0000.00716.91
7.4.290.0030.00316.89
7.4.280.0000.01016.97
7.4.270.0040.00416.78
7.4.260.0030.00316.88
7.4.250.0040.00416.92
7.4.240.0040.00416.83
7.4.230.0070.00016.88
7.4.220.0080.00016.66
7.4.210.0050.01216.82
7.4.200.0050.00316.93
7.4.160.0080.01216.74
7.4.140.0110.00717.86
7.4.130.0080.01316.73
7.4.120.0060.01216.90
7.4.110.0070.01016.84
7.4.100.0100.00716.74
7.4.90.0120.00916.72
7.4.80.0030.01419.39
7.4.70.0180.00316.73
7.4.60.0040.01416.88
7.4.50.0080.00716.82
7.4.40.0060.01616.68
7.4.00.0110.00415.07
7.3.330.0000.00513.48
7.3.320.0000.00513.40
7.3.310.0070.00016.55
7.3.300.0040.00416.59
7.3.290.0030.00316.64
7.3.280.0010.01416.59
7.3.260.0130.00916.72
7.3.240.0100.00716.80
7.3.230.0030.01616.73
7.3.210.0120.00616.64
7.3.200.0140.00416.73
7.3.190.0130.01016.71
7.3.180.0030.01316.88
7.3.170.0030.01416.89
7.3.160.0090.01216.82
7.2.330.0180.00717.00
7.2.320.0130.00316.79
7.2.310.0090.00917.13
7.2.300.0100.00716.96
7.2.290.0080.00817.02
7.2.100.3580.01315.06
7.2.90.2730.01014.91
7.2.80.2250.00714.92
7.2.70.2410.01015.09
7.2.60.2060.01315.32
7.2.50.2190.01015.19
7.2.40.2850.00015.08
7.2.30.1950.00715.23
7.2.20.1890.01015.38
7.2.10.1930.00715.21
7.2.00.1980.00715.16
7.1.220.4890.01014.26
7.1.210.2490.01213.98
7.1.200.2870.00614.20
7.1.190.2330.00714.16
7.1.180.2300.01013.97
7.1.170.2230.00314.11
7.1.160.2560.01014.07
7.1.150.1840.01313.90
7.1.140.1880.00614.05
7.1.130.1900.01013.88
7.1.120.1930.00313.86
7.1.110.2520.01014.04
7.1.100.1810.00714.09
7.1.90.2820.00713.93
7.1.80.2050.00713.93
7.1.70.2470.00314.05
7.1.60.2290.00632.04
7.1.50.4900.01631.69
7.1.40.3880.00731.65
7.1.30.3390.00732.10
7.1.20.3670.01031.55
7.1.10.3560.00314.04
7.1.00.3090.01013.91
5.6.380.0180.00314.44

preferences:
59.96 ms | 1435 KiB | 5 Q