3v4l.org

run code in 300+ PHP versions simultaneously
<?php $content = 'foo bar baz <img src="http://ak-hdl.buzzfed.com/static/2014-06/6/12/enhanced/webdr08/enhanced-21313-1402070821-11.jpg" width="500" height="1000"/> dragons and ponies.'; $dom = new \DOMDocument( '1.0' ); $dom->loadHTML( $content ); for ( $i = 0; $i < 1000; $i++ ) { // \DOMNodesList $nodes = $dom->getElementsByTagName( 'img' ); if ( $nodes->length ) { $img = $nodes->item(0); $src = $img->getAttribute( 'src' ); $width = $img->getAttribute( 'width' ); $height = $img->getAttribute( 'height' ); } }

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.120.0080.00520.72
8.4.110.0120.01022.63
8.4.100.0160.00617.61
8.4.90.0120.00818.84
8.4.80.0050.00417.79
8.4.70.0110.00518.13
8.4.60.0130.00918.79
8.4.50.0120.00918.76
8.4.40.0070.01420.45
8.4.30.0080.00817.90
8.4.20.0060.01517.92
8.4.10.0060.00317.75
8.3.250.0050.00419.11
8.3.240.0170.00416.81
8.3.230.0090.01016.41
8.3.220.0120.00719.20
8.3.210.0080.01016.57
8.3.200.0050.00416.79
8.3.190.0050.00317.49
8.3.180.0110.00816.81
8.3.170.0030.01717.24
8.3.160.0130.00620.43
8.3.150.0130.00616.61
8.3.140.0120.00817.49
8.3.130.0060.00318.63
8.3.120.0080.00518.99
8.3.110.0030.00720.94
8.3.100.0030.00624.06
8.3.90.0040.00426.77
8.3.80.0000.00917.97
8.3.70.0060.01018.40
8.3.60.0160.00316.88
8.3.50.0110.00822.17
8.3.40.0060.01018.96
8.3.30.0130.00318.79
8.3.20.0000.00820.43
8.3.10.0000.00923.91
8.3.00.0050.00319.38
8.2.290.0100.00620.74
8.2.280.0090.00918.49
8.2.270.0060.01317.52
8.2.260.0030.00616.98
8.2.250.0100.01016.92
8.2.240.0100.01017.70
8.2.230.0000.00922.58
8.2.220.0160.00637.54
8.2.210.0090.00626.77
8.2.200.0060.00316.88
8.2.190.0190.00318.79
8.2.180.0000.01918.51
8.2.170.0080.00822.96
8.2.160.0040.01120.63
8.2.150.0030.00624.18
8.2.140.0040.00424.66
8.2.130.0040.00420.75
8.2.120.0040.00426.35
8.2.110.0060.00322.30
8.2.100.0030.00918.03
8.2.90.0080.00019.33
8.2.80.0040.00417.97
8.2.70.0060.00317.63
8.2.60.0050.01017.78
8.2.50.0040.01017.78
8.2.40.0070.00518.63
8.2.30.0070.00619.18
8.2.20.0110.00417.77
8.2.10.0080.00418.00
8.2.00.0090.00417.94
8.1.330.0090.00923.92
8.1.320.0120.00716.51
8.1.310.0060.00318.96
8.1.300.0060.00318.16
8.1.290.0060.00330.84
8.1.280.0090.00625.92
8.1.270.0000.01024.07
8.1.260.0040.00428.09
8.1.250.0000.00828.09
8.1.240.0100.00322.04
8.1.230.0060.00622.88
8.1.220.0060.00317.79
8.1.210.0030.00618.77
8.1.200.0000.01017.48
8.1.190.0070.00517.38
8.1.180.0070.00617.67
8.1.170.0060.00718.21
8.1.160.0130.00019.85
8.1.150.0070.00618.15
8.1.140.0110.00318.49
8.1.130.0060.00817.71
8.1.120.0060.00617.46
8.1.110.0060.00617.50
8.1.100.0030.01017.58
8.1.90.0080.00417.45
8.1.80.0080.00517.62
8.1.70.0060.00517.41
8.1.60.0080.00517.65
8.1.50.0100.00317.66
8.1.40.0110.00617.66
8.1.30.0100.00617.72
8.1.20.0050.00917.65
8.1.10.0080.00517.66
8.1.00.0110.00317.50
8.0.300.0000.00818.77
8.0.290.0000.00816.88
8.0.280.0110.00217.66
8.0.270.0080.00517.03
8.0.260.0060.00717.06
8.0.250.0090.00417.00
8.0.240.0030.00916.90
8.0.230.0070.00616.89
8.0.220.0060.00716.89
8.0.210.0100.00216.94
8.0.200.0090.00316.82
8.0.190.0060.00616.79
8.0.180.0060.00616.92
8.0.170.0080.00417.07
8.0.160.0070.00616.91
8.0.150.0040.00916.86
8.0.140.0060.00616.85
8.0.130.0090.00315.10
8.0.120.0110.00316.83
8.0.110.0080.00516.84
8.0.100.0060.00616.83
8.0.90.0070.00516.96
8.0.80.0090.01016.98
8.0.70.0160.00616.92
8.0.60.0120.00816.89
8.0.50.0110.01116.88
8.0.30.0120.01017.08
8.0.20.0120.01017.14
8.0.10.0150.00817.09
8.0.00.0120.01117.12
7.4.330.0070.00316.76
7.4.320.0100.00216.54
7.4.300.0080.00616.54
7.4.290.0030.00916.61
7.4.280.0090.00416.61
7.4.270.0080.00516.56
7.4.260.0100.00416.54
7.4.250.0060.00415.01
7.4.240.0030.00816.67
7.4.230.0060.00616.65
7.4.220.0140.00716.56
7.4.210.0070.00916.70
7.4.200.0150.00616.70
7.4.190.0140.00716.70
7.4.180.0130.00916.71
7.4.160.0110.00916.64
7.4.150.0130.00716.84
7.4.140.0100.01017.00
7.4.130.0130.00716.60
7.4.120.0080.01216.66
7.4.110.0110.01016.67
7.4.100.0140.00916.67
7.4.90.0120.00916.64
7.4.80.0120.00917.16
7.4.70.0150.00716.63
7.4.60.0170.00716.61
7.4.50.0120.00916.54
7.4.40.0110.00916.57
7.4.30.0110.01016.61
7.4.20.0130.00916.62
7.4.10.0120.00816.52
7.4.00.0070.01216.11
7.3.330.0040.00814.90
7.3.320.0070.00414.92
7.3.310.0090.00316.52
7.3.300.0070.00516.41
7.3.290.0140.00616.47
7.3.280.0090.01216.47
7.3.270.0190.00516.69
7.3.260.0140.00616.48
7.3.250.0120.00816.50
7.3.240.0120.01016.54
7.3.230.0130.01016.55
7.3.220.0130.01016.49
7.3.210.0150.00716.43
7.3.200.0110.01116.44
7.3.190.0140.00716.50
7.3.180.0120.00916.49
7.3.170.0120.01016.49
7.3.160.0140.00816.42
7.3.150.0170.00716.46
7.3.140.0120.00816.41
7.3.130.0110.01016.48
7.3.120.0100.01116.04
7.3.110.0120.00915.94
7.3.100.0100.01116.03
7.3.90.0150.00816.13
7.3.80.0130.00916.01
7.3.70.0120.00916.05
7.3.60.0120.00816.11
7.3.50.0100.01115.92
7.3.40.0110.01216.00
7.3.30.0120.00815.74
7.3.20.0220.00816.47
7.3.10.0160.01016.46
7.3.00.0150.01016.47
7.2.340.0080.01316.51
7.2.330.0110.01116.56
7.2.320.0140.01016.68
7.2.310.0100.01216.59
7.2.300.0160.01016.61
7.2.290.0140.01016.63
7.2.280.0190.00816.51
7.2.270.0160.01016.55
7.2.260.0180.00816.60
7.2.250.0140.00916.07
7.2.240.0120.01216.06
7.2.230.0100.01116.37
7.2.220.0140.00816.17
7.2.210.0130.01316.18
7.2.200.0130.01016.25
7.2.190.0140.00916.12
7.2.180.0120.01115.97
7.2.170.0130.01016.06
7.2.160.0120.01016.08
7.2.150.0250.01116.41
7.2.140.0290.00716.42
7.2.130.0210.00816.67
7.2.120.0200.00916.66
7.2.110.0170.01016.63
7.2.100.0180.01016.59
7.2.90.0250.01116.60
7.2.80.0240.00916.62
7.2.70.0190.01116.62
7.2.60.0220.00816.57
7.2.50.0190.01016.60
7.2.40.0560.00916.82
7.2.30.0420.01116.89
7.2.20.0380.01116.84
7.2.10.0400.01116.85
7.2.00.0390.01017.05
7.1.330.0140.01015.83
7.1.320.0180.00915.88
7.1.310.0130.00915.95
7.1.300.0080.01515.87
7.1.290.0130.01115.86
7.1.280.0120.01215.80
7.1.270.0200.00815.63
7.1.260.0180.00915.62
7.1.250.0200.00815.64
7.1.240.0260.01115.55
7.1.230.0240.00915.53
7.1.220.0170.01215.62
7.1.210.0290.01015.67
7.1.200.0230.00715.64
7.1.190.0300.00915.70
7.1.180.0240.00715.62
7.1.170.0290.00815.63
7.1.160.0470.01115.89
7.1.150.0390.00915.85
7.1.140.0450.00815.84
7.1.130.0400.00815.87
7.1.120.0550.00815.85
7.1.110.0520.00915.69
7.1.100.0460.01115.75
7.1.90.0540.00915.66
7.1.80.0520.01015.74
7.1.70.0440.00915.66
7.1.60.0460.01119.08
7.1.50.0680.01220.54
7.1.40.0480.00919.13
7.1.30.0440.01119.06
7.1.20.0340.01119.02
7.1.10.0360.01215.48
7.1.00.0360.01416.03
7.0.330.0240.00715.41
7.0.320.0240.00715.36
7.0.310.0250.00715.37
7.0.300.0230.00615.41
7.0.290.0550.01015.60
7.0.280.0250.00615.31
7.0.270.0450.01115.57
7.0.260.0470.01215.61
7.0.250.0440.01115.53
7.0.240.0420.01015.55
7.0.230.0580.00815.57
7.0.220.0560.00915.50
7.0.210.0440.01015.25
7.0.200.0500.00815.48
7.0.190.0450.01015.31
7.0.180.0400.01015.22
7.0.170.0400.00915.20
7.0.160.0390.01015.30
7.0.150.0380.01015.24
7.0.140.0480.01015.23
7.0.130.0350.01115.29
7.0.120.0400.01115.37
7.0.110.0310.00815.23
7.0.100.0240.01015.23
7.0.90.0310.00815.21
7.0.80.0270.00915.21
7.0.70.0250.00915.18
7.0.60.0280.01715.67
7.0.50.0400.01315.46
7.0.40.0460.01715.54
7.0.30.0310.01715.54
7.0.20.0330.01115.56
7.0.10.0270.01415.52
7.0.00.0230.01415.48
5.6.400.0160.01115.59
5.6.390.0140.01015.66
5.6.380.0100.01315.47
5.6.370.0120.01415.35
5.6.360.0130.01015.43
5.6.350.0130.01315.47
5.6.340.0140.01015.46
5.6.330.0160.00715.50
5.6.320.0140.01115.41
5.6.310.0120.01415.47
5.6.300.0150.02216.45
5.6.290.0140.02116.52
5.6.280.0120.02216.97
5.6.270.0130.02316.53
5.6.260.0140.02116.56
5.6.250.0150.01816.60
5.6.240.0140.02016.54
5.6.230.0140.02116.57
5.6.220.0130.02216.53
5.6.210.0140.02316.87
5.6.200.0160.02216.72
5.6.190.0130.02316.96
5.6.180.0160.02716.89
5.6.170.0120.02816.87
5.6.160.0150.02316.97
5.6.150.0130.02716.68
5.6.140.0130.02216.68
5.6.130.0120.02916.68
5.6.120.0130.02516.98
5.6.110.0130.02216.95
5.6.100.0130.02916.95
5.6.90.0130.02516.90
5.6.80.0100.02916.73
5.6.70.0140.02116.41
5.6.60.0120.02216.46
5.6.50.0120.02316.35
5.6.40.0130.02016.38
5.6.30.0140.01916.37
5.6.20.0160.01716.37
5.6.10.0140.02216.42
5.6.00.0130.02016.37
5.5.380.0140.02015.54
5.5.370.0150.02115.57
5.5.360.0130.02115.49
5.5.350.0150.02616.01
5.5.340.0100.02515.84
5.5.330.0130.02216.10
5.5.320.0120.02316.08
5.5.310.0130.02616.03
5.5.300.0140.02815.91
5.5.290.0150.02815.84
5.5.280.0120.02716.14
5.5.270.0130.02616.13
5.5.260.0150.02916.12
5.5.250.0110.02515.98
5.5.240.0130.02315.93
5.5.230.0140.02215.50
5.5.220.0140.02015.44
5.5.210.0150.02015.54
5.5.200.0120.02015.42
5.5.190.0140.01815.46
5.5.180.0130.02015.43
5.5.170.0110.01314.97
5.5.160.0140.02015.47
5.5.150.0140.02115.45
5.5.140.0160.01715.39
5.5.130.0140.01915.41
5.5.120.0140.02015.41
5.5.110.0120.02115.30
5.5.100.0140.02315.46
5.5.90.0150.02115.48
5.5.80.0140.02015.49
5.5.70.0110.02015.47
5.5.60.0140.02315.42
5.5.50.0160.02115.43
5.5.40.0170.02115.43
5.5.30.0140.02215.48
5.5.20.0140.02215.43
5.5.10.0140.02215.46
5.5.00.0140.02215.46
5.4.450.0090.00316.52
5.4.440.0000.01216.52
5.4.430.0100.00316.52
5.4.420.0090.00516.52
5.4.410.0100.00316.52
5.4.400.0040.00916.52
5.4.390.0100.00316.52
5.4.380.0070.00716.52
5.4.370.0130.00016.52
5.4.360.0080.00516.52
5.4.350.0050.00816.52
5.4.340.0060.00616.52
5.4.330.0120.00016.52
5.4.320.0090.00316.52
5.4.310.0040.00916.52
5.4.300.0100.00316.52
5.4.290.0090.00516.52
5.4.280.0000.01316.52
5.4.270.0090.00316.52
5.4.260.0150.00016.52
5.4.250.0080.00416.52
5.4.240.0060.00616.52
5.4.230.0060.00616.52
5.4.220.0110.00316.52
5.4.210.0110.00416.52
5.4.200.0060.00616.52
5.4.190.0050.01016.52
5.4.180.0050.01016.52
5.4.170.0100.00316.52
5.4.160.0040.00513.13
5.4.150.0100.00316.52
5.4.140.0060.00616.52
5.4.130.0100.00516.52
5.4.120.0140.00016.52
5.4.110.0090.00416.52
5.4.100.0090.00316.52
5.4.90.0080.00416.52
5.4.80.0070.00516.52
5.4.70.0060.00616.52
5.4.60.0110.00316.52
5.4.50.0080.00416.52
5.4.40.0040.00816.52
5.4.30.0070.00716.52
5.4.20.0090.00416.52
5.4.10.0080.00516.52
5.4.00.0070.00716.52
5.3.290.0140.00016.52
5.3.280.0130.00016.52
5.3.270.0120.00316.52
5.3.260.0100.00316.52
5.3.250.0060.00616.52
5.3.240.0070.00716.52
5.3.230.0110.00316.52
5.3.220.0070.00716.52
5.3.210.0130.00316.52
5.3.200.0070.00716.52
5.3.190.0100.00316.52
5.3.180.0090.00416.52
5.3.170.0090.00316.52
5.3.160.0110.00416.52
5.3.150.0070.00716.52
5.3.140.0080.00416.52
5.3.130.0120.00316.52
5.3.120.0090.00316.52
5.3.110.0100.00316.52
5.3.100.0060.00616.52
5.3.90.0080.00616.52
5.3.80.0060.00616.52
5.3.70.0040.00916.52
5.3.60.0090.00416.52
5.3.50.0120.00216.52
5.3.40.0060.00616.52
5.3.30.0070.00516.52
5.3.20.0090.00316.52
5.3.10.0060.00616.52
5.3.00.0080.00416.52
5.2.170.0060.00616.52
5.2.160.0060.00616.52
5.2.150.0040.00716.52
5.2.140.0000.01416.52
5.2.130.0050.00516.52
5.2.120.0080.00316.52
5.2.110.0060.00616.52
5.2.100.0070.00516.52
5.2.90.0060.00416.52
5.2.80.0090.00316.52
5.2.70.0060.00616.52
5.2.60.0050.00516.52
5.2.50.0030.00816.52
5.2.40.0000.01016.52
5.2.30.0000.01216.52
5.2.20.0040.00816.52
5.2.10.0050.00516.52
5.2.00.0060.00616.52
5.1.60.0050.00516.52
5.1.50.0070.00316.52
5.1.40.0000.00916.52
5.1.30.0070.00416.52
5.1.20.0030.00616.52
5.1.10.0060.00316.52
5.1.00.0070.00216.52
5.0.50.0030.00716.52
5.0.40.0050.00516.52
5.0.30.0030.00616.52
5.0.20.0050.00516.52
5.0.10.0100.00016.52
5.0.00.0060.00316.52
4.4.90.0020.00216.52
4.4.80.0000.00316.52
4.4.70.0040.00016.52
4.4.60.0030.00016.52
4.4.50.0000.00416.52
4.4.40.0000.00416.52
4.4.30.0000.00416.52
4.4.20.0040.00016.52
4.4.10.0000.00416.52
4.4.00.0000.00416.52
4.3.110.0040.00016.52
4.3.100.0000.00316.52
4.3.90.0000.00416.52
4.3.80.0030.00016.52
4.3.70.0030.00116.52
4.3.60.0040.00016.52
4.3.50.0030.00016.52
4.3.40.0030.00116.52
4.3.30.0000.00316.52
4.3.20.0000.00316.52
4.3.10.0000.00316.52
4.3.00.0000.00416.52

preferences:
132.12 ms | 403 KiB | 5 Q