3v4l.org

run code in 300+ PHP versions simultaneously
<?php $html = <<<HTML <div class="d-xl-none"> <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbar-top-menu"> <i class="icon-grid3"></i> </button> </div> <div class='class_1'> <span>test</span> </div> HTML; $xml = simplexml_load_string("<root>{$html}</root>"); echo $xml->xpath('//div[@class="d-xl-none"]/*')[0]->asXML(); echo PHP_EOL, '===========================', PHP_EOL; echo $xml->xpath('//div[@class="class_1"]/*')[0]->asXML();

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.0120.00418.55
8.3.50.0120.00418.39
8.3.40.0140.00020.79
8.3.30.0120.00319.10
8.3.20.0030.00621.33
8.3.10.0030.00520.56
8.3.00.0000.00721.08
8.2.180.0070.00716.88
8.2.170.0090.00619.32
8.2.160.0000.01422.96
8.2.150.0000.00824.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0060.00321.08
8.2.110.0060.00322.63
8.2.100.0100.00318.22
8.2.90.0000.00819.63
8.2.80.0080.00018.00
8.2.70.0080.00017.88
8.2.60.0050.00318.54
8.2.50.0060.00318.13
8.2.40.0060.00318.85
8.2.30.0040.00718.55
8.2.20.0000.00818.48
8.2.10.0030.00619.61
8.2.00.0000.00719.73
8.1.280.0100.00725.92
8.1.270.0140.00722.90
8.1.260.0080.00026.35
8.1.250.0120.00328.09
8.1.240.0060.00621.07
8.1.230.0090.00321.34
8.1.220.0050.00318.04
8.1.210.0050.00318.77
8.1.200.0060.00317.60
8.1.190.0030.00517.48
8.1.180.0080.00018.10
8.1.170.0080.00019.02
8.1.160.0040.00419.10
8.1.150.0040.00419.14
8.1.140.0070.00019.23
8.1.130.0030.00320.38
8.1.120.0080.00017.88
8.1.110.0000.00817.67
8.1.100.0040.00417.85
8.1.90.0040.00417.71
8.1.80.0030.00617.63
8.1.70.0000.00717.65
8.1.60.0040.00417.99
8.1.50.0040.00817.66
8.1.40.0030.00617.88
8.1.30.0000.00817.91
8.1.20.0030.00618.07
8.1.10.0040.00417.84
8.1.00.0000.00817.73
8.0.300.0000.00818.77
8.0.290.0040.00417.13
8.0.280.0050.00218.80
8.0.270.0030.00318.48
8.0.260.0030.00320.43
8.0.250.0030.00317.47
8.0.240.0040.00417.38
8.0.230.0030.00317.41
8.0.220.0070.00017.31
8.0.210.0000.00717.39
8.0.200.0030.00317.40
8.0.190.0000.00717.49
8.0.180.0040.00417.18
8.0.170.0000.00917.24
8.0.160.0000.00817.39
8.0.150.0000.00717.31
8.0.140.0050.00217.39
8.0.130.0000.00613.86
8.0.120.0060.00317.13
8.0.110.0070.00017.10
8.0.100.0070.00017.23
8.0.90.0000.00917.32
8.0.80.0040.01117.30
8.0.70.0000.00717.38
8.0.60.0000.00717.37
8.0.50.0070.00017.25
8.0.30.0110.00717.47
8.0.20.0060.01417.46
8.0.10.0040.00417.18
8.0.00.0060.01216.98
7.4.330.0030.00315.55
7.4.320.0000.00716.97
7.4.300.0030.00316.87
7.4.290.0030.00616.95
7.4.280.0030.00616.99
7.4.270.0030.00316.95
7.4.260.0070.00013.61
7.4.250.0030.00616.92
7.4.240.0020.00516.82
7.4.230.0030.00317.02
7.4.220.0060.00116.80
7.4.210.0080.00716.94
7.4.200.0030.00316.96
7.4.130.0150.00716.97
7.4.120.0060.01216.96
7.4.110.0070.01016.86
7.4.100.0130.00316.73
7.4.90.0150.00316.84
7.4.80.0090.00919.39
7.4.70.0100.00716.93
7.4.60.0070.01116.78
7.4.50.0040.00816.87
7.4.40.0100.00717.01
7.4.30.0050.01116.76
7.4.20.0080.01016.63
7.4.10.0110.00516.84
7.4.00.0130.00316.97
7.3.330.0000.00716.71
7.3.320.0060.00013.55
7.3.310.0020.00516.41
7.3.300.0050.00216.58
7.3.290.0050.01416.63
7.3.280.0060.01216.75
7.3.260.0180.00016.93
7.3.240.0070.01216.81
7.3.230.0030.01516.62
7.3.210.0030.01316.78
7.3.200.0090.01216.70
7.3.190.0100.00616.74
7.3.180.0060.01116.64
7.3.170.0130.01016.88
7.3.160.0000.01616.77
7.3.150.0030.01216.69
7.3.140.0070.00716.71
7.3.130.0090.00616.74
7.3.120.0050.01316.67
7.3.110.0070.01316.55
7.3.100.0130.01016.69
7.3.90.0050.01416.69
7.3.80.0080.00816.84
7.3.70.0060.01216.73
7.3.60.0080.01116.67
7.3.50.0090.00916.72
7.3.40.0070.01216.69
7.3.30.0070.01116.75
7.3.20.0050.01217.53
7.3.10.0130.00417.61
7.3.00.0110.00617.69
7.2.330.0130.00616.75
7.2.320.0090.00916.85
7.2.310.0180.00017.10
7.2.300.0130.01016.99
7.2.290.0120.00617.15
7.2.280.0100.00616.66
7.2.270.0050.01116.86
7.2.260.0130.00316.76
7.2.250.0080.00916.75
7.2.240.0130.01216.96
7.2.230.0130.00817.05
7.2.220.0070.01216.96
7.2.210.0080.01117.08
7.2.200.0110.00816.96
7.2.190.0090.01016.95
7.2.180.0070.01317.00
7.2.170.0090.00916.92
7.2.160.0050.01216.89
7.2.150.0050.01317.67
7.2.140.0080.00917.91
7.2.130.0090.01018.00
7.2.120.0070.01017.90
7.2.110.0040.01317.82
7.2.100.0100.00817.71
7.2.90.0150.00517.78
7.2.80.0080.01217.72
7.2.70.0090.01117.82
7.2.60.0080.01218.05
7.2.50.0090.01117.70
7.2.40.0050.01217.76
7.2.30.0100.00617.88
7.2.20.0120.00517.83
7.2.10.0120.00517.72
7.2.00.0140.00317.65

preferences:
61.45 ms | 401 KiB | 5 Q