3v4l.org

run code in 300+ PHP versions simultaneously
<?php $html = <<< HTML <html> <h1>hello<span>world</span></h1> <p>random text</p> <h1>title number two!</h1> </html> HTML; $reader = new XMLReader; $reader->xml($html); while($reader->read() !== FALSE) { if($reader->name === 'h1' && $reader->nodeType === XMLReader::ELEMENT) { echo $reader->readString(); } }

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.0140.00718.68
8.3.50.0080.01422.25
8.3.40.0060.00919.09
8.3.30.0150.00019.42
8.3.20.0000.00920.63
8.3.10.0030.00523.85
8.3.00.0090.00019.51
8.2.180.0090.00916.63
8.2.170.0190.00022.96
8.2.160.0070.01320.72
8.2.150.0040.00424.18
8.2.140.0050.00324.66
8.2.130.0120.00326.16
8.2.120.0060.00322.61
8.2.110.0100.00022.48
8.2.100.0120.00019.77
8.2.90.0050.00317.97
8.2.80.0090.00019.67
8.2.70.0000.00818.18
8.2.60.0080.00018.18
8.2.50.0060.00318.10
8.2.40.0040.00720.92
8.2.30.0000.00818.44
8.2.20.0000.00717.98
8.2.10.0040.00418.48
8.2.00.0030.00518.13
8.1.280.0180.00325.92
8.1.270.0030.00524.04
8.1.260.0050.00326.35
8.1.250.0000.00828.09
8.1.240.0030.00622.46
8.1.230.0080.00421.22
8.1.220.0050.00317.91
8.1.210.0060.00319.00
8.1.200.0030.00617.47
8.1.190.0040.00417.60
8.1.180.0030.00618.10
8.1.170.0000.00818.81
8.1.160.0000.00722.43
8.1.150.0000.00818.82
8.1.140.0070.00417.75
8.1.130.0000.00718.05
8.1.120.0000.00717.78
8.1.110.0040.00417.76
8.1.100.0040.00417.59
8.1.90.0070.00017.86
8.1.80.0000.00717.64
8.1.70.0000.00717.66
8.1.60.0030.00917.88
8.1.50.0050.00317.88
8.1.40.0070.00017.82
8.1.30.0040.00417.96
8.1.20.0040.00417.84
8.1.10.0050.00217.80
8.1.00.0040.00417.70
8.0.300.0040.00420.32
8.0.290.0040.00417.00
8.0.280.0000.00718.74
8.0.270.0030.00617.44
8.0.260.0050.00217.58
8.0.250.0000.00717.35
8.0.240.0000.00717.23
8.0.230.0040.00417.34
8.0.220.0070.00017.35
8.0.210.0030.00317.32
8.0.200.0040.00417.36
8.0.190.0040.00417.41
8.0.180.0040.00417.16
8.0.170.0070.00017.37
8.0.160.0030.00517.32
8.0.150.0080.00017.11
8.0.140.0000.00717.09
8.0.130.0050.00313.64
8.0.120.0000.00817.10
8.0.110.0000.00717.09
8.0.100.0080.00017.04
8.0.90.0040.00417.14
8.0.80.0090.00617.30
8.0.70.0040.00417.17
8.0.60.0030.00517.26
8.0.50.0060.00317.00
8.0.30.0120.00717.44
8.0.20.0140.00517.45
8.0.10.0080.00017.36
8.0.00.0090.00817.23
7.4.330.0050.00015.32
7.4.320.0070.00016.80
7.4.300.0000.00716.96
7.4.290.0000.00716.77
7.4.280.0030.00516.86
7.4.270.0040.00416.71
7.4.260.0000.00716.84
7.4.250.0000.00716.91
7.4.240.0040.00416.77
7.4.230.0070.00016.71
7.4.220.0120.00616.98
7.4.210.0080.00816.85
7.4.200.0000.00816.88
7.4.190.0030.00316.96
7.4.160.0060.00916.95
7.4.150.0000.01817.40
7.4.140.0080.01117.86
7.4.130.0130.00616.85
7.4.120.0110.00616.83
7.4.110.0100.00616.68
7.4.100.0070.01116.93
7.4.90.0150.00716.86
7.4.80.0030.01319.39
7.4.70.0070.01016.96
7.4.60.0120.00616.72
7.4.50.0040.00416.81
7.4.40.0070.00322.77
7.4.30.0080.00816.85
7.4.00.0060.00915.28
7.3.330.0000.00513.48
7.3.320.0050.00013.44
7.3.310.0080.00016.46
7.3.300.0050.00216.56
7.3.290.0060.00916.55
7.3.280.0090.00916.56
7.3.270.0070.01017.40
7.3.260.0140.00316.74
7.3.250.0060.01416.54
7.3.240.0040.01316.86
7.3.230.0070.01016.48
7.3.210.0120.00616.66
7.3.200.0040.01419.39
7.3.190.0030.01316.72
7.3.180.0080.00816.64
7.3.170.0160.00016.68
7.3.160.0080.00816.80
7.3.120.0130.00015.17
7.3.10.0070.00416.47
7.3.00.0060.00616.73
7.2.330.0060.01217.02
7.2.320.0100.01317.00
7.2.310.0100.00617.07
7.2.300.0000.01617.11
7.2.290.0030.01416.96
7.2.130.0070.00717.09
7.2.120.0040.01116.94
7.2.110.0060.00617.07
7.2.100.0050.00517.16
7.2.90.0060.01017.09
7.2.80.0000.01717.10
7.2.70.0230.00317.08
7.2.60.0120.00517.13
7.2.50.0100.00317.11
7.2.40.0000.01116.89
7.2.30.0080.00317.18
7.2.20.0110.00017.09
7.2.10.0040.01117.05
7.2.00.0050.00918.38
7.1.250.0040.00415.82
7.1.100.0000.01518.39
7.1.70.0080.00317.06
7.1.60.0030.01719.46
7.1.50.0310.00734.81
7.1.00.0070.07022.64
7.0.200.0080.00416.91
7.0.140.0000.07722.30
7.0.60.0130.08020.13
7.0.50.0070.07017.87
7.0.40.0100.05320.07
7.0.30.0500.08020.42
7.0.20.0300.04720.30
7.0.10.0070.03720.36
7.0.00.0170.07720.34
5.6.280.0070.07021.23
5.6.210.0000.05320.72
5.6.200.0100.07018.27
5.6.190.0070.04020.55
5.6.180.0130.07720.82
5.6.170.0200.04720.64
5.6.160.0100.04720.66
5.6.150.0130.07318.30
5.6.140.0130.07318.30
5.6.130.0130.05718.26
5.6.120.0070.08021.09
5.6.110.0070.06721.25
5.6.100.0130.07721.07
5.6.90.0030.09021.31
5.6.80.0070.06020.69
5.6.70.4430.04020.45
5.5.350.0130.08020.64
5.5.340.0070.08318.09
5.5.330.0030.04720.36
5.5.320.0330.04320.34
5.5.310.0330.04720.46
5.5.300.0070.07318.08
5.5.290.0000.04318.11
5.5.280.0070.07020.96
5.5.270.0070.03721.04
5.5.260.0170.06720.98
5.5.250.0070.06320.97
5.5.240.0230.07720.46
5.4.450.0430.05719.79
5.4.440.0330.06719.55
5.4.430.0130.05019.77
5.4.420.0730.00019.63
5.4.410.0070.06019.14
5.4.400.0170.06318.93
5.4.390.0330.04718.84
5.4.380.0300.06318.84
5.4.370.0000.06318.79
5.4.360.0170.04718.79
5.4.350.0110.03212.17
5.4.340.0040.04012.17
5.4.320.0060.03812.66
5.4.310.0050.03812.66
5.4.300.0100.04012.66
5.4.290.0070.04812.66
5.4.280.0090.03512.54
5.4.270.0090.04612.54
5.4.260.0090.05212.54
5.4.250.0110.05912.54
5.4.240.0100.05912.54
5.4.230.0100.04312.53
5.4.220.0130.05412.53
5.4.210.0090.05312.53
5.4.200.0070.04112.53
5.4.190.0100.03912.52
5.4.180.0080.03912.53
5.4.170.0100.03412.53
5.4.160.0080.03912.53
5.4.150.0070.03812.53
5.4.140.0080.03812.21
5.4.130.0070.03512.20
5.4.120.0060.03612.15
5.4.110.0050.03912.15
5.4.100.0060.03712.15
5.4.90.0070.04012.16
5.4.80.0140.04512.15
5.4.70.0100.04412.15
5.4.60.0070.03612.15
5.4.50.0080.03412.14
5.4.40.0050.03812.14
5.4.30.0110.04012.13
5.4.20.0100.03812.13
5.4.10.0070.03512.13
5.4.00.0030.04011.62
5.3.290.0070.04812.92
5.3.280.0100.05412.83
5.3.270.0140.04312.84
5.3.260.0130.04512.84
5.3.250.0080.06012.84
5.3.240.0090.05112.84
5.3.230.0130.03812.83
5.3.220.0100.03512.80
5.3.210.0090.04412.80
5.3.200.0070.04212.80
5.3.190.0090.03912.80
5.3.180.0090.03712.79
5.3.170.0080.04212.79
5.3.160.0100.04012.79
5.3.150.0080.04112.79
5.3.140.0100.03912.79
5.3.130.0130.04212.78
5.3.120.0110.04812.78
5.3.110.0170.05112.78
5.3.100.0160.08412.27
5.3.90.0150.06712.25
5.3.80.0090.04612.24
5.3.70.0050.04212.24
5.3.60.0060.04112.23
5.3.50.0120.04412.17
5.3.40.0180.06512.17
5.3.30.0120.03412.14
5.3.20.0090.03911.91
5.3.10.0100.03811.88
5.3.00.0110.04411.87
5.2.170.0080.0359.36
5.2.160.0090.0419.36
5.2.150.0080.0319.36
5.2.140.0110.0499.36
5.2.130.0070.0309.32
5.2.120.0040.0399.32
5.2.110.0090.0339.32
5.2.100.0100.0269.32
5.2.90.0070.0299.32
5.2.80.0040.0339.32
5.2.70.0050.0419.32
5.2.60.0100.0429.27
5.2.50.0070.0339.24
5.2.40.0070.0309.21
5.2.30.0080.0309.19
5.2.20.0050.0319.17
5.2.10.0050.0349.10
5.2.00.0060.0338.97
5.1.60.0120.0398.23
5.1.50.0080.0318.23
5.1.40.0080.0258.21
5.1.30.0060.0318.56
5.1.20.0130.0688.59
5.1.10.0130.0408.13
5.1.00.0110.0368.13
5.0.50.0100.0196.61
5.0.40.0150.0236.47
5.0.30.0070.0336.28
5.0.20.0050.0226.26
5.0.10.0060.0226.23
5.0.00.0110.0456.22
4.4.90.0040.0204.78
4.4.80.0060.0214.75
4.4.70.0050.0234.75
4.4.60.0050.0214.75
4.4.50.0060.0184.77
4.4.40.0060.0474.71
4.4.30.0060.0244.76
4.4.20.0040.0264.85
4.4.10.0040.0234.85
4.4.00.0060.0374.76
4.3.110.0070.0214.67
4.3.100.0020.0204.66
4.3.90.0030.0244.64
4.3.80.0070.0294.58
4.3.70.0040.0244.63
4.3.60.0040.0214.63
4.3.50.0110.0184.63
4.3.40.0060.0304.54
4.3.30.0060.0213.28
4.3.20.0050.0213.26
4.3.10.0020.0243.22
4.3.00.0070.0237.98

preferences:
47.93 ms | 401 KiB | 5 Q