3v4l.org

run code in 300+ PHP versions simultaneously
<?php $html = ' <html><head></head><body> <div class="single-post-image" style="background-image:url(https://www.mmowg.net/wp-content/uploads/2020/11/a8Tnv1kVyXY.jpg)"></div> <div class="single-post-image" style="background-image: url(https://www.mmowg.net/wp-content/uploads/2020/11/a8Tnv1kVyXY.jpg )"></div> <div class="single-post-image" style="background-image: url( https://www.mmowg.net/wp-content/uploads/2020/11/a8Tnv1kVyXY.jpg)"></div> <div class="single-post-image" style="background-image: url(\'https://www.mmowg.net/wp-content/uploads/2020/11/a8Tnv1kVyXY.jpg\')"></div> <div class="single-post-image"></div> </body> </html>'; $dom = new DOMDocument(); libxml_use_internal_errors(true); $dom->loadHTML($html); libxml_clear_errors(); $xpath = new DomXPath($dom); $images = []; foreach ($xpath->query("//*[contains(@class, 'single-post-image')]") as $img) { if ($img->hasAttribute('style')) { preg_match('/url\((.*)\)/', $img->getAttribute('style'), $match); if (isset($match[1])) $images[] = trim($match[1], '\'" '); } } print_r($images);

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.4.130.0090.01318.42
8.4.120.0080.01224.34
8.4.110.0130.00822.68
8.4.100.0100.01218.38
8.4.90.0130.00822.72
8.4.80.0080.01219.39
8.4.70.0100.00918.36
8.4.60.0090.00419.19
8.4.50.0110.01118.21
8.4.40.0060.00319.05
8.4.30.0100.01020.85
8.4.20.0160.00318.23
8.4.10.0100.01019.89
8.3.260.0150.00417.05
8.3.250.0140.00519.18
8.3.240.0110.00817.74
8.3.230.0120.00716.96
8.3.220.0120.00719.23
8.3.210.0090.01017.03
8.3.200.0120.00716.94
8.3.190.0040.00617.67
8.3.180.0100.00817.27
8.3.170.0030.00617.69
8.3.160.0110.00717.30
8.3.150.0110.00719.32
8.3.140.0050.00317.29
8.3.130.0030.00618.84
8.3.120.0060.00320.98
8.3.110.0070.00320.94
8.3.100.0140.00624.06
8.3.90.0150.00026.77
8.3.80.0030.00619.05
8.3.70.0090.00717.21
8.3.60.0230.00718.12
8.3.50.0110.00820.95
8.3.40.0210.00619.84
8.3.30.0210.00718.96
8.3.20.0170.00720.01
8.3.10.0160.00820.10
8.3.00.0210.00420.67
8.2.290.0130.00717.18
8.2.280.0140.00522.59
8.2.270.0090.00917.12
8.2.260.0150.00319.36
8.2.250.0080.01217.71
8.2.240.0150.00019.10
8.2.230.0060.00322.58
8.2.220.0040.00437.54
8.2.210.0040.00426.77
8.2.200.0060.00618.78
8.2.190.0270.00617.06
8.2.180.0160.01019.85
8.2.170.0180.01118.29
8.2.160.0270.00219.64
8.2.150.0200.00620.54
8.2.140.0190.00720.10
8.2.130.0190.00820.62
8.2.120.0270.00318.71
8.2.110.0230.00418.88
8.2.100.0210.00917.92
8.2.90.0250.00418.94
8.2.80.0190.00818.05
8.2.70.0220.00533.38
8.2.60.0170.00933.48
8.2.50.0200.00333.35
8.2.40.0150.00734.69
8.2.30.0150.00733.65
8.2.20.0180.00533.32
8.2.10.0170.00533.67
8.2.00.0180.00533.75
8.1.330.0090.01022.60
8.1.320.0130.00716.66
8.1.310.0120.00618.94
8.1.300.0040.01520.39
8.1.290.0040.00430.84
8.1.280.0220.00620.29
8.1.270.0230.00520.05
8.1.260.0210.00520.49
8.1.250.0230.00521.15
8.1.240.0210.00519.90
8.1.230.0170.00718.97
8.1.220.0190.00617.75
8.1.210.0180.00618.18
8.1.200.0180.00433.11
8.1.190.0140.00833.04
8.1.180.0160.00633.04
8.1.170.0190.00533.41
8.1.160.0200.00533.44
8.1.150.0170.00733.41
8.1.140.0200.00633.35
8.1.130.0170.00933.25
8.1.120.0160.00730.73
8.1.110.0150.00630.32
8.1.100.0180.00530.33
8.1.90.0140.00630.40
8.1.80.0140.00730.36
8.1.70.0170.00430.38
8.1.60.0130.00930.46
8.1.50.0150.00630.39
8.1.40.0170.00530.41
8.1.30.0200.00430.41
8.1.20.0220.00530.53
8.1.10.0200.00530.36
8.1.00.0170.00830.38
8.0.300.0280.00618.14
8.0.290.0190.00632.58
8.0.280.0150.00832.93
8.0.270.0160.00532.59
8.0.260.0180.00532.56
8.0.250.0130.00929.83
8.0.240.0140.00729.81
8.0.230.0140.00729.81
8.0.220.0160.00729.81
8.0.210.0160.00529.77
8.0.200.0160.00529.80
8.0.190.0140.00629.76
8.0.180.0140.00729.83
8.0.170.0120.00729.82
8.0.160.0150.00529.85
8.0.150.0170.00629.81
8.0.140.0200.00429.76
8.0.130.0130.00729.49
8.0.120.0140.00629.78
8.0.110.0160.00529.83
8.0.100.0140.00629.76
8.0.90.0140.00729.75
8.0.80.0140.00827.76
8.0.70.0160.00429.74
8.0.60.0110.00829.82
8.0.50.0140.00729.84
8.0.30.0150.00729.94
8.0.20.0150.00627.80
8.0.10.0160.00529.85
8.0.00.0180.00629.85
7.4.330.0140.00528.46
7.4.320.0170.00329.61
7.4.300.0140.00529.57
7.4.290.0170.00329.48
7.4.280.0150.00529.61
7.4.270.0180.00229.68
7.4.260.0180.00429.60
7.4.250.0170.00329.60
7.4.240.0190.00229.54
7.4.230.0140.00729.54
7.4.220.0120.00427.37
7.4.210.0120.00824.79
7.4.200.0130.00529.64
7.4.190.0190.00433.20
7.4.180.0190.00832.67
7.4.160.0180.00432.72
7.4.150.0180.00632.84
7.4.140.0180.00432.61
7.4.130.0150.00527.49
7.4.120.0110.00929.61
7.4.110.0140.00729.53
7.4.100.0130.00629.59
7.4.90.0150.00629.54
7.4.80.0140.00629.52
7.4.70.0150.00729.46
7.4.60.0150.00529.54
7.4.50.0130.00829.46
7.4.40.0140.00629.50
7.4.30.0160.00729.50
7.4.20.0150.00629.43
7.4.10.0140.00829.52
7.4.00.0140.00629.86
7.3.330.0140.00329.45
7.3.320.0130.00528.79
7.3.310.0120.00729.42
7.3.300.0130.00529.36
7.3.290.0150.00625.73
7.3.280.0200.00432.50
7.3.270.0210.00332.56
7.3.260.0160.00729.74
7.3.250.0170.00532.47
7.3.240.0160.00529.28
7.3.230.0150.00529.33
7.3.220.0180.00629.32
7.3.210.0170.00729.26
7.3.200.0130.01029.38
7.3.190.0120.01029.28
7.3.180.0150.00629.36
7.3.170.0180.00429.29
7.3.160.0150.00829.33
7.3.150.0150.01229.32
7.3.140.0150.00529.37
7.3.130.0170.00529.26
7.3.120.0190.00529.31
7.3.110.0160.00529.36
7.3.100.0150.00529.30
7.3.90.0160.00529.58
7.3.80.0150.00829.41
7.3.70.0160.00629.36
7.3.60.0150.00729.45
7.3.50.0130.00829.50
7.3.40.0140.00729.44
7.3.30.0190.00329.41
7.3.20.0190.00430.59
7.3.10.0160.00630.42
7.3.00.0140.01030.45
7.2.340.0120.00830.00
7.2.330.0170.00529.58
7.2.320.0170.00529.95
7.2.310.0160.00429.66
7.2.300.0140.00729.58
7.2.290.0170.00529.65
7.2.280.0170.00729.57
7.2.270.0130.00929.58
7.2.260.0140.00829.57
7.2.250.0180.00429.66
7.2.240.0140.00929.61
7.2.230.0150.00629.61
7.2.220.0150.00629.64
7.2.210.0170.00729.61
7.2.200.0180.00629.57
7.2.190.0150.00829.60
7.2.180.0160.00829.57
7.2.170.0190.00529.69
7.2.160.0150.00829.63
7.2.150.0170.00630.73
7.2.140.0140.01030.73
7.2.130.0150.00930.87
7.2.120.0190.00530.79
7.2.110.0160.00830.69
7.2.100.0130.01030.69
7.2.90.0190.00630.79
7.2.80.0160.00730.81
7.2.70.0140.00930.83
7.2.60.0190.00630.75
7.2.50.0160.00630.71
7.2.40.0160.00830.73
7.2.30.0180.00530.81
7.2.20.0160.00730.72
7.2.10.0150.00730.79
7.2.00.0170.00530.72

preferences:
29.31 ms | 403 KiB | 5 Q