3v4l.org

run code in 300+ PHP versions simultaneously
<?php $xml = <<<XML <?xml version="1.0" encoding="UTF-8"?> <root> <area> <photographer_id>1</photographer_id> <photographer>John</photographer> <image>a</image> </area> <area> <photographer_id>1</photographer_id> <photographer>John</photographer> <image>b</image> </area> <area> <photographer_id>1</photographer_id> <photographer>John</photographer> <image>c</image> </area> <area> <photographer_id>2</photographer_id> <photographer>Fred</photographer> <image>a</image> </area> </root> XML; $sxe = new SimpleXMLElement($xml); $searchKeyword = "Fred"; $area = $sxe->xpath("//area[contains(photographer, {$searchKeyword} )]"); print_r($area);

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.70.0170.00318.43
8.3.60.0090.00617.00
8.3.50.0150.00722.31
8.3.40.0070.00718.92
8.3.30.0070.00719.04
8.3.20.0040.00420.41
8.3.10.0080.00022.25
8.3.00.0040.00419.51
8.2.180.0180.00318.68
8.2.170.0120.00322.96
8.2.160.0000.01422.63
8.2.150.0050.00324.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0080.00318.18
8.2.110.0070.00419.76
8.2.100.0090.00317.75
8.2.90.0080.00019.42
8.2.80.0030.00617.97
8.2.70.0030.00618.00
8.2.60.0050.00318.18
8.2.50.0030.00618.07
8.2.40.0050.00318.47
8.2.30.0080.00018.30
8.2.20.0040.00418.02
8.2.10.0060.00318.58
8.2.00.0040.00418.04
8.1.280.0120.00625.92
8.1.270.0060.00319.21
8.1.260.0080.00026.35
8.1.250.0050.00328.09
8.1.240.0060.00324.09
8.1.230.0090.00319.12
8.1.220.0030.00618.03
8.1.210.0000.00818.77
8.1.200.0060.00317.50
8.1.190.0040.00417.36
8.1.180.0050.00318.10
8.1.170.0000.00820.60
8.1.160.0040.00422.25
8.1.150.0050.00319.10
8.1.140.0040.00417.75
8.1.130.0030.00318.06
8.1.120.0000.00817.58
8.1.110.0030.00317.68
8.1.100.0040.00417.75
8.1.90.0040.00417.82
8.1.80.0000.00817.85
8.1.70.0000.00717.74
8.1.60.0050.00517.73
8.1.50.0050.00217.71
8.1.40.0000.00817.73
8.1.30.0060.00317.89
8.1.20.0040.00417.96
8.1.10.0040.00417.73
8.1.00.0040.00817.90
8.0.300.0070.00018.77
8.0.290.0020.00517.00
8.0.280.0000.00718.72
8.0.270.0030.00317.54
8.0.260.0070.00017.50
8.0.250.0030.00317.30
8.0.240.0050.00317.21
8.0.230.0030.00317.35
8.0.220.0040.00417.25
8.0.210.0050.00217.32
8.0.200.0030.00317.37
8.0.190.0040.00417.25
8.0.180.0050.00217.25
8.0.170.0040.00417.20
8.0.160.0040.00417.43
8.0.150.0000.00717.27
8.0.140.0000.00917.14
8.0.130.0060.00013.84
8.0.120.0040.00417.14
8.0.110.0000.00717.06
8.0.100.0040.00417.37
8.0.90.0040.00417.23
8.0.80.0060.01017.20
8.0.70.0040.00417.17
8.0.60.0080.00017.14
8.0.50.0080.00017.36
8.0.30.0150.00917.40
8.0.20.0150.00317.40
8.0.10.0040.00417.29
8.0.00.0100.01017.10
7.4.330.0050.00015.46
7.4.320.0050.00216.86
7.4.300.0030.00316.86
7.4.290.0000.00716.91
7.4.280.0080.00016.67
7.4.270.0050.00216.85
7.4.260.0000.00716.89
7.4.250.0080.00016.87
7.4.240.0030.00416.84
7.4.230.0000.00716.69
7.4.220.0060.01216.93
7.4.210.0100.00616.92
7.4.200.0000.00716.84
7.4.160.0040.01116.79
7.4.150.0180.00617.40
7.4.140.0110.01117.86
7.4.130.0070.01216.89
7.4.120.0110.01116.86
7.4.110.0130.01016.94
7.4.100.0150.00916.84
7.4.90.0040.01317.02
7.4.80.0110.00617.02
7.4.70.0050.01216.95
7.4.60.0100.00716.91
7.4.50.0000.00816.61
7.4.40.0040.01216.89
7.4.30.0100.01016.61
7.4.00.0070.00715.21
7.3.330.0000.00513.56
7.3.320.0110.00013.44
7.3.310.0000.00816.53
7.3.300.0000.00816.63
7.3.290.0080.01116.64
7.3.280.0080.00816.63
7.3.270.0090.00917.40
7.3.260.0170.00016.55
7.3.250.0100.01016.70
7.3.240.0110.00616.93
7.3.230.0170.00016.87
7.3.210.0070.01016.76
7.3.200.0130.00719.39
7.3.190.0120.00316.67
7.3.180.0060.00916.81
7.3.170.0100.00716.93
7.3.160.0060.00916.85
7.3.00.0190.00316.61
7.2.330.0230.02716.62
7.2.320.0140.00417.05
7.2.310.0090.00916.76
7.2.300.0060.01316.91
7.2.290.0150.00316.96
7.2.130.0070.00716.77
7.2.120.0110.00716.84
7.2.110.0130.00317.13
7.2.100.0090.00916.82
7.2.90.0100.00716.55
7.2.80.0070.00716.75
7.2.70.0070.01116.98
7.2.60.0060.00916.93
7.2.50.0160.00316.95
7.2.40.0120.00616.93
7.2.30.0070.01016.70
7.2.20.0120.00816.88
7.2.10.0160.00616.80
7.2.00.0050.01318.25
7.1.250.0130.00315.84
7.1.240.0090.00615.81
7.1.230.0070.00715.78
7.1.220.0100.00715.82
7.1.210.0100.00315.77
7.1.200.0120.00315.84
7.1.190.0030.01315.92
7.1.180.0070.00715.75
7.1.170.0100.00715.90
7.1.160.0120.00615.82
7.1.150.0150.00315.95
7.1.140.0170.00315.84
7.1.130.0120.01215.71
7.1.120.0090.01315.89
7.1.110.0090.00315.83
7.1.100.0080.00816.99
7.1.90.0080.00615.66
7.1.80.0070.01115.75
7.1.70.0060.00516.52
7.1.60.0070.01017.64
7.1.50.0050.01116.47
7.1.40.0090.00615.86
7.1.30.0040.00815.86
7.1.20.0160.00015.59
7.1.10.0100.01015.80
7.1.00.0050.04319.25
7.0.330.0040.00715.36
7.0.320.0100.00715.54
7.0.310.0130.00315.40
7.0.300.0030.00915.48
7.0.290.0130.00615.35
7.0.280.0120.00615.24
7.0.270.0140.00315.52
7.0.260.0090.00615.35
7.0.250.0070.01015.34
7.0.240.0140.00015.48
7.0.230.0170.00315.31
7.0.220.0110.00715.48
7.0.210.0040.01115.61
7.0.200.0370.00315.17
7.0.190.0090.00615.16
7.0.180.0130.00315.31
7.0.170.0080.00815.73
7.0.160.0150.00015.45
7.0.150.0070.01015.36
7.0.140.0100.03718.76
7.0.130.0130.00315.52
7.0.120.0060.01315.64
7.0.110.0110.00615.65
7.0.100.0130.00315.55
7.0.90.0070.01115.49
7.0.80.0110.00315.32
7.0.70.0070.01015.68
7.0.60.0140.03317.71
7.0.50.0120.03416.85
7.0.40.0120.03816.82
7.0.30.0120.02916.93
7.0.20.0140.03216.86
7.0.10.0180.04517.10
7.0.00.0090.03216.94
5.6.380.0060.00314.39
5.6.370.0030.01414.14
5.6.360.0040.01514.42
5.6.350.0090.00914.15
5.6.340.0070.00314.32
5.6.330.0110.00514.46
5.6.320.0070.00714.33
5.6.310.0080.00614.67
5.6.300.0090.00614.44
5.6.290.0130.00914.21
5.6.280.0040.04317.80
5.6.270.0090.01114.00
5.6.260.0070.00914.14
5.6.250.0100.00714.16
5.6.240.0150.00414.44
5.6.230.0080.00814.55
5.6.220.0070.01114.35
5.6.210.0070.03717.42
5.6.200.0110.03016.33
5.6.190.0100.04717.44
5.6.180.0160.03817.50
5.6.170.0160.02217.50
5.6.160.0020.05217.77
5.6.150.0120.04016.35
5.6.140.0050.04016.28
5.6.130.0050.02716.44
5.6.120.0140.04017.75
5.6.110.0070.04917.76
5.6.100.0080.03717.71
5.6.90.0070.03517.88
5.6.80.0030.04017.65
5.6.70.0050.02917.51
5.6.60.0100.00314.55
5.6.50.0150.00014.27
5.6.40.0090.00014.19
5.6.30.0130.00614.15
5.6.20.0070.00714.24
5.6.10.0000.01314.25
5.6.00.0070.01114.27
5.5.380.0070.00211.22
5.5.370.0050.00310.94
5.5.360.0110.00211.26
5.5.350.0170.02115.90
5.5.340.0130.03714.55
5.5.330.0110.04415.70
5.5.320.0120.02015.68
5.5.310.0170.04116.00
5.5.300.0080.03214.49
5.5.290.0090.03714.74
5.5.280.0040.03116.11
5.5.270.0100.02315.99
5.5.260.0080.04316.03
5.5.250.0050.04515.96
5.5.240.0100.03915.77
5.5.230.0090.00311.34
5.5.220.0070.00411.02
5.5.210.0060.00611.24
5.5.200.0070.00710.83
5.5.190.0030.01011.17
5.5.180.0050.01011.14
5.5.170.0000.00710.70
5.5.160.0070.00311.28
5.5.150.0030.00611.17
5.5.140.0030.00611.33
5.5.130.0030.00711.33
5.5.120.0130.00411.39
5.5.110.0110.00711.26
5.5.100.0040.01310.86
5.5.90.0090.00611.43
5.5.80.0140.00411.36
5.5.70.0120.00011.18
5.5.60.0050.00511.33
5.5.50.0090.00611.00
5.5.40.0030.01011.34
5.5.30.0120.00311.18
5.5.20.0120.00011.02
5.5.10.0080.00811.51
5.5.00.0140.00011.01
5.4.450.0320.04015.53
5.4.440.0530.03715.29
5.4.430.0080.03215.39
5.4.420.0400.03315.38
5.4.410.0480.03315.33
5.4.400.0550.02814.85
5.4.390.0550.03014.73
5.4.380.0510.02815.09
5.4.370.0590.02614.88
5.4.360.0510.02914.89
5.4.350.0630.03514.80
5.4.340.0620.03514.86
5.4.330.0050.00510.84
5.4.320.0520.02514.83
5.4.310.0520.02514.91
5.4.300.0480.02714.89
5.4.290.0450.03014.86
5.4.280.0470.02714.83
5.4.270.0560.02814.80
5.4.260.0560.02914.96
5.4.250.0470.03214.74
5.4.240.0620.04314.99
5.4.230.0660.03514.97
5.4.220.0490.03614.96
5.4.210.0460.03114.78
5.4.200.0610.02714.04
5.4.190.0540.03014.98
5.4.180.0540.03214.86
5.4.170.0600.03114.96
5.4.160.0630.02515.05
5.4.150.0640.02914.86
5.4.140.0450.03213.82
5.4.130.0530.02513.57
5.4.120.0480.03013.85
5.4.110.0500.02613.78
5.4.100.0430.03313.65
5.4.90.0490.03213.57
5.4.80.0530.02413.65
5.4.70.0510.02713.80
5.4.60.0630.03613.74
5.4.50.0550.02813.90
5.4.40.0670.03313.88
5.4.30.0530.03213.84
5.4.20.0500.03213.78
5.4.10.0690.03513.70
5.4.00.0590.02413.55
5.3.290.0650.03412.93
5.3.280.0520.02712.75
5.3.270.0500.03512.93
5.3.260.0540.03012.86
5.3.250.0680.03312.85
5.3.240.0490.02912.71
5.3.230.0600.03512.87
5.3.220.0550.02312.72
5.3.210.0600.04012.80
5.3.200.0660.04112.57
5.3.190.0710.03712.76
5.3.180.0590.03012.79
5.3.170.0600.03312.79
5.3.160.0520.02912.71
5.3.150.0460.03112.71
5.3.140.0520.03312.60
5.3.130.0460.03012.71
5.3.120.0480.03012.70
5.3.110.0540.03712.69
5.3.100.0560.02712.45
5.3.90.0470.03012.47
5.3.80.0480.02712.35
5.3.70.0420.03612.30
5.3.60.0500.02812.55
5.3.50.0420.03312.49
5.3.40.0480.03012.51
5.3.30.0480.02712.38
5.3.20.0530.02712.27
5.3.10.0520.03012.14
5.3.00.0480.02712.13
5.2.170.0480.02010.65
5.2.160.0400.02310.69
5.2.150.0400.02310.70
5.2.140.0320.02910.65
5.2.130.0500.02210.62
5.2.120.0450.02210.62
5.2.110.0450.01910.65
5.2.100.0430.01510.64
5.2.90.0430.02110.63
5.2.80.0380.02710.65
5.2.70.0430.01810.73
5.2.60.0390.02510.67
5.2.50.0380.02710.61
5.2.40.0320.02410.63
5.2.30.0320.02710.65
5.2.20.0320.02510.61
5.2.10.0330.02310.52
5.2.00.0360.02610.48
5.1.60.0320.01810.12
5.1.50.0340.01910.07
5.1.40.0320.02110.07
5.1.30.0350.02710.25
5.1.20.0370.02910.24
5.1.10.0310.02010.13
5.1.00.0360.01710.14
5.0.50.0160.0179.39
5.0.40.0230.0129.28
5.0.30.0170.0249.18
5.0.20.0180.0159.25
5.0.10.0170.0189.26
5.0.00.0190.0219.21
4.4.90.0160.0127.95
4.4.80.0200.0137.96
4.4.70.0170.0107.92
4.4.60.0140.0157.96
4.4.50.0150.0137.96
4.4.40.0160.0207.96
4.4.30.0180.0127.92
4.4.20.0130.0167.95
4.4.10.0170.0137.96
4.4.00.0160.0207.96
4.3.110.0170.0127.88
4.3.100.0170.0127.87
4.3.90.0210.0077.90
4.3.80.0140.0217.89
4.3.70.0120.0147.89
4.3.60.0180.0107.88
4.3.50.0180.0097.94
4.3.40.0150.0207.88
4.3.30.0070.0127.33
4.3.20.0110.0107.33
4.3.10.0100.0107.33
4.3.00.0070.0128.45

preferences:
59.65 ms | 401 KiB | 5 Q