3v4l.org

run code in 300+ PHP versions simultaneously
<?php $fixtureDocumentA = " <root> <nodeOne>value1</nodeOne> <nodeTwo>value2</nodeTwo> <nodeThree>value3</nodeThree> <section> <partOne>value1</partOne> <partTwo>value2</partTwo> <partThree>value3</partThree> </section> <anotherSection> <duplicateNode>unique_value0</duplicateNode> <duplicateNode>unique_value1</duplicateNode> </anotherSection> </root> "; $baseDocument = simplexml_load_string($fixtureDocumentA); print_r($baseDocument); $stuff = $baseDocument->xpath('/root/anotherSection/duplicateNode/text()'); $thing = current($stuff); print_r($stuff); print_r($thing); var_dump($thing); var_dump(empty($thing)); var_dump($thing->count()); var_dump(strval($thing));

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.40.0070.00718.87
8.3.30.0150.00018.96
8.3.20.0050.00218.89
8.3.10.0040.00419.46
8.3.00.0040.00422.01
8.2.170.0080.00822.96
8.2.160.0170.00320.64
8.2.150.0090.00024.18
8.2.140.0080.00024.66
8.2.130.0120.00626.16
8.2.120.0060.00317.75
8.2.110.0070.00320.87
8.2.100.0110.00018.16
8.2.90.0030.00619.47
8.2.80.0050.00318.28
8.2.70.0000.00917.88
8.2.60.0050.00318.29
8.2.50.0040.00418.07
8.2.40.0060.00318.34
8.2.30.0000.00820.01
8.2.20.0040.00417.83
8.2.10.0080.00017.88
8.2.00.0040.00418.09
8.1.270.0030.00622.52
8.1.260.0070.00026.35
8.1.250.0080.00028.09
8.1.240.0060.00322.73
8.1.230.0070.00421.13
8.1.220.0080.00018.77
8.1.210.0050.00319.15
8.1.200.0000.00917.38
8.1.190.0050.00317.91
8.1.180.0040.00418.10
8.1.170.0050.00318.86
8.1.160.0000.00719.02
8.1.150.0070.00018.86
8.1.140.0040.00417.56
8.1.130.0030.00318.16
8.1.120.0040.00417.63
8.1.110.0040.00417.75
8.1.100.0040.00417.74
8.1.90.0000.00717.61
8.1.80.0040.00417.55
8.1.70.0000.00717.87
8.1.60.0050.00317.82
8.1.50.0040.00417.86
8.1.40.0040.00417.73
8.1.30.0040.00417.78
8.1.20.0060.00318.05
8.1.10.0050.00217.81
8.1.00.0000.00717.79
8.0.300.0000.00820.23
8.0.290.0040.00417.53
8.0.280.0050.00218.78
8.0.270.0000.00717.63
8.0.260.0040.00417.10
8.0.250.0000.00817.32
8.0.240.0060.00517.07
8.0.230.0000.00717.25
8.0.220.0000.00717.19
8.0.210.0000.00817.17
8.0.200.0060.00017.26
8.0.190.0030.00417.18
8.0.180.0040.00417.01
8.0.170.0050.00317.21
8.0.160.0030.00617.14
8.0.150.0080.00016.94
8.0.140.0070.00017.22
8.0.130.0030.00313.56
8.0.120.0000.01016.98
8.0.110.0040.00417.03
8.0.100.0050.00317.09
8.0.90.0040.00417.23
8.0.80.0000.01617.13
8.0.70.0000.00817.07
8.0.60.0050.00317.19
8.0.50.0030.00517.22
8.0.30.0070.01217.25
8.0.20.0090.01317.49
8.0.10.0040.00417.27
8.0.00.0070.01116.99
7.4.330.0060.00015.04
7.4.320.0030.00316.85
7.4.300.0000.00716.68
7.4.290.0070.00016.92
7.4.280.0000.00716.87
7.4.270.0030.00516.86
7.4.260.0000.00513.54
7.4.250.0000.00816.92
7.4.240.0000.00716.95
7.4.230.0040.00416.95
7.4.220.0120.01216.72
7.4.210.0050.01116.95
7.4.200.0040.00416.89
7.4.190.0070.00016.77
7.4.160.0080.00816.94
7.4.150.0100.00717.40
7.4.140.0070.01217.86
7.4.130.0130.00816.83
7.4.120.0090.00816.68
7.4.110.0190.00016.88
7.4.100.0100.00717.01
7.4.90.0130.00616.96
7.4.80.0070.01019.37
7.4.70.0030.01316.84
7.4.60.0030.01616.90
7.4.50.0000.00416.71
7.4.40.0060.00922.52
7.4.30.0060.00917.06
7.4.10.0130.00314.98
7.4.00.0090.00915.02
7.3.330.0000.00513.20
7.3.320.0000.00613.47
7.3.310.0070.00016.55
7.3.300.0070.00016.50
7.3.290.0090.00616.55
7.3.280.0110.00716.59
7.3.270.0100.01017.40
7.3.260.0120.00818.24
7.3.250.0120.00616.75
7.3.240.0100.00616.64
7.3.230.0090.00916.79
7.3.210.0170.00616.52
7.3.200.0110.01119.39
7.3.190.0150.00416.47
7.3.180.0060.01016.84
7.3.170.0140.00916.91
7.3.160.0090.00616.76
7.3.130.0110.00314.82
7.3.120.0080.00714.91
7.3.110.0100.00714.93
7.3.100.0030.01214.96
7.3.90.0110.00114.97
7.3.80.0050.00914.88
7.3.70.0070.00614.76
7.3.60.0050.00614.68
7.3.50.0020.01414.92
7.3.40.0060.00815.01
7.3.30.0060.00914.91
7.3.20.0040.00716.61
7.3.10.0070.00516.71
7.3.00.0050.01016.76
7.2.330.0110.00516.80
7.2.320.0120.00616.81
7.2.310.0130.00616.92
7.2.300.0030.01417.02
7.2.290.0090.00916.86
7.2.260.0040.01515.26
7.2.250.0100.00814.96
7.2.240.0080.00915.11
7.2.230.0080.00715.04
7.2.220.0110.00515.06
7.2.210.0050.00814.97
7.2.200.0070.01015.02
7.2.190.0020.01315.00
7.2.180.0040.00915.01
7.2.170.0050.01014.99
7.2.160.0080.00715.12
7.2.150.0030.01017.05
7.2.140.0050.00917.06
7.2.130.0020.01717.02
7.2.120.0050.00916.97
7.2.110.0050.00916.95
7.2.100.0020.01016.92
7.2.90.0070.00716.77
7.2.80.0030.00816.97
7.2.70.0070.00516.94
7.2.60.0030.01117.00
7.2.50.0100.00817.04
7.2.40.0030.00917.11
7.2.30.0080.00817.08
7.2.20.0100.00416.72
7.2.10.0040.01217.00
7.2.00.0050.00417.63
7.1.330.0070.01015.74
7.1.320.0050.00916.01
7.1.310.0050.00716.05
7.1.300.0040.00815.90
7.1.290.0060.00815.88
7.1.280.0090.00415.65
7.1.270.0060.00615.87
7.1.260.0060.00715.71
7.1.250.0040.01015.82
7.1.240.0050.01115.80
7.1.230.0050.00815.87
7.1.220.0070.00615.74
7.1.210.0040.00915.81
7.1.200.0040.00815.86
7.1.190.0030.01115.89
7.1.180.0100.00615.81
7.1.170.0050.01015.81
7.1.160.0080.00615.72
7.1.150.0100.00615.66
7.1.140.0040.00815.81
7.1.130.0020.01015.70
7.1.120.0080.00515.85
7.1.110.0010.00815.83
7.1.100.0030.00916.64
7.1.90.0040.00815.93
7.1.80.0040.00715.69
7.1.70.0030.00716.29
7.1.60.0080.00816.89
7.1.50.0050.00916.29
7.1.40.0070.00415.89
7.1.30.0080.00315.81
7.1.20.0080.00615.74
7.1.10.0030.00915.74
7.1.00.0040.02318.10
7.0.330.0050.01215.58
7.0.320.0070.00815.48
7.0.310.0030.01115.53
7.0.300.0070.00715.46
7.0.290.0070.00515.48
7.0.280.0060.00815.44
7.0.270.0030.01015.41
7.0.260.0060.00615.67
7.0.250.0050.00615.58
7.0.240.0040.00915.57
7.0.230.0070.00615.45
7.0.220.0060.00615.69
7.0.210.0070.00715.58
7.0.200.0050.00915.90
7.0.190.0080.00515.50
7.0.180.0030.01215.43
7.0.170.0030.01115.60
7.0.160.0030.00715.51
7.0.150.0030.01015.55
7.0.140.0050.02717.85
7.0.130.0090.00315.62
7.0.120.0020.00715.55
7.0.110.0110.00515.37
7.0.100.0040.01115.46
7.0.90.0030.00915.48
7.0.80.0020.01315.49
7.0.70.0030.03017.65
7.0.60.0060.02517.62
7.0.50.0040.03217.81
7.0.40.0040.02515.72
7.0.30.0040.03315.87
7.0.20.0080.02915.79
7.0.10.0140.02515.86
7.0.00.0080.02815.73
5.6.400.0050.01014.58
5.6.390.0060.00614.20
5.6.380.0020.01114.43
5.6.370.0030.01214.01
5.6.360.0050.00914.38
5.6.350.0070.00914.38
5.6.340.0070.01014.57
5.6.330.0060.00714.33
5.6.320.0090.00514.16
5.6.310.0050.01014.51
5.6.300.0030.00814.62
5.6.290.0100.00414.52
5.6.280.0070.02816.68
5.6.270.0050.00914.34
5.6.260.0090.00714.27
5.6.250.0080.00714.58
5.6.240.0080.00714.57
5.6.230.0020.01314.49
5.6.220.0000.03816.46
5.6.210.0040.03116.52
5.6.200.0090.03116.76
5.6.190.0080.02416.70
5.6.180.0090.03016.80
5.6.170.0030.03316.60
5.6.160.0070.02916.60
5.6.150.0060.02616.67
5.6.140.0080.03016.72
5.6.130.0100.02916.82
5.6.120.0050.02316.70
5.6.110.0050.03416.65
5.6.100.0030.03316.73
5.6.90.0060.02916.58
5.6.80.0070.03416.39
5.6.70.0060.03016.37
5.6.60.0080.02416.29
5.6.50.0030.03416.33
5.6.40.0040.03116.50
5.6.30.0050.02816.36
5.6.20.0090.01816.42
5.6.10.0030.03416.33
5.6.00.0080.01916.33
5.5.380.0020.01314.33
5.5.370.0050.01014.38
5.5.360.0080.01916.38
5.5.350.0030.03716.54
5.5.340.0050.03316.48
5.5.330.0110.02116.60
5.5.320.0060.03016.41
5.5.310.0040.03216.64
5.5.300.0080.02016.62
5.5.290.0030.03416.45
5.5.280.0050.03316.47
5.5.270.0080.02916.66
5.5.260.0050.03216.55
5.5.250.0060.03116.41
5.5.240.0050.03516.15
5.5.230.0040.03016.28
5.5.220.0110.02116.32
5.5.210.0060.03216.31
5.5.200.0050.02416.24
5.5.190.0040.02516.17
5.5.180.0050.03216.28
5.5.170.0050.01114.21
5.5.160.0070.03016.36
5.5.150.0000.02916.28
5.5.140.0080.03016.32
5.5.130.0070.02316.33
5.5.120.0050.03316.08
5.5.110.0050.03216.43
5.5.100.0060.03016.18
5.5.90.0050.03016.22
5.5.80.0070.03016.22
5.5.70.0020.02216.25
5.5.60.0070.03016.11
5.5.50.0030.03016.15
5.5.40.0070.03016.25
5.5.30.0070.02116.25
5.5.20.0090.02216.20
5.5.10.0040.02316.33
5.5.00.0030.03316.25
5.4.450.0080.02813.99
5.4.440.0030.03314.02
5.4.430.0040.03014.00
5.4.420.0050.02913.96
5.4.410.0030.02513.97
5.4.400.0070.02713.75
5.4.390.0080.02613.66
5.4.380.0040.02813.67
5.4.370.0010.03113.98
5.4.360.0080.02613.71
5.4.350.0000.03413.84
5.4.340.0040.03113.87
5.4.330.0070.00411.08
5.4.320.0030.03113.68
5.4.310.0030.02613.84
5.4.300.0080.02313.86
5.4.290.0050.02313.80
5.4.280.0060.02913.84
5.4.270.0050.02813.79
5.4.260.0080.02713.79
5.4.250.0050.02413.80
5.4.240.0030.03813.81
5.4.230.0050.02713.69
5.4.220.0060.02013.79
5.4.210.0030.03013.81
5.4.200.0080.03113.65
5.4.190.0070.01813.76
5.4.180.0050.02313.75
5.4.170.0050.03113.72
5.4.160.0080.01813.82
5.4.150.0050.03313.68
5.4.140.0030.01913.11
5.4.130.0050.02712.92
5.4.120.0040.02612.92
5.4.110.0080.02512.96
5.4.100.0050.03112.93
5.4.90.0030.02412.88
5.4.80.0050.02912.91
5.4.70.0030.02712.91
5.4.60.0040.02813.02
5.4.50.0040.03012.88
5.4.40.0060.02312.92
5.4.30.0030.02312.92
5.4.20.0080.02312.89
5.4.10.0030.02912.88
5.4.00.0040.02812.72
5.3.290.0080.02012.08
5.3.280.0060.02411.93
5.3.270.0010.03312.03
5.3.260.0070.02612.01
5.3.250.0020.02612.14
5.3.240.0060.02712.07
5.3.230.0070.02912.00
5.3.220.0020.03112.03
5.3.210.0040.02512.00
5.3.200.0030.03111.89
5.3.190.0060.02911.90
5.3.180.0020.03112.11
5.3.170.0030.03012.01
5.3.160.0050.02912.05
5.3.150.0020.03012.00
5.3.140.0050.02412.00
5.3.130.0030.03011.94
5.3.120.0030.03012.15
5.3.110.0050.02712.13
5.3.100.0030.02911.84
5.3.90.0050.02411.83
5.3.80.0020.03211.83
5.3.70.0060.02711.77
5.3.60.0040.02911.76
5.3.50.0040.02711.76
5.3.40.0070.02611.77
5.3.30.0000.02911.79
5.3.20.0050.01211.68
5.3.10.0020.01711.58
5.3.00.0020.01711.52
5.2.170.0000.06312.37
5.2.160.0000.04012.37
5.2.150.0030.06012.37
5.2.140.0000.06712.37
5.2.130.0030.02712.37
5.2.120.0000.03012.37
5.2.110.0030.02712.37
5.2.100.0030.02712.37
5.2.90.0000.03012.37
5.2.80.0030.02712.37
5.2.70.0000.04712.37
5.2.60.0000.04012.37
5.2.50.0000.03012.37
5.2.40.0070.02312.37
5.2.30.0030.02712.37
5.2.20.0000.03312.37
5.2.10.0030.02712.37
5.2.00.0000.03012.37
5.1.60.0030.02312.37
5.1.50.0000.04312.37
5.1.40.0000.03012.37
5.1.30.0030.02312.37
5.1.20.0030.04012.37
5.1.10.0070.05012.37
5.1.00.0070.03312.37
5.0.50.0070.01712.37
5.0.40.0000.02012.37
5.0.30.0070.02712.37
5.0.20.0000.02312.37
5.0.10.0000.02012.37
5.0.00.0000.03012.37
4.4.90.0000.01312.37
4.4.80.0000.01712.37
4.4.70.0000.01712.37
4.4.60.0000.01712.37
4.4.50.0000.01312.37
4.4.40.0000.02312.37
4.4.30.0000.01312.37
4.4.20.0000.02012.37
4.4.10.0000.02312.37
4.4.00.0000.02312.37
4.3.110.0000.01712.37
4.3.100.0000.01312.37
4.3.90.0000.01312.37
4.3.80.0000.04012.37
4.3.70.0000.02312.37
4.3.60.0000.01712.37
4.3.50.0000.01312.37
4.3.40.0000.02712.37
4.3.30.0000.01712.37
4.3.20.0030.01712.37
4.3.10.0030.01712.37
4.3.00.0030.01312.37

preferences:
45.58 ms | 400 KiB | 5 Q