3v4l.org

run code in 300+ PHP versions simultaneously
<?php $doc = new DOMDocument; $doc->loadHTML('<html><body></body></html>'); $e = $doc->getElementsByTagname('html')->item(0); echo get_class($e->firstChild); // DOMElement new ReflectionProperty('DOMElement', 'firstChild'); // throws

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.1.130.0000.00720.52
8.1.120.0060.00317.55
8.1.110.0030.00517.49
8.1.100.0040.00417.61
8.1.90.0040.00417.59
8.1.80.0080.00017.63
8.1.70.0030.00317.68
8.1.60.0040.00417.80
8.1.50.0030.00617.63
8.1.40.0040.00417.55
8.1.30.0000.00817.82
8.1.20.0000.00917.64
8.1.10.0040.00417.74
8.1.00.0040.00417.74
8.0.260.0000.00718.69
8.0.250.0070.00017.24
8.0.240.0000.00817.22
8.0.230.0070.00017.12
8.0.220.0040.00417.05
8.0.210.0000.00717.05
8.0.200.0080.00017.23
8.0.190.0030.00517.05
8.0.180.0040.00417.10
8.0.170.0000.00917.11
8.0.160.0040.00417.09
8.0.150.0000.00717.07
8.0.140.0000.00717.07
8.0.130.0030.00313.52
8.0.120.0050.00217.05
8.0.110.0030.00517.12
8.0.100.0000.00717.12
8.0.90.0030.00616.89
8.0.80.0060.00917.04
8.0.70.0000.00717.12
8.0.60.0030.00517.07
8.0.50.0000.00717.21
8.0.30.0130.00817.22
8.0.20.0070.01317.40
8.0.10.0040.00417.00
8.0.00.0080.01116.91
7.4.330.0000.00515.55
7.4.320.0030.00316.78
7.4.300.0060.00016.63
7.4.290.0070.00016.68
7.4.280.0000.00816.75
7.4.270.0000.00716.59
7.4.260.0070.00016.70
7.4.250.0000.00716.78
7.4.240.0070.00016.71
7.4.230.0030.00316.56
7.4.220.0000.00816.48
7.4.210.0110.00616.79
7.4.200.0000.00716.72
7.4.160.0100.00716.87
7.4.140.0160.00417.86
7.4.130.0110.01016.78
7.4.120.0150.00916.73
7.4.110.0170.00616.83
7.4.100.0130.01016.83
7.4.90.0150.00416.81
7.4.80.0120.00619.39
7.4.70.0120.01116.64
7.4.60.0030.01316.70
7.4.50.0030.00617.00
7.4.40.0040.01416.54
7.4.10.0080.01616.63
7.4.00.0090.00615.75
7.3.330.0000.00513.35
7.3.320.0000.00513.31
7.3.310.0000.00816.51
7.3.300.0040.00416.38
7.3.290.0030.00316.49
7.3.280.0070.01216.42
7.3.260.0120.00816.61
7.3.240.0120.00916.52
7.3.230.0120.00916.69
7.3.210.0100.01016.50
7.3.200.0110.00716.76
7.3.190.0060.01516.68
7.3.180.0100.00616.66
7.3.170.0160.00416.44
7.3.160.0070.01116.43
7.3.130.0110.01116.61
7.3.120.0090.01015.65
7.3.110.0110.00915.71
7.3.100.0080.00915.75
7.3.90.0110.01015.84
7.3.80.0130.01015.78
7.3.70.0050.01215.64
7.3.60.0140.00415.63
7.3.50.0050.01515.57
7.3.40.0130.01115.73
7.3.30.0050.01515.67
7.3.20.0640.00516.00
7.3.10.0590.00815.88
7.3.00.0450.00715.85
7.2.330.0070.01116.98
7.2.320.0060.01617.09
7.2.310.0070.01016.68
7.2.300.0060.01216.85
7.2.290.0060.01016.93
7.2.260.0190.00516.63
7.2.250.0140.00916.70
7.2.240.0100.01016.04
7.2.230.0180.00315.88
7.2.220.0090.01015.81
7.2.210.0100.00815.91
7.2.200.0050.01415.89
7.2.190.0100.01415.87
7.2.180.0150.00615.96
7.2.170.0110.00715.87
7.2.160.0080.00815.96
7.2.150.0520.00716.23
7.2.140.0490.01316.18
7.2.130.0460.00416.45
7.2.120.0810.00916.37
7.2.110.0610.00816.39
7.2.100.0460.01016.33
7.2.90.0540.00816.23
7.2.80.0600.00316.34
7.2.70.0550.00816.27
7.2.60.0500.00916.27
7.2.50.0530.01016.24
7.2.40.0490.01116.39
7.2.30.0530.01016.29
7.2.20.0520.00816.14
7.2.10.0600.00816.35
7.2.00.0530.00716.39
7.1.330.0070.01215.79
7.1.320.0090.00715.85
7.1.310.0090.00915.77
7.1.300.0070.01115.71
7.1.290.0130.00615.79
7.1.280.0120.00615.75
7.1.270.0070.01015.69
7.1.260.0130.00615.78
7.1.250.0470.00715.21
7.1.240.0150.00715.72
7.1.230.0140.01015.74
7.1.220.0120.01215.57
7.1.210.0150.00815.59
7.1.200.0240.00015.76
7.1.190.0150.00915.64
7.1.180.0220.00415.70
7.1.170.0160.00715.70
7.1.160.0080.02515.65
7.1.150.0220.00015.79
7.1.140.0230.00515.76
7.1.130.0160.00515.77
7.1.120.0170.00315.80
7.1.110.0110.01515.59
7.1.100.0170.01015.59
7.1.90.0140.00715.67
7.1.80.0260.00415.73
7.1.70.0130.00815.70
7.1.60.0080.01615.83
7.1.50.0690.01015.62
7.1.40.0130.01315.67
7.1.30.0130.01015.80
7.1.20.0150.00915.80
7.1.10.0210.01015.68
7.1.00.0160.00815.56
7.0.330.0120.01215.38
7.0.320.0100.01315.36
7.0.310.0210.00415.57
7.0.300.0170.00915.31
7.0.290.0150.00815.38
7.0.280.0150.00615.25
7.0.270.0110.00815.48
7.0.260.0250.00715.49
7.0.250.0120.00915.44
7.0.240.0070.01415.38
7.0.230.0210.00415.49
7.0.220.0100.01315.36
7.0.210.0140.00515.54
7.0.200.0070.01815.43
7.0.190.0090.01215.33
7.0.180.0160.00315.52
7.0.170.0170.00915.43
7.0.160.0220.00415.54
7.0.150.0150.00815.28
7.0.140.0120.01215.45
7.0.130.0170.00415.34
7.0.120.0210.00315.50
7.0.110.0120.01215.45
7.0.100.0130.00815.49
7.0.90.0160.00615.35
7.0.80.0130.01015.52
7.0.70.0080.01315.37
7.0.60.0210.00615.26
7.0.50.0220.00415.40
7.0.40.0250.00015.48
7.0.30.0070.01415.43
7.0.20.0120.00915.35
7.0.10.0190.00315.47
7.0.00.0170.00715.35
5.6.400.0130.01315.97
5.6.390.0120.01516.06
5.6.380.0120.01515.96
5.6.370.0120.01316.00
5.6.360.0140.00916.50
5.6.350.0130.00915.84
5.6.340.0170.00516.26
5.6.330.0160.00616.21
5.6.320.0180.00416.37
5.6.310.0140.01115.88
5.6.300.0150.01216.15
5.6.290.0220.00616.14
5.6.280.0160.00816.24
5.6.270.0190.00916.04
5.6.260.0100.01616.19
5.6.250.0070.01516.05
5.6.240.0160.00816.16
5.6.230.0140.01116.02
5.6.220.0140.01316.21
5.6.210.0110.01416.25
5.6.200.0130.01616.26
5.6.190.0140.01415.92
5.6.180.0140.01016.02
5.6.170.0160.01315.84
5.6.160.0060.01715.96
5.6.150.0240.00515.99
5.6.140.0190.00816.14
5.6.130.0170.00916.16
5.6.120.0230.00716.16
5.6.110.0150.01015.97
5.6.100.0190.00816.25
5.6.90.0240.00316.02
5.6.80.0220.01216.03
5.6.70.0130.00815.93
5.6.60.0180.00515.92
5.6.50.0110.01115.98
5.6.40.0200.00016.21
5.6.30.0140.01015.99
5.6.20.0110.01116.20
5.6.10.0150.00915.99
5.6.00.0160.00915.94
5.5.380.0180.00416.04
5.5.370.0210.00416.15
5.5.360.0140.01316.17
5.5.350.0210.00216.15
5.5.340.0070.01915.84
5.5.330.0140.00916.13
5.5.320.0140.01015.94
5.5.310.0230.00015.85
5.5.300.0240.00915.93
5.5.290.0130.01516.12
5.5.280.0080.01716.11
5.5.270.0150.00916.04
5.5.260.0120.01316.13
5.5.250.0120.01216.02
5.5.240.0200.00316.11
5.5.230.0150.00616.02
5.5.220.0240.00315.97
5.5.210.0110.01115.91
5.5.200.0120.00915.78
5.5.190.0080.01715.98
5.5.180.0180.00716.08
5.5.170.0120.01315.98
5.5.160.0070.01816.04
5.5.150.0110.01415.75
5.5.140.0110.01415.93
5.5.130.0070.01716.04
5.5.120.0110.01815.93
5.5.110.0200.00816.02
5.5.100.0120.00915.94
5.5.90.0120.00915.93
5.5.80.0090.01316.07
5.5.70.0140.01115.98
5.5.60.0140.00915.92
5.5.50.0060.01715.87
5.5.40.0150.00915.96
5.5.30.0130.01415.75
5.5.20.0130.01115.93
5.5.10.0200.00615.85
5.5.00.0160.01416.00
5.4.450.0070.01112.97
5.4.440.0130.00512.88
5.4.430.0090.00612.91
5.4.420.0120.00912.67
5.4.410.0110.00912.99
5.4.400.0080.00713.03
5.4.390.0040.01112.75
5.4.380.0150.00312.73
5.4.370.0110.00612.71
5.4.360.0120.00412.96
5.4.350.0150.00412.62
5.4.340.0110.00813.15
5.4.330.0110.00812.75
5.4.320.0150.00512.88
5.4.310.0060.00912.88
5.4.300.0140.00312.78
5.4.290.0100.01012.74
5.4.280.0160.00612.95
5.4.270.0080.00812.77
5.4.260.0110.00512.72
5.4.250.0110.00512.60
5.4.240.0080.00812.68
5.4.230.0150.00512.88
5.4.220.0070.01012.67
5.4.210.0110.00712.80
5.4.200.0100.01012.88
5.4.190.0190.00312.73
5.4.180.0140.00812.99
5.4.170.0030.00413.01
5.4.160.0170.00512.72
5.4.150.0150.00412.76
5.4.140.0120.00912.63
5.4.130.0090.00812.70
5.4.120.0060.01312.86
5.4.110.0090.00912.78
5.4.100.0050.01512.94
5.4.90.0130.00712.89
5.4.80.0110.00512.71
5.4.70.0130.00612.74
5.4.60.0000.02012.83
5.4.50.0070.01012.86
5.4.40.0120.00412.93
5.4.30.0110.01112.65
5.4.20.0120.00612.67
5.4.10.0140.00312.82
5.4.00.0180.00312.89
5.3.290.0110.01113.68
5.3.280.0100.01013.22
5.3.270.0130.01013.61
5.3.260.0080.01413.23
5.3.250.0080.01113.23
5.3.240.0160.00313.10
5.3.230.0100.01013.31
5.3.220.0120.00813.49
5.3.210.0150.00413.18
5.3.200.0110.01013.09
5.3.190.0100.00713.15
5.3.180.0160.00813.44
5.3.170.0130.00713.34
5.3.160.0150.00613.68
5.3.150.0150.00313.29
5.3.140.0000.02013.27
5.3.130.0100.00913.21
5.3.120.0110.00813.21
5.3.110.0030.01513.23
5.3.100.0030.01513.28
5.3.90.0080.01113.28
5.3.80.0130.00513.15
5.3.70.0040.01513.54
5.3.60.0110.00713.20
5.3.50.0100.00713.26
5.3.40.0140.00313.19
5.3.30.0000.01813.58
5.3.20.0120.00913.23
5.3.10.0110.00913.27
5.3.00.0140.00813.38
5.2.170.0130.00312.22
5.2.160.0060.01312.32
5.2.150.0100.01012.57
5.2.140.0060.01012.11
5.2.130.0080.01012.18
5.2.120.0110.00812.18
5.2.110.0110.00612.05
5.2.100.0050.01512.18
5.2.90.0060.01312.19
5.2.80.0070.01012.04
5.2.70.0120.00912.17
5.2.60.0140.00712.03
5.2.50.0090.00812.08
5.2.40.0130.00312.29
5.2.30.0060.00912.09
5.2.20.0060.00911.89
5.2.10.0090.00711.96
5.2.00.0120.00811.95
5.1.60.0040.01211.83
5.1.50.0070.01011.83
5.1.40.0050.00811.83
5.1.30.0060.00811.83
5.1.20.0000.01411.83
5.1.10.0030.00911.83
5.1.00.0030.01011.83
5.0.50.0080.00411.83
5.0.40.0000.01311.83
5.0.30.0080.00411.83
5.0.20.0090.00611.83
5.0.10.0090.00211.83
5.0.00.0070.00711.83
4.4.90.0080.00311.83
4.4.80.0080.00011.83
4.4.70.0000.00911.83
4.4.60.0070.00211.83
4.4.50.0040.00411.83
4.4.40.0090.00011.83
4.4.30.0050.00211.83
4.4.20.0000.00811.83
4.4.10.0030.00311.83
4.4.00.0090.00011.83
4.3.110.0000.00711.83
4.3.100.0060.00311.83
4.3.90.0040.00411.83
4.3.80.0040.00411.83
4.3.70.0050.00311.83
4.3.60.0040.00411.83
4.3.50.0090.00011.83
4.3.40.0050.00511.83
4.3.30.0060.00011.83
4.3.20.0020.00511.83
4.3.10.0040.00211.83
4.3.00.0030.00311.83

preferences:
13.1 ms | 406 KiB | 5 Q